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 makes several changes and fixes and adds test cases for all the
combinations I'm aware of.
See #147. Thanks to @tpeacock19 for patiently reporting these issues.
Squashed commit of the following:
commit d1b396c5654ae3fa8ad03d0d4b2cbde20000fa1a
Author: Adam Porter <adam@alphapapa.net>
Date: Mon Nov 16 02:01:23 2020 -0600
WIP: Fixes
commit 23215a723c4bf6e249c330863e01029166db56c3
Author: Adam Porter <adam@alphapapa.net>
Date: Mon Nov 16 01:34:34 2020 -0600
WIP: Fixes
commit 97b13d09d4d52bb168bfc19fb6f8daf2964f4b6c
Author: Adam Porter <adam@alphapapa.net>
Date: Mon Nov 16 00:46:49 2020 -0600
WIP: Test links too
Everything passes now.
commit 1866a71dbbb6416f7e365c90cadd269765d52b70
Author: Adam Porter <adam@alphapapa.net>
Date: Sun Nov 15 22:22:22 2020 -0600
WIP: Test loading/saving bookmarks
This seems to fix an occasional weird bug encountered when
byte-compiling and loading this file. I can't explain why it only
happens sometimes, but this seems to fix it, and it stands to reason
why it does, so it seems like the right thing to do.
peg.el doesn't use lexical binding, and org-ql.el does, so this caused
a byte-compile warning. It doesn't seem to change the behavior of the
expanded code, so it should be a safe change...
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.
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.
These predicates are analogs to the existing "children" and
"descendents" predicates.
They may be useful for testing parents for specific todo states, or if
they have non-inherited tags (i.e. tags from
"org-tags-exclude-from-inheritance").
Emacs 27 marks map-put as obsolete and renames it to map-put!, which
causes byte-compilation warnings (sigh...isn't that the definition of
useless churn?). Of course, map-put! doesn't exist in Emacs 26, so we
can't just use that. I'm beginning to think that it will never be
possible to make the linting clean.
Previously, on a cache miss, if FN returned nil, the sentinel would be
returned instead of nil.
Closes#78. Thanks to Josh Moller-Mara (@mm--) for reporting.