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.
Org 9.3 stopped replacing brackets in link descriptions with braces
and started escaping them instead.
Fixes#283. Thanks to Daniel Borchmann (@exot) for reporting.
Fixes#314, fixes#316. Thanks to Akira Komamura (@akirak) and Joon
Ro (@joonro) for reporting.
Instead of `[blank]` in this PEX, it used to be `(syntax-class
whitespace)`, which worked fine with peg v1.0. Then
<https://debbugs.gnu.org/cgi/bugreport.cgi?bug=59345> was filed and
resulted in the release of peg v1.0.1, after which that no longer
worked. As best I can tell from reading the discussion, `[blank]` and
`(syntax-class whitespace)` should behave the same way, yet here they
do not: with peg v1.0.1, only `[blank]` works. Why, I do not know; I
only tried it because I could find no explanation for the broken
behavior, and luckily, it works. Maybe it's due to the use of
`(syntax-class whitespace)` later in the `pexs`; but since it finally
works again, let's take the victory as-is.
e.g. if a predicate only accepts one argument, but the query gives
two, now the error will say, "PREDICATE called with 2 arguments, but
accepts only 1" (so maybe the predicate definition just needs
"&rest").
This is a breaking change of sorts in that searches using multiple
sorting methods will have to have the order of the sorters reversed to
get the same result. Unfortunate, but I think it's worth it in the
end, and this is pre-1.0, anyway.
Fixes#143.