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

Hierarchy predicates not supported in non-sexp syntax #428

Open Fuco1 opened 4 weeks ago

Fuco1 commented 4 weeks ago

OS/platform

Linux

Emacs version and provenance

28.2, self compiled, no special distribution

Emacs command

emacs

Org version and provenance

9.6.1, straight.el

org-ql package version and provenance

latest commit straight from git

Actions taken

Trying to filter nodes with ancestors containing "hello" in the headline

(org-ql--query-string-to-sexp "ancestors:query=h:hello") (org-ql--query-string-to-sexp "ancestors:h:hello") (org-ql--query-string-to-sexp "ancestors:(h:hello)")

Observed results

None of the queries I constructed in analogy with the readme works.

Expected results

I want to use the "line syntax" with nested queries somehow

Backtrace

No error

Etc.

No response

alphapapa commented 4 weeks ago

Yes, this is simply not supported yet, as the non-sexp parser is too naive to handle nested queries. See https://github.com/alphapapa/org-ql/pull/251, which would probably enable that with a bit more work. I intend to merge it eventually, but my time for big issues in my Emacs projects is limited right now.