Had to (and needed to, anyway) use peg-1.0. And while this does less
macro magic, and less magic with cl-eval-when, I couldn't get around
using eval. I wish peg had a function that takes a list of rules and
returns a predicate that matches a string or at point. (I tried to
work around the lack of that by using parts of peg macros, but it's
very complicated, and everything I tried had one problem or another.)
This prevents arbitrary code execution when opening "org-ql-search:"
links. (The links feature was just pushed to master in the last day
or so, and no stable release with the feature has been tagged.) This
fix also means that arbitrary expressions are no longer accepted when
interactively completing the buffers-files argument to
org-ql-search (a worthy trade, I think; users who need to do that can
call the function from Lisp).
Use org-ql--tags-at instead of org-get-tags/org-get-tags-at. This
uses our cache, which should improve performance, and it obviates the
function alias for Org versions before 9.3 (which occasionally
misbehaves, e.g. if Org is reloaded).
Unfortunately, the macro was moved from peg.el to peg-tests.el in
later versions of peg, so we copy it for our use here.
Fixes#75. Thanks to Karl Voit (@novoid) and @karlicoss for
reporting.
Released as 0.4.6.
Using a different major mode in org-ql-view buffers causes some Org Agenda
remote commands to not work, because they test whether the major mode
is org-agenda-mode. Even though these remote commands are not
guaranteed to work, it was not intended to break them now, so this
restores compatibility with them.
Fixes#102. Thanks to Alois Janíček (@aloisjanicek) for reporting.
This reverts commit ba7d4a2e82.
Released as 0.4.4.
Use a derived major mode for org-ql-view buffers, and ensure that mode
is active when calling org-ql-view-refresh, to avoid interfering with
buffers in other modes if the user calls the command by accident.
See
<b87156f2bb>.
Thanks to Alois Janíček (@AloisJanicek) for discovering the bug.
Released as 0.4.3.
I keep hitting "g" and nothing seems to happen, because it runs the
org-agenda refresh command, which doesn't do anything in org-ql-view
buffers. This must be happening to other people too. So let's fix
that.
Even when org-done-keywords-for-agenda is nil. I'm not sure when this
was broken, but the logic was wrong in this function, and this is the
intended behavior, so this is a bug fix.
Released as 0.4.2.