Query not tag returns zero results

Info

  • LogSeq: 0.2.5 AppImage
  • OS: Fedora 34
  • Summary: If the (not [[tag]]) does not match a tag the query fails.
  • Expectation: The query should find all the matches despite the “not” not matching, since it’s a “not”.

Scenario
I have TODOs in different projects.

  • TODO task 1 [[projectA]]
  • TODO task 2 [[projectA]]
  • TODO task 3 [[projectB]]
  • TODO task 4 no project

I have a search query for each project (in my contents/favourites)

  • [[projectA]]
    {{query (and (todo todo) [[projectA]])}}
  • [[projectB]]
    {{query (and (todo todo) [[projectB]])}}

As a catch all, I want to see any TODOs not in those projects. So I created a query with a not.

  • Uncategorised
    {{query ( and (todo todo) (not [[projectA]]) (not [[projectB]]) ) }}

However, I changed the name of a project, eg projectB became projectB2, by renaming the page, which updated all the references to it. LogSeq does not update the query. So projectB does not exist and the query breaks. There are TODOs that exist not related to any project, so should still be captured here.

To me it looked like I had no other TODOs. Sure I could be better at remembering everywhere I need to update, but I’m not good at remembering, that’s why I use LogSeq to remember for me.

Recreate

- Test
	- Tasks
		- TODO task 1 [[projectA]]
		- TODO task 2 [[projectA]]
		- TODO task 3 [[projectB]]
		- TODO task 4 no project
	- Projects
		- ## [[projectA]]
{{query (and (todo todo) [[projectA]])}}
		- ## [[projectB]]
{{query (and (todo todo) [[projectB]])}}
		- ## Uncategorised 
{{query ( and (todo todo) (not [[projectA]]) (not [[projectDoesNotExist]]) ) }}
		- I should see "Task 4" and "task 3 projectB"

Bug still exists in version 0.2.6 AppImage