* org-ql-completing-read.el (org-ql-completing-read-snippet): Call
snippet function with argument
(org-ql-completing-read): Call snippet function passed in rather than
hard-coded function.
(org-ql-completing-read--snippet-simple): Accept optional, ignored argument.
(org-ql-completing-read--snippet-regexp): Make argument optional;
rename for clarity.
Fixes#419.
Reported-by: tpeacock19 <https://github.com/tpeacock19>
This allows searching within a narrowed buffer with org-ql-find.
Using "C-u" searches the widened buffer, while "C-u C-u" prompts to
select the buffers to search (which previously worked with just
"C-u").
COMPLETING-READ, when used with its REQUIRE-MATCH argument, would not
allow a result to be selected when ORG-QL-FIND was called with its
QUERY-PREFIX argument.
This change moves where the query is modified to include the prefix,
putting it into the RUN-QUERY function instead of the COLLECTION
function. It seems to solve the problem, and the function seems to
still work when used without QUERY-PREFIX. However, due to the
complexity of all this (we really need a SELECTING-READ API), it
wouldn't surprise me if something is later found to have been broken
by it...
Fixes#351.
Reported-by: Daniel Fleischer <https://github.com/danielfleischer>
Also use org-entry-get to get the heading, which should avoid issues
with different Org versions having different optional arguments to
org-get-heading.
This seems to work better now with default Emacs completion (i.e. not
using Vertico or Helm). It's still not perfect, but it seems to work
reasonably well and be more correct.
Fixes#338. Thanks to @arozbiz for reporting.