alphapapa / org-ql

A searching tool for Org-mode, including custom query languages, commands, saved searches and agenda-like views, etc.
GNU General Public License v3.0
1.35k stars 104 forks source link

`(scheduled today)` is a malformed query (that could be errored on) #420

Closed ParetoOptimalDev closed 3 months ago

ParetoOptimalDev commented 3 months ago

OS/platform

NixOS

Emacs version and provenance

NixOS

Emacs command

type emacs and hit enter in terminal

Org version and provenance

NixOS: org-9.6.21

org-ql package version and provenance

NixOS: org-ql-20240222.200

Actions taken

/tmp/foo.org has contents:

** TODO walk dog
SCHEDULED: <2024-03-24 Sun ++7d>

Then execute this elisp:

(org-ql-search '("/tmp/foo.org") '(scheduled today))

Observed results

I see:

  TODO walk dog  in 11d 

Expected results

I expect no results.

Backtrace

n/a

Etc.

No response

alphapapa commented 3 months ago

(scheduled today) is a malformed query. You should use either (scheduled 0) or (scheduled :on today). Please see the documentation: https://github.com/alphapapa/org-ql#datetime-predicates As far as I can tell, there is no example like (scheduled today).

ParetoOptimalDev commented 3 months ago

Thank you for the quick response.

My mistake was caused by a mix of an old saved query having this mistake and being biased towards thinking this was similar to the issue about org-ql not supporting date ranges. This made it harder for me to consider my query syntax for this old view could be wrong.

I skimmed the info manual (thanks for including one btw), but I'll try to read it over again with more care next time.