From 8595139f5b3fa4fbf3c1b43629498525d83e686c Mon Sep 17 00:00:00 2001 From: Adam Porter Date: Tue, 9 Jan 2024 02:22:38 -0600 Subject: [PATCH 01/70] Meta: v0.8.2-pre --- README.org | 4 + org-ql.el | 2 +- org-ql.info | 221 +++++++++++++++++++++++++++------------------------- 3 files changed, 121 insertions(+), 106 deletions(-) diff --git a/README.org b/README.org index 59235b6..5a7190f 100644 --- a/README.org +++ b/README.org @@ -553,6 +553,10 @@ Simple links may also be written manually in either sexp or non-sexp form, like: /Note:/ Breaking changes may be made before version 1.0, but in the event of major changes, attempts at backward compatibility will be made with obsolescence declarations, translation of arguments, etc. Users who need stability guarantees before 1.0 may choose to use tagged stable releases. +** 0.8.2-pre + +Nothing new yet. + ** 0.8.1 *Fixes* diff --git a/org-ql.el b/org-ql.el index 3bed395..8611708 100644 --- a/org-ql.el +++ b/org-ql.el @@ -4,7 +4,7 @@ ;; Author: Adam Porter ;; Url: https://github.com/alphapapa/org-ql -;; Version: 0.8.1 +;; Version: 0.8.2-pre ;; Package-Requires: ((emacs "27.1") (compat "29.1") (dash "2.18.1") (f "0.17.2") (map "2.1") (org "9.0") (org-super-agenda "1.2") (ov "1.0.6") (peg "1.0.1") (s "1.12.0") (transient "0.1") (ts "0.2-pre")) ;; Keywords: hypermedia, outlines, Org, agenda diff --git a/org-ql.info b/org-ql.info index f55af54..57c34a9 100644 --- a/org-ql.info +++ b/org-ql.info @@ -72,6 +72,7 @@ Functions / Macros Changelog +* 0.8.2-pre: 082-pre. * 0.8.1: 081. * 0.8: 08. * 0.7.4: 074. @@ -1029,6 +1030,7 @@ releases. * Menu: +* 0.8.2-pre: 082-pre. * 0.8.1: 081. * 0.8: 08. * 0.7.4: 074. @@ -1063,9 +1065,17 @@ releases. * 0.1: 01.  -File: README.info, Node: 081, Next: 08, Up: Changelog +File: README.info, Node: 082-pre, Next: 081, Up: Changelog -5.1 0.8.1 +5.1 0.8.2-pre +============= + +Nothing new yet. + + +File: README.info, Node: 081, Next: 08, Prev: 082-pre, Up: Changelog + +5.2 0.8.1 ========= *Fixes* @@ -1080,7 +1090,7 @@ File: README.info, Node: 081, Next: 08, Up: Changelog  File: README.info, Node: 08, Next: 074, Prev: 081, Up: Changelog -5.2 0.8 +5.3 0.8 ======= *Additions* @@ -1136,7 +1146,7 @@ File: README.info, Node: 08, Next: 074, Prev: 081, Up: Changelog  File: README.info, Node: 074, Next: 073, Prev: 08, Up: Changelog -5.3 0.7.4 +5.4 0.7.4 ========= *Fixes* @@ -1146,7 +1156,7 @@ File: README.info, Node: 074, Next: 073, Prev: 08, Up: Changelog  File: README.info, Node: 073, Next: 072, Prev: 074, Up: Changelog -5.4 0.7.3 +5.5 0.7.3 ========= *Fixes* @@ -1164,7 +1174,7 @@ File: README.info, Node: 073, Next: 072, Prev: 074, Up: Changelog  File: README.info, Node: 072, Next: 071, Prev: 073, Up: Changelog -5.5 0.7.2 +5.6 0.7.2 ========= *Fixes* @@ -1185,7 +1195,7 @@ File: README.info, Node: 072, Next: 071, Prev: 073, Up: Changelog  File: README.info, Node: 071, Next: 07, Prev: 072, Up: Changelog -5.6 0.7.1 +5.7 0.7.1 ========= *Fixes* @@ -1204,7 +1214,7 @@ File: README.info, Node: 071, Next: 07, Prev: 072, Up: Changelog  File: README.info, Node: 07, Next: 063, Prev: 071, Up: Changelog -5.7 0.7 +5.8 0.7 ======= *Added* @@ -1263,7 +1273,7 @@ File: README.info, Node: 07, Next: 063, Prev: 071, Up: Changelog  File: README.info, Node: 063, Next: 062, Prev: 07, Up: Changelog -5.8 0.6.3 +5.9 0.6.3 ========= *Fixed* @@ -1279,8 +1289,8 @@ File: README.info, Node: 063, Next: 062, Prev: 07, Up: Changelog  File: README.info, Node: 062, Next: 061, Prev: 063, Up: Changelog -5.9 0.6.2 -========= +5.10 0.6.2 +========== *Fixed* • ‘link’ predicate when used in an ‘or’’ed query. (#279 @@ -1290,7 +1300,7 @@ File: README.info, Node: 062, Next: 061, Prev: 063, Up: Changelog  File: README.info, Node: 061, Next: 06, Prev: 062, Up: Changelog -5.10 0.6.1 +5.11 0.6.1 ========== *Fixed* @@ -1308,7 +1318,7 @@ File: README.info, Node: 061, Next: 06, Prev: 062, Up: Changelog  File: README.info, Node: 06, Next: 052, Prev: 061, Up: Changelog -5.11 0.6 +5.12 0.6 ======== *Added* @@ -1375,7 +1385,7 @@ File: README.info, Node: 06, Next: 052, Prev: 061, Up: Changelog  File: README.info, Node: 052, Next: 051, Prev: 06, Up: Changelog -5.12 0.5.2 +5.13 0.5.2 ========== *Fixed* @@ -1386,7 +1396,7 @@ File: README.info, Node: 052, Next: 051, Prev: 06, Up: Changelog  File: README.info, Node: 051, Next: 05, Prev: 052, Up: Changelog -5.13 0.5.1 +5.14 0.5.1 ========== *Fixed* @@ -1399,7 +1409,7 @@ File: README.info, Node: 051, Next: 05, Prev: 052, Up: Changelog  File: README.info, Node: 05, Next: 049, Prev: 051, Up: Changelog -5.14 0.5 +5.15 0.5 ======== *Added* @@ -1440,7 +1450,7 @@ File: README.info, Node: 05, Next: 049, Prev: 051, Up: Changelog  File: README.info, Node: 049, Next: 048, Prev: 05, Up: Changelog -5.15 0.4.9 +5.16 0.4.9 ========== *Fixed* @@ -1451,7 +1461,7 @@ File: README.info, Node: 049, Next: 048, Prev: 05, Up: Changelog  File: README.info, Node: 048, Next: 047, Prev: 049, Up: Changelog -5.16 0.4.8 +5.17 0.4.8 ========== *Fixed* @@ -1463,7 +1473,7 @@ File: README.info, Node: 048, Next: 047, Prev: 049, Up: Changelog  File: README.info, Node: 047, Next: 046, Prev: 048, Up: Changelog -5.17 0.4.7 +5.18 0.4.7 ========== *Fixed* @@ -1476,7 +1486,7 @@ File: README.info, Node: 047, Next: 046, Prev: 048, Up: Changelog  File: README.info, Node: 046, Next: 045, Prev: 047, Up: Changelog -5.18 0.4.6 +5.19 0.4.6 ========== *Fixed* @@ -1489,7 +1499,7 @@ File: README.info, Node: 046, Next: 045, Prev: 047, Up: Changelog  File: README.info, Node: 045, Next: 044, Prev: 046, Up: Changelog -5.19 0.4.5 +5.20 0.4.5 ========== *Fixed* @@ -1501,7 +1511,7 @@ File: README.info, Node: 045, Next: 044, Prev: 046, Up: Changelog  File: README.info, Node: 044, Next: 043, Prev: 045, Up: Changelog -5.20 0.4.4 +5.21 0.4.4 ========== *Fixed* @@ -1513,7 +1523,7 @@ File: README.info, Node: 044, Next: 043, Prev: 045, Up: Changelog  File: README.info, Node: 043, Next: 042, Prev: 044, Up: Changelog -5.21 0.4.3 +5.22 0.4.3 ========== *Fixed* @@ -1523,7 +1533,7 @@ File: README.info, Node: 043, Next: 042, Prev: 044, Up: Changelog  File: README.info, Node: 042, Next: 041, Prev: 043, Up: Changelog -5.22 0.4.2 +5.23 0.4.2 ========== *Fixed* @@ -1532,7 +1542,7 @@ File: README.info, Node: 042, Next: 041, Prev: 043, Up: Changelog  File: README.info, Node: 041, Next: 04, Prev: 042, Up: Changelog -5.23 0.4.1 +5.24 0.4.1 ========== *Fixed* @@ -1542,7 +1552,7 @@ File: README.info, Node: 041, Next: 04, Prev: 042, Up: Changelog  File: README.info, Node: 04, Next: 032, Prev: 041, Up: Changelog -5.24 0.4 +5.25 0.4 ======== _Note:_ The next release, 0.5, may include changes which will require @@ -1623,7 +1633,7 @@ automatically, as they will be pushed to the ‘master’ branch when ready.  File: README.info, Node: 032, Next: 031, Prev: 04, Up: Changelog -5.25 0.3.2 +5.26 0.3.2 ========== *Fixed* @@ -1636,7 +1646,7 @@ File: README.info, Node: 032, Next: 031, Prev: 04, Up: Changelog  File: README.info, Node: 031, Next: 03, Prev: 032, Up: Changelog -5.26 0.3.1 +5.27 0.3.1 ========== *Fixed* @@ -1646,7 +1656,7 @@ File: README.info, Node: 031, Next: 03, Prev: 032, Up: Changelog  File: README.info, Node: 03, Next: 023, Prev: 031, Up: Changelog -5.27 0.3 +5.28 0.3 ======== *Added* @@ -1714,7 +1724,7 @@ File: README.info, Node: 03, Next: 023, Prev: 031, Up: Changelog  File: README.info, Node: 023, Next: 022, Prev: 03, Up: Changelog -5.28 0.2.3 +5.29 0.2.3 ========== *Fixed* @@ -1724,7 +1734,7 @@ File: README.info, Node: 023, Next: 022, Prev: 03, Up: Changelog  File: README.info, Node: 022, Next: 021, Prev: 023, Up: Changelog -5.29 0.2.2 +5.30 0.2.2 ========== *Fixed* @@ -1735,7 +1745,7 @@ File: README.info, Node: 022, Next: 021, Prev: 023, Up: Changelog  File: README.info, Node: 021, Next: 02, Prev: 022, Up: Changelog -5.30 0.2.1 +5.31 0.2.1 ========== *Fixed* @@ -1745,7 +1755,7 @@ File: README.info, Node: 021, Next: 02, Prev: 022, Up: Changelog  File: README.info, Node: 02, Next: 01, Prev: 021, Up: Changelog -5.31 0.2 +5.32 0.2 ======== *Added* @@ -1828,7 +1838,7 @@ File: README.info, Node: 02, Next: 01, Prev: 021, Up: Changelog  File: README.info, Node: 01, Prev: 02, Up: Changelog -5.32 0.1 +5.33 0.1 ======== First tagged release. @@ -1886,77 +1896,78 @@ GPLv3  Tag Table: Node: Top225 -Node: Contents1865 -Node: Screenshots1988 -Node: Installation2106 -Node: Quelpa2620 -Node: Helm support3148 -Node: Usage3551 -Node: Commands3949 -Node: org-ql-find4414 -Node: org-ql-open-link5322 -Node: org-ql-refile6177 -Node: org-ql-search6505 -Node: helm-org-ql8436 -Node: org-ql-view8814 -Node: org-ql-view-sidebar9344 -Node: org-ql-view-recent-items9724 -Node: org-ql-sparse-tree10220 -Node: Queries11020 -Node: Non-sexp query syntax12137 -Node: General predicates13896 -Node: Ancestor/descendant predicates20821 -Node: Date/time predicates21949 -Node: Functions / Macros25073 -Node: Agenda-like views25371 -Ref: Function org-ql-block25533 -Node: Listing / acting-on results26794 -Ref: Caching27002 -Ref: Function org-ql-select27915 -Ref: Function org-ql-query30341 -Ref: Macro org-ql (deprecated)32115 -Node: Custom predicates32430 -Ref: Macro org-ql-defpred32654 -Node: Dynamic block36095 -Node: Links38819 -Node: Tips39506 -Node: Changelog39830 -Node: 08140660 -Node: 0841069 -Node: 07443793 -Node: 07344016 -Node: 07244748 -Node: 07145667 -Node: 0746476 -Node: 06349340 -Node: 06249871 -Node: 06150176 -Node: 0650746 -Node: 05253802 -Node: 05154104 -Node: 0554529 -Node: 04956060 -Node: 04856342 -Node: 04756691 -Node: 04657100 -Node: 04557508 -Node: 04457869 -Node: 04358228 -Node: 04258431 -Node: 04158592 -Node: 0458839 -Node: 03262940 -Node: 03163343 -Node: 0363540 -Node: 02366840 -Node: 02267074 -Node: 02167354 -Node: 0267559 -Node: 0171637 -Node: Notes71738 -Node: Comparison with Org Agenda searches71900 -Node: org-sidebar72789 -Node: License73068 +Node: Contents1887 +Node: Screenshots2010 +Node: Installation2128 +Node: Quelpa2642 +Node: Helm support3170 +Node: Usage3573 +Node: Commands3971 +Node: org-ql-find4436 +Node: org-ql-open-link5344 +Node: org-ql-refile6199 +Node: org-ql-search6527 +Node: helm-org-ql8458 +Node: org-ql-view8836 +Node: org-ql-view-sidebar9366 +Node: org-ql-view-recent-items9746 +Node: org-ql-sparse-tree10242 +Node: Queries11042 +Node: Non-sexp query syntax12159 +Node: General predicates13918 +Node: Ancestor/descendant predicates20843 +Node: Date/time predicates21971 +Node: Functions / Macros25095 +Node: Agenda-like views25393 +Ref: Function org-ql-block25555 +Node: Listing / acting-on results26816 +Ref: Caching27024 +Ref: Function org-ql-select27937 +Ref: Function org-ql-query30363 +Ref: Macro org-ql (deprecated)32137 +Node: Custom predicates32452 +Ref: Macro org-ql-defpred32676 +Node: Dynamic block36117 +Node: Links38841 +Node: Tips39528 +Node: Changelog39852 +Node: 082-pre40704 +Node: 08140816 +Node: 0841241 +Node: 07443965 +Node: 07344188 +Node: 07244920 +Node: 07145839 +Node: 0746648 +Node: 06349512 +Node: 06250043 +Node: 06150350 +Node: 0650920 +Node: 05253976 +Node: 05154278 +Node: 0554703 +Node: 04956234 +Node: 04856516 +Node: 04756865 +Node: 04657274 +Node: 04557682 +Node: 04458043 +Node: 04358402 +Node: 04258605 +Node: 04158766 +Node: 0459013 +Node: 03263114 +Node: 03163517 +Node: 0363714 +Node: 02367014 +Node: 02267248 +Node: 02167528 +Node: 0267733 +Node: 0171811 +Node: Notes71912 +Node: Comparison with Org Agenda searches72074 +Node: org-sidebar72963 +Node: License73242  End Tag Table From 7ff6cc2ef71ac703c22834eae06550be68daa0f3 Mon Sep 17 00:00:00 2001 From: Adam Porter Date: Tue, 9 Jan 2024 02:23:55 -0600 Subject: [PATCH 02/70] Fix: (org-ql-find) Don't use org-with-point-at See . Reported-by: Bram Schoenmakers --- README.org | 4 ++- org-ql-find.el | 2 +- org-ql.info | 80 +++++++++++++++++++++++++++----------------------- 3 files changed, 47 insertions(+), 39 deletions(-) diff --git a/README.org b/README.org index 5a7190f..17249ec 100644 --- a/README.org +++ b/README.org @@ -555,7 +555,9 @@ Simple links may also be written manually in either sexp or non-sexp form, like: ** 0.8.2-pre -Nothing new yet. +*Fixes* + ++ Command ~org-ql-find~ incorrectly restored the buffer after jumping when not using indirect buffers. (See [[https://github.com/alphapapa/org-ql/issues/380#issuecomment-1881913025][#380]]. Thanks to [[https://github.com/bram85][Bram Schoenmakers]] for reporting.) ** 0.8.1 diff --git a/org-ql-find.el b/org-ql-find.el index fed9ade..3e517c6 100644 --- a/org-ql-find.el +++ b/org-ql-find.el @@ -77,7 +77,7 @@ single predicate)." :prompt prompt))) (set-buffer (marker-buffer marker)) (pop-to-buffer (current-buffer) org-ql-find-display-buffer-action) - (org-with-point-at marker + (without-restriction (run-hook-with-args 'org-ql-find-goto-hook)))) ;;;###autoload diff --git a/org-ql.info b/org-ql.info index 57c34a9..78a9c54 100644 --- a/org-ql.info +++ b/org-ql.info @@ -1070,7 +1070,13 @@ File: README.info, Node: 082-pre, Next: 081, Up: Changelog 5.1 0.8.2-pre ============= -Nothing new yet. +*Fixes* + + • Command ‘org-ql-find’ incorrectly restored the buffer after jumping + when not using indirect buffers. (See #380 + (https://github.com/alphapapa/org-ql/issues/380#issuecomment-1881913025). + Thanks to Bram Schoenmakers (https://github.com/bram85) for + reporting.)  File: README.info, Node: 081, Next: 08, Prev: 082-pre, Up: Changelog @@ -1932,42 +1938,42 @@ Node: Links38841 Node: Tips39528 Node: Changelog39852 Node: 082-pre40704 -Node: 08140816 -Node: 0841241 -Node: 07443965 -Node: 07344188 -Node: 07244920 -Node: 07145839 -Node: 0746648 -Node: 06349512 -Node: 06250043 -Node: 06150350 -Node: 0650920 -Node: 05253976 -Node: 05154278 -Node: 0554703 -Node: 04956234 -Node: 04856516 -Node: 04756865 -Node: 04657274 -Node: 04557682 -Node: 04458043 -Node: 04358402 -Node: 04258605 -Node: 04158766 -Node: 0459013 -Node: 03263114 -Node: 03163517 -Node: 0363714 -Node: 02367014 -Node: 02267248 -Node: 02167528 -Node: 0267733 -Node: 0171811 -Node: Notes71912 -Node: Comparison with Org Agenda searches72074 -Node: org-sidebar72963 -Node: License73242 +Node: 08141097 +Node: 0841522 +Node: 07444246 +Node: 07344469 +Node: 07245201 +Node: 07146120 +Node: 0746929 +Node: 06349793 +Node: 06250324 +Node: 06150631 +Node: 0651201 +Node: 05254257 +Node: 05154559 +Node: 0554984 +Node: 04956515 +Node: 04856797 +Node: 04757146 +Node: 04657555 +Node: 04557963 +Node: 04458324 +Node: 04358683 +Node: 04258886 +Node: 04159047 +Node: 0459294 +Node: 03263395 +Node: 03163798 +Node: 0363995 +Node: 02367295 +Node: 02267529 +Node: 02167809 +Node: 0268014 +Node: 0172092 +Node: Notes72193 +Node: Comparison with Org Agenda searches72355 +Node: org-sidebar73244 +Node: License73523  End Tag Table From 3448e49d86695707737e9471cfac740afa8e6fc1 Mon Sep 17 00:00:00 2001 From: Adam Porter Date: Tue, 9 Jan 2024 02:27:11 -0600 Subject: [PATCH 03/70] Release: v0.8.2 --- README.org | 2 +- org-ql.el | 2 +- org-ql.info | 156 ++++++++++++++++++++++++++-------------------------- 3 files changed, 80 insertions(+), 80 deletions(-) diff --git a/README.org b/README.org index 17249ec..7fbb935 100644 --- a/README.org +++ b/README.org @@ -553,7 +553,7 @@ Simple links may also be written manually in either sexp or non-sexp form, like: /Note:/ Breaking changes may be made before version 1.0, but in the event of major changes, attempts at backward compatibility will be made with obsolescence declarations, translation of arguments, etc. Users who need stability guarantees before 1.0 may choose to use tagged stable releases. -** 0.8.2-pre +** 0.8.2 *Fixes* diff --git a/org-ql.el b/org-ql.el index 8611708..349c3dd 100644 --- a/org-ql.el +++ b/org-ql.el @@ -4,7 +4,7 @@ ;; Author: Adam Porter ;; Url: https://github.com/alphapapa/org-ql -;; Version: 0.8.2-pre +;; Version: 0.8.2 ;; Package-Requires: ((emacs "27.1") (compat "29.1") (dash "2.18.1") (f "0.17.2") (map "2.1") (org "9.0") (org-super-agenda "1.2") (ov "1.0.6") (peg "1.0.1") (s "1.12.0") (transient "0.1") (ts "0.2-pre")) ;; Keywords: hypermedia, outlines, Org, agenda diff --git a/org-ql.info b/org-ql.info index 78a9c54..47fc78a 100644 --- a/org-ql.info +++ b/org-ql.info @@ -72,7 +72,7 @@ Functions / Macros Changelog -* 0.8.2-pre: 082-pre. +* 0.8.2: 082. * 0.8.1: 081. * 0.8: 08. * 0.7.4: 074. @@ -1030,7 +1030,7 @@ releases. * Menu: -* 0.8.2-pre: 082-pre. +* 0.8.2: 082. * 0.8.1: 081. * 0.8: 08. * 0.7.4: 074. @@ -1065,10 +1065,10 @@ releases. * 0.1: 01.  -File: README.info, Node: 082-pre, Next: 081, Up: Changelog +File: README.info, Node: 082, Next: 081, Up: Changelog -5.1 0.8.2-pre -============= +5.1 0.8.2 +========= *Fixes* @@ -1079,7 +1079,7 @@ File: README.info, Node: 082-pre, Next: 081, Up: Changelog reporting.)  -File: README.info, Node: 081, Next: 08, Prev: 082-pre, Up: Changelog +File: README.info, Node: 081, Next: 08, Prev: 082, Up: Changelog 5.2 0.8.1 ========= @@ -1902,78 +1902,78 @@ GPLv3  Tag Table: Node: Top225 -Node: Contents1887 -Node: Screenshots2010 -Node: Installation2128 -Node: Quelpa2642 -Node: Helm support3170 -Node: Usage3573 -Node: Commands3971 -Node: org-ql-find4436 -Node: org-ql-open-link5344 -Node: org-ql-refile6199 -Node: org-ql-search6527 -Node: helm-org-ql8458 -Node: org-ql-view8836 -Node: org-ql-view-sidebar9366 -Node: org-ql-view-recent-items9746 -Node: org-ql-sparse-tree10242 -Node: Queries11042 -Node: Non-sexp query syntax12159 -Node: General predicates13918 -Node: Ancestor/descendant predicates20843 -Node: Date/time predicates21971 -Node: Functions / Macros25095 -Node: Agenda-like views25393 -Ref: Function org-ql-block25555 -Node: Listing / acting-on results26816 -Ref: Caching27024 -Ref: Function org-ql-select27937 -Ref: Function org-ql-query30363 -Ref: Macro org-ql (deprecated)32137 -Node: Custom predicates32452 -Ref: Macro org-ql-defpred32676 -Node: Dynamic block36117 -Node: Links38841 -Node: Tips39528 -Node: Changelog39852 -Node: 082-pre40704 -Node: 08141097 -Node: 0841522 -Node: 07444246 -Node: 07344469 -Node: 07245201 -Node: 07146120 -Node: 0746929 -Node: 06349793 -Node: 06250324 -Node: 06150631 -Node: 0651201 -Node: 05254257 -Node: 05154559 -Node: 0554984 -Node: 04956515 -Node: 04856797 -Node: 04757146 -Node: 04657555 -Node: 04557963 -Node: 04458324 -Node: 04358683 -Node: 04258886 -Node: 04159047 -Node: 0459294 -Node: 03263395 -Node: 03163798 -Node: 0363995 -Node: 02367295 -Node: 02267529 -Node: 02167809 -Node: 0268014 -Node: 0172092 -Node: Notes72193 -Node: Comparison with Org Agenda searches72355 -Node: org-sidebar73244 -Node: License73523 +Node: Contents1879 +Node: Screenshots2002 +Node: Installation2120 +Node: Quelpa2634 +Node: Helm support3162 +Node: Usage3565 +Node: Commands3963 +Node: org-ql-find4428 +Node: org-ql-open-link5336 +Node: org-ql-refile6191 +Node: org-ql-search6519 +Node: helm-org-ql8450 +Node: org-ql-view8828 +Node: org-ql-view-sidebar9358 +Node: org-ql-view-recent-items9738 +Node: org-ql-sparse-tree10234 +Node: Queries11034 +Node: Non-sexp query syntax12151 +Node: General predicates13910 +Node: Ancestor/descendant predicates20835 +Node: Date/time predicates21963 +Node: Functions / Macros25087 +Node: Agenda-like views25385 +Ref: Function org-ql-block25547 +Node: Listing / acting-on results26808 +Ref: Caching27016 +Ref: Function org-ql-select27929 +Ref: Function org-ql-query30355 +Ref: Macro org-ql (deprecated)32129 +Node: Custom predicates32444 +Ref: Macro org-ql-defpred32668 +Node: Dynamic block36109 +Node: Links38833 +Node: Tips39520 +Node: Changelog39844 +Node: 08240688 +Node: 08141069 +Node: 0841490 +Node: 07444214 +Node: 07344437 +Node: 07245169 +Node: 07146088 +Node: 0746897 +Node: 06349761 +Node: 06250292 +Node: 06150599 +Node: 0651169 +Node: 05254225 +Node: 05154527 +Node: 0554952 +Node: 04956483 +Node: 04856765 +Node: 04757114 +Node: 04657523 +Node: 04557931 +Node: 04458292 +Node: 04358651 +Node: 04258854 +Node: 04159015 +Node: 0459262 +Node: 03263363 +Node: 03163766 +Node: 0363963 +Node: 02367263 +Node: 02267497 +Node: 02167777 +Node: 0267982 +Node: 0172060 +Node: Notes72161 +Node: Comparison with Org Agenda searches72323 +Node: org-sidebar73212 +Node: License73491  End Tag Table From 694739b31dcd17f0118365945d69a80e8fdb2fe4 Mon Sep 17 00:00:00 2001 From: Adam Porter Date: Wed, 10 Jan 2024 01:38:15 -0600 Subject: [PATCH 04/70] Meta: v0.8.3-pre --- README.org | 4 + org-ql.el | 2 +- org-ql.info | 225 +++++++++++++++++++++++++++------------------------- 3 files changed, 123 insertions(+), 108 deletions(-) diff --git a/README.org b/README.org index 7fbb935..c485caa 100644 --- a/README.org +++ b/README.org @@ -553,6 +553,10 @@ Simple links may also be written manually in either sexp or non-sexp form, like: /Note:/ Breaking changes may be made before version 1.0, but in the event of major changes, attempts at backward compatibility will be made with obsolescence declarations, translation of arguments, etc. Users who need stability guarantees before 1.0 may choose to use tagged stable releases. +** 0.8.3-pre + +Nothing new yet. + ** 0.8.2 *Fixes* diff --git a/org-ql.el b/org-ql.el index 349c3dd..98d0423 100644 --- a/org-ql.el +++ b/org-ql.el @@ -4,7 +4,7 @@ ;; Author: Adam Porter ;; Url: https://github.com/alphapapa/org-ql -;; Version: 0.8.2 +;; Version: 0.8.3-pre ;; Package-Requires: ((emacs "27.1") (compat "29.1") (dash "2.18.1") (f "0.17.2") (map "2.1") (org "9.0") (org-super-agenda "1.2") (ov "1.0.6") (peg "1.0.1") (s "1.12.0") (transient "0.1") (ts "0.2-pre")) ;; Keywords: hypermedia, outlines, Org, agenda diff --git a/org-ql.info b/org-ql.info index 47fc78a..e10accc 100644 --- a/org-ql.info +++ b/org-ql.info @@ -72,6 +72,7 @@ Functions / Macros Changelog +* 0.8.3-pre: 083-pre. * 0.8.2: 082. * 0.8.1: 081. * 0.8: 08. @@ -1030,6 +1031,7 @@ releases. * Menu: +* 0.8.3-pre: 083-pre. * 0.8.2: 082. * 0.8.1: 081. * 0.8: 08. @@ -1065,9 +1067,17 @@ releases. * 0.1: 01.  -File: README.info, Node: 082, Next: 081, Up: Changelog +File: README.info, Node: 083-pre, Next: 082, Up: Changelog -5.1 0.8.2 +5.1 0.8.3-pre +============= + +Nothing new yet. + + +File: README.info, Node: 082, Next: 081, Prev: 083-pre, Up: Changelog + +5.2 0.8.2 ========= *Fixes* @@ -1081,7 +1091,7 @@ File: README.info, Node: 082, Next: 081, Up: Changelog  File: README.info, Node: 081, Next: 08, Prev: 082, Up: Changelog -5.2 0.8.1 +5.3 0.8.1 ========= *Fixes* @@ -1096,7 +1106,7 @@ File: README.info, Node: 081, Next: 08, Prev: 082, Up: Changelog  File: README.info, Node: 08, Next: 074, Prev: 081, Up: Changelog -5.3 0.8 +5.4 0.8 ======= *Additions* @@ -1152,7 +1162,7 @@ File: README.info, Node: 08, Next: 074, Prev: 081, Up: Changelog  File: README.info, Node: 074, Next: 073, Prev: 08, Up: Changelog -5.4 0.7.4 +5.5 0.7.4 ========= *Fixes* @@ -1162,7 +1172,7 @@ File: README.info, Node: 074, Next: 073, Prev: 08, Up: Changelog  File: README.info, Node: 073, Next: 072, Prev: 074, Up: Changelog -5.5 0.7.3 +5.6 0.7.3 ========= *Fixes* @@ -1180,7 +1190,7 @@ File: README.info, Node: 073, Next: 072, Prev: 074, Up: Changelog  File: README.info, Node: 072, Next: 071, Prev: 073, Up: Changelog -5.6 0.7.2 +5.7 0.7.2 ========= *Fixes* @@ -1201,7 +1211,7 @@ File: README.info, Node: 072, Next: 071, Prev: 073, Up: Changelog  File: README.info, Node: 071, Next: 07, Prev: 072, Up: Changelog -5.7 0.7.1 +5.8 0.7.1 ========= *Fixes* @@ -1220,7 +1230,7 @@ File: README.info, Node: 071, Next: 07, Prev: 072, Up: Changelog  File: README.info, Node: 07, Next: 063, Prev: 071, Up: Changelog -5.8 0.7 +5.9 0.7 ======= *Added* @@ -1279,8 +1289,8 @@ File: README.info, Node: 07, Next: 063, Prev: 071, Up: Changelog  File: README.info, Node: 063, Next: 062, Prev: 07, Up: Changelog -5.9 0.6.3 -========= +5.10 0.6.3 +========== *Fixed* • Non-sexp query parsing with updated version 1.0.1 of the ‘peg’ @@ -1295,7 +1305,7 @@ File: README.info, Node: 063, Next: 062, Prev: 07, Up: Changelog  File: README.info, Node: 062, Next: 061, Prev: 063, Up: Changelog -5.10 0.6.2 +5.11 0.6.2 ========== *Fixed* @@ -1306,7 +1316,7 @@ File: README.info, Node: 062, Next: 061, Prev: 063, Up: Changelog  File: README.info, Node: 061, Next: 06, Prev: 062, Up: Changelog -5.11 0.6.1 +5.12 0.6.1 ========== *Fixed* @@ -1324,7 +1334,7 @@ File: README.info, Node: 061, Next: 06, Prev: 062, Up: Changelog  File: README.info, Node: 06, Next: 052, Prev: 061, Up: Changelog -5.12 0.6 +5.13 0.6 ======== *Added* @@ -1391,7 +1401,7 @@ File: README.info, Node: 06, Next: 052, Prev: 061, Up: Changelog  File: README.info, Node: 052, Next: 051, Prev: 06, Up: Changelog -5.13 0.5.2 +5.14 0.5.2 ========== *Fixed* @@ -1402,7 +1412,7 @@ File: README.info, Node: 052, Next: 051, Prev: 06, Up: Changelog  File: README.info, Node: 051, Next: 05, Prev: 052, Up: Changelog -5.14 0.5.1 +5.15 0.5.1 ========== *Fixed* @@ -1415,7 +1425,7 @@ File: README.info, Node: 051, Next: 05, Prev: 052, Up: Changelog  File: README.info, Node: 05, Next: 049, Prev: 051, Up: Changelog -5.15 0.5 +5.16 0.5 ======== *Added* @@ -1456,7 +1466,7 @@ File: README.info, Node: 05, Next: 049, Prev: 051, Up: Changelog  File: README.info, Node: 049, Next: 048, Prev: 05, Up: Changelog -5.16 0.4.9 +5.17 0.4.9 ========== *Fixed* @@ -1467,7 +1477,7 @@ File: README.info, Node: 049, Next: 048, Prev: 05, Up: Changelog  File: README.info, Node: 048, Next: 047, Prev: 049, Up: Changelog -5.17 0.4.8 +5.18 0.4.8 ========== *Fixed* @@ -1479,7 +1489,7 @@ File: README.info, Node: 048, Next: 047, Prev: 049, Up: Changelog  File: README.info, Node: 047, Next: 046, Prev: 048, Up: Changelog -5.18 0.4.7 +5.19 0.4.7 ========== *Fixed* @@ -1492,7 +1502,7 @@ File: README.info, Node: 047, Next: 046, Prev: 048, Up: Changelog  File: README.info, Node: 046, Next: 045, Prev: 047, Up: Changelog -5.19 0.4.6 +5.20 0.4.6 ========== *Fixed* @@ -1505,7 +1515,7 @@ File: README.info, Node: 046, Next: 045, Prev: 047, Up: Changelog  File: README.info, Node: 045, Next: 044, Prev: 046, Up: Changelog -5.20 0.4.5 +5.21 0.4.5 ========== *Fixed* @@ -1517,7 +1527,7 @@ File: README.info, Node: 045, Next: 044, Prev: 046, Up: Changelog  File: README.info, Node: 044, Next: 043, Prev: 045, Up: Changelog -5.21 0.4.4 +5.22 0.4.4 ========== *Fixed* @@ -1529,7 +1539,7 @@ File: README.info, Node: 044, Next: 043, Prev: 045, Up: Changelog  File: README.info, Node: 043, Next: 042, Prev: 044, Up: Changelog -5.22 0.4.3 +5.23 0.4.3 ========== *Fixed* @@ -1539,7 +1549,7 @@ File: README.info, Node: 043, Next: 042, Prev: 044, Up: Changelog  File: README.info, Node: 042, Next: 041, Prev: 043, Up: Changelog -5.23 0.4.2 +5.24 0.4.2 ========== *Fixed* @@ -1548,7 +1558,7 @@ File: README.info, Node: 042, Next: 041, Prev: 043, Up: Changelog  File: README.info, Node: 041, Next: 04, Prev: 042, Up: Changelog -5.24 0.4.1 +5.25 0.4.1 ========== *Fixed* @@ -1558,7 +1568,7 @@ File: README.info, Node: 041, Next: 04, Prev: 042, Up: Changelog  File: README.info, Node: 04, Next: 032, Prev: 041, Up: Changelog -5.25 0.4 +5.26 0.4 ======== _Note:_ The next release, 0.5, may include changes which will require @@ -1639,7 +1649,7 @@ automatically, as they will be pushed to the ‘master’ branch when ready.  File: README.info, Node: 032, Next: 031, Prev: 04, Up: Changelog -5.26 0.3.2 +5.27 0.3.2 ========== *Fixed* @@ -1652,7 +1662,7 @@ File: README.info, Node: 032, Next: 031, Prev: 04, Up: Changelog  File: README.info, Node: 031, Next: 03, Prev: 032, Up: Changelog -5.27 0.3.1 +5.28 0.3.1 ========== *Fixed* @@ -1662,7 +1672,7 @@ File: README.info, Node: 031, Next: 03, Prev: 032, Up: Changelog  File: README.info, Node: 03, Next: 023, Prev: 031, Up: Changelog -5.28 0.3 +5.29 0.3 ======== *Added* @@ -1730,7 +1740,7 @@ File: README.info, Node: 03, Next: 023, Prev: 031, Up: Changelog  File: README.info, Node: 023, Next: 022, Prev: 03, Up: Changelog -5.29 0.2.3 +5.30 0.2.3 ========== *Fixed* @@ -1740,7 +1750,7 @@ File: README.info, Node: 023, Next: 022, Prev: 03, Up: Changelog  File: README.info, Node: 022, Next: 021, Prev: 023, Up: Changelog -5.30 0.2.2 +5.31 0.2.2 ========== *Fixed* @@ -1751,7 +1761,7 @@ File: README.info, Node: 022, Next: 021, Prev: 023, Up: Changelog  File: README.info, Node: 021, Next: 02, Prev: 022, Up: Changelog -5.31 0.2.1 +5.32 0.2.1 ========== *Fixed* @@ -1761,7 +1771,7 @@ File: README.info, Node: 021, Next: 02, Prev: 022, Up: Changelog  File: README.info, Node: 02, Next: 01, Prev: 021, Up: Changelog -5.32 0.2 +5.33 0.2 ======== *Added* @@ -1844,7 +1854,7 @@ File: README.info, Node: 02, Next: 01, Prev: 021, Up: Changelog  File: README.info, Node: 01, Prev: 02, Up: Changelog -5.33 0.1 +5.34 0.1 ======== First tagged release. @@ -1902,78 +1912,79 @@ GPLv3  Tag Table: Node: Top225 -Node: Contents1879 -Node: Screenshots2002 -Node: Installation2120 -Node: Quelpa2634 -Node: Helm support3162 -Node: Usage3565 -Node: Commands3963 -Node: org-ql-find4428 -Node: org-ql-open-link5336 -Node: org-ql-refile6191 -Node: org-ql-search6519 -Node: helm-org-ql8450 -Node: org-ql-view8828 -Node: org-ql-view-sidebar9358 -Node: org-ql-view-recent-items9738 -Node: org-ql-sparse-tree10234 -Node: Queries11034 -Node: Non-sexp query syntax12151 -Node: General predicates13910 -Node: Ancestor/descendant predicates20835 -Node: Date/time predicates21963 -Node: Functions / Macros25087 -Node: Agenda-like views25385 -Ref: Function org-ql-block25547 -Node: Listing / acting-on results26808 -Ref: Caching27016 -Ref: Function org-ql-select27929 -Ref: Function org-ql-query30355 -Ref: Macro org-ql (deprecated)32129 -Node: Custom predicates32444 -Ref: Macro org-ql-defpred32668 -Node: Dynamic block36109 -Node: Links38833 -Node: Tips39520 -Node: Changelog39844 -Node: 08240688 -Node: 08141069 -Node: 0841490 -Node: 07444214 -Node: 07344437 -Node: 07245169 -Node: 07146088 -Node: 0746897 -Node: 06349761 -Node: 06250292 -Node: 06150599 -Node: 0651169 -Node: 05254225 -Node: 05154527 -Node: 0554952 -Node: 04956483 -Node: 04856765 -Node: 04757114 -Node: 04657523 -Node: 04557931 -Node: 04458292 -Node: 04358651 -Node: 04258854 -Node: 04159015 -Node: 0459262 -Node: 03263363 -Node: 03163766 -Node: 0363963 -Node: 02367263 -Node: 02267497 -Node: 02167777 -Node: 0267982 -Node: 0172060 -Node: Notes72161 -Node: Comparison with Org Agenda searches72323 -Node: org-sidebar73212 -Node: License73491 +Node: Contents1901 +Node: Screenshots2024 +Node: Installation2142 +Node: Quelpa2656 +Node: Helm support3184 +Node: Usage3587 +Node: Commands3985 +Node: org-ql-find4450 +Node: org-ql-open-link5358 +Node: org-ql-refile6213 +Node: org-ql-search6541 +Node: helm-org-ql8472 +Node: org-ql-view8850 +Node: org-ql-view-sidebar9380 +Node: org-ql-view-recent-items9760 +Node: org-ql-sparse-tree10256 +Node: Queries11056 +Node: Non-sexp query syntax12173 +Node: General predicates13932 +Node: Ancestor/descendant predicates20857 +Node: Date/time predicates21985 +Node: Functions / Macros25109 +Node: Agenda-like views25407 +Ref: Function org-ql-block25569 +Node: Listing / acting-on results26830 +Ref: Caching27038 +Ref: Function org-ql-select27951 +Ref: Function org-ql-query30377 +Ref: Macro org-ql (deprecated)32151 +Node: Custom predicates32466 +Ref: Macro org-ql-defpred32690 +Node: Dynamic block36131 +Node: Links38855 +Node: Tips39542 +Node: Changelog39866 +Node: 083-pre40732 +Node: 08240844 +Node: 08141241 +Node: 0841662 +Node: 07444386 +Node: 07344609 +Node: 07245341 +Node: 07146260 +Node: 0747069 +Node: 06349933 +Node: 06250466 +Node: 06150773 +Node: 0651343 +Node: 05254399 +Node: 05154701 +Node: 0555126 +Node: 04956657 +Node: 04856939 +Node: 04757288 +Node: 04657697 +Node: 04558105 +Node: 04458466 +Node: 04358825 +Node: 04259028 +Node: 04159189 +Node: 0459436 +Node: 03263537 +Node: 03163940 +Node: 0364137 +Node: 02367437 +Node: 02267671 +Node: 02167951 +Node: 0268156 +Node: 0172234 +Node: Notes72335 +Node: Comparison with Org Agenda searches72497 +Node: org-sidebar73386 +Node: License73665  End Tag Table From 0b1e4b43ec522aaedeac4abf8858b8b3b86753e6 Mon Sep 17 00:00:00 2001 From: Adam Porter Date: Wed, 10 Jan 2024 01:55:16 -0600 Subject: [PATCH 05/70] Fix: (org-ql-find) Moving point and widening buffer as needed MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit See #380. Reported-by: Omar Antolín Camarena --- README.org | 4 ++- org-ql-find.el | 15 +++++++++- org-ql.info | 81 +++++++++++++++++++++++++++----------------------- 3 files changed, 60 insertions(+), 40 deletions(-) diff --git a/README.org b/README.org index c485caa..52740c7 100644 --- a/README.org +++ b/README.org @@ -555,7 +555,9 @@ Simple links may also be written manually in either sexp or non-sexp form, like: ** 0.8.3-pre -Nothing new yet. +*Fixes* + ++ Command ~org-ql-find~ incorrectly moved point. (See [[https://github.com/alphapapa/org-ql/issues/380#issuecomment-1881913025][#380]]. Thanks to [[https://github.com/oantolin][Omar Antolín Camarena]] for reporting.) ** 0.8.2 diff --git a/org-ql-find.el b/org-ql-find.el index 3e517c6..591e958 100644 --- a/org-ql-find.el +++ b/org-ql-find.el @@ -78,7 +78,20 @@ single predicate)." (set-buffer (marker-buffer marker)) (pop-to-buffer (current-buffer) org-ql-find-display-buffer-action) (without-restriction - (run-hook-with-args 'org-ql-find-goto-hook)))) + (goto-char marker) + (run-hook-with-args 'org-ql-find-goto-hook)) + (when (equal (current-buffer) (marker-buffer marker)) + ;; Ensure point is still within visible portion of buffer. (If + ;; `org-tree-to-indirect-buffer' is used in `org-ql-find-goto-hook', + ;; the buffer will have been changed and it won't matter; otherwise, + ;; the buffer could have been narrowed to a region excluding the + ;; selected entry.) + (let ((end-of-subtree (org-with-point-at marker + (org-end-of-subtree 'invisible-ok)))) + (unless (and (<= (point-min) marker) + (>= (point-max) end-of-subtree)) + (widen) + (goto-char marker)))))) ;;;###autoload (defun org-ql-refile (marker) diff --git a/org-ql.info b/org-ql.info index e10accc..174bbb1 100644 --- a/org-ql.info +++ b/org-ql.info @@ -1072,7 +1072,12 @@ File: README.info, Node: 083-pre, Next: 082, Up: Changelog 5.1 0.8.3-pre ============= -Nothing new yet. +*Fixes* + + • Command ‘org-ql-find’ incorrectly moved point. (See #380 + (https://github.com/alphapapa/org-ql/issues/380#issuecomment-1881913025). + Thanks to Omar Antolín Camarena (https://github.com/oantolin) for + reporting.)  File: README.info, Node: 082, Next: 081, Prev: 083-pre, Up: Changelog @@ -1948,43 +1953,43 @@ Node: Links38855 Node: Tips39542 Node: Changelog39866 Node: 083-pre40732 -Node: 08240844 -Node: 08141241 -Node: 0841662 -Node: 07444386 -Node: 07344609 -Node: 07245341 -Node: 07146260 -Node: 0747069 -Node: 06349933 -Node: 06250466 -Node: 06150773 -Node: 0651343 -Node: 05254399 -Node: 05154701 -Node: 0555126 -Node: 04956657 -Node: 04856939 -Node: 04757288 -Node: 04657697 -Node: 04558105 -Node: 04458466 -Node: 04358825 -Node: 04259028 -Node: 04159189 -Node: 0459436 -Node: 03263537 -Node: 03163940 -Node: 0364137 -Node: 02367437 -Node: 02267671 -Node: 02167951 -Node: 0268156 -Node: 0172234 -Node: Notes72335 -Node: Comparison with Org Agenda searches72497 -Node: org-sidebar73386 -Node: License73665 +Node: 08241073 +Node: 08141470 +Node: 0841891 +Node: 07444615 +Node: 07344838 +Node: 07245570 +Node: 07146489 +Node: 0747298 +Node: 06350162 +Node: 06250695 +Node: 06151002 +Node: 0651572 +Node: 05254628 +Node: 05154930 +Node: 0555355 +Node: 04956886 +Node: 04857168 +Node: 04757517 +Node: 04657926 +Node: 04558334 +Node: 04458695 +Node: 04359054 +Node: 04259257 +Node: 04159418 +Node: 0459665 +Node: 03263766 +Node: 03164169 +Node: 0364366 +Node: 02367666 +Node: 02267900 +Node: 02168180 +Node: 0268385 +Node: 0172463 +Node: Notes72564 +Node: Comparison with Org Agenda searches72726 +Node: org-sidebar73615 +Node: License73894  End Tag Table From 7d8bd8b8847e4cf7a9fa04c7d4a4cbb2ae223e46 Mon Sep 17 00:00:00 2001 From: Adam Porter Date: Wed, 10 Jan 2024 01:56:00 -0600 Subject: [PATCH 06/70] Release: v0.8.3 --- README.org | 2 +- org-ql.el | 2 +- org-ql.info | 158 ++++++++++++++++++++++++++-------------------------- 3 files changed, 81 insertions(+), 81 deletions(-) diff --git a/README.org b/README.org index 52740c7..88daaf5 100644 --- a/README.org +++ b/README.org @@ -553,7 +553,7 @@ Simple links may also be written manually in either sexp or non-sexp form, like: /Note:/ Breaking changes may be made before version 1.0, but in the event of major changes, attempts at backward compatibility will be made with obsolescence declarations, translation of arguments, etc. Users who need stability guarantees before 1.0 may choose to use tagged stable releases. -** 0.8.3-pre +** 0.8.3 *Fixes* diff --git a/org-ql.el b/org-ql.el index 98d0423..394cdcb 100644 --- a/org-ql.el +++ b/org-ql.el @@ -4,7 +4,7 @@ ;; Author: Adam Porter ;; Url: https://github.com/alphapapa/org-ql -;; Version: 0.8.3-pre +;; Version: 0.8.3 ;; Package-Requires: ((emacs "27.1") (compat "29.1") (dash "2.18.1") (f "0.17.2") (map "2.1") (org "9.0") (org-super-agenda "1.2") (ov "1.0.6") (peg "1.0.1") (s "1.12.0") (transient "0.1") (ts "0.2-pre")) ;; Keywords: hypermedia, outlines, Org, agenda diff --git a/org-ql.info b/org-ql.info index 174bbb1..aa16159 100644 --- a/org-ql.info +++ b/org-ql.info @@ -72,7 +72,7 @@ Functions / Macros Changelog -* 0.8.3-pre: 083-pre. +* 0.8.3: 083. * 0.8.2: 082. * 0.8.1: 081. * 0.8: 08. @@ -1031,7 +1031,7 @@ releases. * Menu: -* 0.8.3-pre: 083-pre. +* 0.8.3: 083. * 0.8.2: 082. * 0.8.1: 081. * 0.8: 08. @@ -1067,10 +1067,10 @@ releases. * 0.1: 01.  -File: README.info, Node: 083-pre, Next: 082, Up: Changelog +File: README.info, Node: 083, Next: 082, Up: Changelog -5.1 0.8.3-pre -============= +5.1 0.8.3 +========= *Fixes* @@ -1080,7 +1080,7 @@ File: README.info, Node: 083-pre, Next: 082, Up: Changelog reporting.)  -File: README.info, Node: 082, Next: 081, Prev: 083-pre, Up: Changelog +File: README.info, Node: 082, Next: 081, Prev: 083, Up: Changelog 5.2 0.8.2 ========= @@ -1917,79 +1917,79 @@ GPLv3  Tag Table: Node: Top225 -Node: Contents1901 -Node: Screenshots2024 -Node: Installation2142 -Node: Quelpa2656 -Node: Helm support3184 -Node: Usage3587 -Node: Commands3985 -Node: org-ql-find4450 -Node: org-ql-open-link5358 -Node: org-ql-refile6213 -Node: org-ql-search6541 -Node: helm-org-ql8472 -Node: org-ql-view8850 -Node: org-ql-view-sidebar9380 -Node: org-ql-view-recent-items9760 -Node: org-ql-sparse-tree10256 -Node: Queries11056 -Node: Non-sexp query syntax12173 -Node: General predicates13932 -Node: Ancestor/descendant predicates20857 -Node: Date/time predicates21985 -Node: Functions / Macros25109 -Node: Agenda-like views25407 -Ref: Function org-ql-block25569 -Node: Listing / acting-on results26830 -Ref: Caching27038 -Ref: Function org-ql-select27951 -Ref: Function org-ql-query30377 -Ref: Macro org-ql (deprecated)32151 -Node: Custom predicates32466 -Ref: Macro org-ql-defpred32690 -Node: Dynamic block36131 -Node: Links38855 -Node: Tips39542 -Node: Changelog39866 -Node: 083-pre40732 -Node: 08241073 -Node: 08141470 -Node: 0841891 -Node: 07444615 -Node: 07344838 -Node: 07245570 -Node: 07146489 -Node: 0747298 -Node: 06350162 -Node: 06250695 -Node: 06151002 -Node: 0651572 -Node: 05254628 -Node: 05154930 -Node: 0555355 -Node: 04956886 -Node: 04857168 -Node: 04757517 -Node: 04657926 -Node: 04558334 -Node: 04458695 -Node: 04359054 -Node: 04259257 -Node: 04159418 -Node: 0459665 -Node: 03263766 -Node: 03164169 -Node: 0364366 -Node: 02367666 -Node: 02267900 -Node: 02168180 -Node: 0268385 -Node: 0172463 -Node: Notes72564 -Node: Comparison with Org Agenda searches72726 -Node: org-sidebar73615 -Node: License73894 +Node: Contents1893 +Node: Screenshots2016 +Node: Installation2134 +Node: Quelpa2648 +Node: Helm support3176 +Node: Usage3579 +Node: Commands3977 +Node: org-ql-find4442 +Node: org-ql-open-link5350 +Node: org-ql-refile6205 +Node: org-ql-search6533 +Node: helm-org-ql8464 +Node: org-ql-view8842 +Node: org-ql-view-sidebar9372 +Node: org-ql-view-recent-items9752 +Node: org-ql-sparse-tree10248 +Node: Queries11048 +Node: Non-sexp query syntax12165 +Node: General predicates13924 +Node: Ancestor/descendant predicates20849 +Node: Date/time predicates21977 +Node: Functions / Macros25101 +Node: Agenda-like views25399 +Ref: Function org-ql-block25561 +Node: Listing / acting-on results26822 +Ref: Caching27030 +Ref: Function org-ql-select27943 +Ref: Function org-ql-query30369 +Ref: Macro org-ql (deprecated)32143 +Node: Custom predicates32458 +Ref: Macro org-ql-defpred32682 +Node: Dynamic block36123 +Node: Links38847 +Node: Tips39534 +Node: Changelog39858 +Node: 08340716 +Node: 08241045 +Node: 08141438 +Node: 0841859 +Node: 07444583 +Node: 07344806 +Node: 07245538 +Node: 07146457 +Node: 0747266 +Node: 06350130 +Node: 06250663 +Node: 06150970 +Node: 0651540 +Node: 05254596 +Node: 05154898 +Node: 0555323 +Node: 04956854 +Node: 04857136 +Node: 04757485 +Node: 04657894 +Node: 04558302 +Node: 04458663 +Node: 04359022 +Node: 04259225 +Node: 04159386 +Node: 0459633 +Node: 03263734 +Node: 03164137 +Node: 0364334 +Node: 02367634 +Node: 02267868 +Node: 02168148 +Node: 0268353 +Node: 0172431 +Node: Notes72532 +Node: Comparison with Org Agenda searches72694 +Node: org-sidebar73583 +Node: License73862  End Tag Table From 0168171a14cb55adf31c80c9155eaa8ab7967be5 Mon Sep 17 00:00:00 2001 From: Adam Porter Date: Fri, 12 Jan 2024 23:58:41 -0600 Subject: [PATCH 07/70] Meta: v0.8.4-pre --- README.org | 4 + org-ql.el | 2 +- org-ql.info | 229 +++++++++++++++++++++++++++------------------------- 3 files changed, 125 insertions(+), 110 deletions(-) diff --git a/README.org b/README.org index 88daaf5..b8f2475 100644 --- a/README.org +++ b/README.org @@ -553,6 +553,10 @@ Simple links may also be written manually in either sexp or non-sexp form, like: /Note:/ Breaking changes may be made before version 1.0, but in the event of major changes, attempts at backward compatibility will be made with obsolescence declarations, translation of arguments, etc. Users who need stability guarantees before 1.0 may choose to use tagged stable releases. +** 0.8.4-pre + +Nothing new yet. + ** 0.8.3 *Fixes* diff --git a/org-ql.el b/org-ql.el index 394cdcb..865c598 100644 --- a/org-ql.el +++ b/org-ql.el @@ -4,7 +4,7 @@ ;; Author: Adam Porter ;; Url: https://github.com/alphapapa/org-ql -;; Version: 0.8.3 +;; Version: 0.8.4-pre ;; Package-Requires: ((emacs "27.1") (compat "29.1") (dash "2.18.1") (f "0.17.2") (map "2.1") (org "9.0") (org-super-agenda "1.2") (ov "1.0.6") (peg "1.0.1") (s "1.12.0") (transient "0.1") (ts "0.2-pre")) ;; Keywords: hypermedia, outlines, Org, agenda diff --git a/org-ql.info b/org-ql.info index aa16159..10249a2 100644 --- a/org-ql.info +++ b/org-ql.info @@ -72,6 +72,7 @@ Functions / Macros Changelog +* 0.8.4-pre: 084-pre. * 0.8.3: 083. * 0.8.2: 082. * 0.8.1: 081. @@ -1031,6 +1032,7 @@ releases. * Menu: +* 0.8.4-pre: 084-pre. * 0.8.3: 083. * 0.8.2: 082. * 0.8.1: 081. @@ -1067,9 +1069,17 @@ releases. * 0.1: 01.  -File: README.info, Node: 083, Next: 082, Up: Changelog +File: README.info, Node: 084-pre, Next: 083, Up: Changelog -5.1 0.8.3 +5.1 0.8.4-pre +============= + +Nothing new yet. + + +File: README.info, Node: 083, Next: 082, Prev: 084-pre, Up: Changelog + +5.2 0.8.3 ========= *Fixes* @@ -1082,7 +1092,7 @@ File: README.info, Node: 083, Next: 082, Up: Changelog  File: README.info, Node: 082, Next: 081, Prev: 083, Up: Changelog -5.2 0.8.2 +5.3 0.8.2 ========= *Fixes* @@ -1096,7 +1106,7 @@ File: README.info, Node: 082, Next: 081, Prev: 083, Up: Changelog  File: README.info, Node: 081, Next: 08, Prev: 082, Up: Changelog -5.3 0.8.1 +5.4 0.8.1 ========= *Fixes* @@ -1111,7 +1121,7 @@ File: README.info, Node: 081, Next: 08, Prev: 082, Up: Changelog  File: README.info, Node: 08, Next: 074, Prev: 081, Up: Changelog -5.4 0.8 +5.5 0.8 ======= *Additions* @@ -1167,7 +1177,7 @@ File: README.info, Node: 08, Next: 074, Prev: 081, Up: Changelog  File: README.info, Node: 074, Next: 073, Prev: 08, Up: Changelog -5.5 0.7.4 +5.6 0.7.4 ========= *Fixes* @@ -1177,7 +1187,7 @@ File: README.info, Node: 074, Next: 073, Prev: 08, Up: Changelog  File: README.info, Node: 073, Next: 072, Prev: 074, Up: Changelog -5.6 0.7.3 +5.7 0.7.3 ========= *Fixes* @@ -1195,7 +1205,7 @@ File: README.info, Node: 073, Next: 072, Prev: 074, Up: Changelog  File: README.info, Node: 072, Next: 071, Prev: 073, Up: Changelog -5.7 0.7.2 +5.8 0.7.2 ========= *Fixes* @@ -1216,7 +1226,7 @@ File: README.info, Node: 072, Next: 071, Prev: 073, Up: Changelog  File: README.info, Node: 071, Next: 07, Prev: 072, Up: Changelog -5.8 0.7.1 +5.9 0.7.1 ========= *Fixes* @@ -1235,8 +1245,8 @@ File: README.info, Node: 071, Next: 07, Prev: 072, Up: Changelog  File: README.info, Node: 07, Next: 063, Prev: 071, Up: Changelog -5.9 0.7 -======= +5.10 0.7 +======== *Added* • Command ‘org-ql-find’, which jumps to entries selected using @@ -1294,7 +1304,7 @@ File: README.info, Node: 07, Next: 063, Prev: 071, Up: Changelog  File: README.info, Node: 063, Next: 062, Prev: 07, Up: Changelog -5.10 0.6.3 +5.11 0.6.3 ========== *Fixed* @@ -1310,7 +1320,7 @@ File: README.info, Node: 063, Next: 062, Prev: 07, Up: Changelog  File: README.info, Node: 062, Next: 061, Prev: 063, Up: Changelog -5.11 0.6.2 +5.12 0.6.2 ========== *Fixed* @@ -1321,7 +1331,7 @@ File: README.info, Node: 062, Next: 061, Prev: 063, Up: Changelog  File: README.info, Node: 061, Next: 06, Prev: 062, Up: Changelog -5.12 0.6.1 +5.13 0.6.1 ========== *Fixed* @@ -1339,7 +1349,7 @@ File: README.info, Node: 061, Next: 06, Prev: 062, Up: Changelog  File: README.info, Node: 06, Next: 052, Prev: 061, Up: Changelog -5.13 0.6 +5.14 0.6 ======== *Added* @@ -1406,7 +1416,7 @@ File: README.info, Node: 06, Next: 052, Prev: 061, Up: Changelog  File: README.info, Node: 052, Next: 051, Prev: 06, Up: Changelog -5.14 0.5.2 +5.15 0.5.2 ========== *Fixed* @@ -1417,7 +1427,7 @@ File: README.info, Node: 052, Next: 051, Prev: 06, Up: Changelog  File: README.info, Node: 051, Next: 05, Prev: 052, Up: Changelog -5.15 0.5.1 +5.16 0.5.1 ========== *Fixed* @@ -1430,7 +1440,7 @@ File: README.info, Node: 051, Next: 05, Prev: 052, Up: Changelog  File: README.info, Node: 05, Next: 049, Prev: 051, Up: Changelog -5.16 0.5 +5.17 0.5 ======== *Added* @@ -1471,7 +1481,7 @@ File: README.info, Node: 05, Next: 049, Prev: 051, Up: Changelog  File: README.info, Node: 049, Next: 048, Prev: 05, Up: Changelog -5.17 0.4.9 +5.18 0.4.9 ========== *Fixed* @@ -1482,7 +1492,7 @@ File: README.info, Node: 049, Next: 048, Prev: 05, Up: Changelog  File: README.info, Node: 048, Next: 047, Prev: 049, Up: Changelog -5.18 0.4.8 +5.19 0.4.8 ========== *Fixed* @@ -1494,7 +1504,7 @@ File: README.info, Node: 048, Next: 047, Prev: 049, Up: Changelog  File: README.info, Node: 047, Next: 046, Prev: 048, Up: Changelog -5.19 0.4.7 +5.20 0.4.7 ========== *Fixed* @@ -1507,7 +1517,7 @@ File: README.info, Node: 047, Next: 046, Prev: 048, Up: Changelog  File: README.info, Node: 046, Next: 045, Prev: 047, Up: Changelog -5.20 0.4.6 +5.21 0.4.6 ========== *Fixed* @@ -1520,7 +1530,7 @@ File: README.info, Node: 046, Next: 045, Prev: 047, Up: Changelog  File: README.info, Node: 045, Next: 044, Prev: 046, Up: Changelog -5.21 0.4.5 +5.22 0.4.5 ========== *Fixed* @@ -1532,7 +1542,7 @@ File: README.info, Node: 045, Next: 044, Prev: 046, Up: Changelog  File: README.info, Node: 044, Next: 043, Prev: 045, Up: Changelog -5.22 0.4.4 +5.23 0.4.4 ========== *Fixed* @@ -1544,7 +1554,7 @@ File: README.info, Node: 044, Next: 043, Prev: 045, Up: Changelog  File: README.info, Node: 043, Next: 042, Prev: 044, Up: Changelog -5.23 0.4.3 +5.24 0.4.3 ========== *Fixed* @@ -1554,7 +1564,7 @@ File: README.info, Node: 043, Next: 042, Prev: 044, Up: Changelog  File: README.info, Node: 042, Next: 041, Prev: 043, Up: Changelog -5.24 0.4.2 +5.25 0.4.2 ========== *Fixed* @@ -1563,7 +1573,7 @@ File: README.info, Node: 042, Next: 041, Prev: 043, Up: Changelog  File: README.info, Node: 041, Next: 04, Prev: 042, Up: Changelog -5.25 0.4.1 +5.26 0.4.1 ========== *Fixed* @@ -1573,7 +1583,7 @@ File: README.info, Node: 041, Next: 04, Prev: 042, Up: Changelog  File: README.info, Node: 04, Next: 032, Prev: 041, Up: Changelog -5.26 0.4 +5.27 0.4 ======== _Note:_ The next release, 0.5, may include changes which will require @@ -1654,7 +1664,7 @@ automatically, as they will be pushed to the ‘master’ branch when ready.  File: README.info, Node: 032, Next: 031, Prev: 04, Up: Changelog -5.27 0.3.2 +5.28 0.3.2 ========== *Fixed* @@ -1667,7 +1677,7 @@ File: README.info, Node: 032, Next: 031, Prev: 04, Up: Changelog  File: README.info, Node: 031, Next: 03, Prev: 032, Up: Changelog -5.28 0.3.1 +5.29 0.3.1 ========== *Fixed* @@ -1677,7 +1687,7 @@ File: README.info, Node: 031, Next: 03, Prev: 032, Up: Changelog  File: README.info, Node: 03, Next: 023, Prev: 031, Up: Changelog -5.29 0.3 +5.30 0.3 ======== *Added* @@ -1745,7 +1755,7 @@ File: README.info, Node: 03, Next: 023, Prev: 031, Up: Changelog  File: README.info, Node: 023, Next: 022, Prev: 03, Up: Changelog -5.30 0.2.3 +5.31 0.2.3 ========== *Fixed* @@ -1755,7 +1765,7 @@ File: README.info, Node: 023, Next: 022, Prev: 03, Up: Changelog  File: README.info, Node: 022, Next: 021, Prev: 023, Up: Changelog -5.31 0.2.2 +5.32 0.2.2 ========== *Fixed* @@ -1766,7 +1776,7 @@ File: README.info, Node: 022, Next: 021, Prev: 023, Up: Changelog  File: README.info, Node: 021, Next: 02, Prev: 022, Up: Changelog -5.32 0.2.1 +5.33 0.2.1 ========== *Fixed* @@ -1776,7 +1786,7 @@ File: README.info, Node: 021, Next: 02, Prev: 022, Up: Changelog  File: README.info, Node: 02, Next: 01, Prev: 021, Up: Changelog -5.33 0.2 +5.34 0.2 ======== *Added* @@ -1859,7 +1869,7 @@ File: README.info, Node: 02, Next: 01, Prev: 021, Up: Changelog  File: README.info, Node: 01, Prev: 02, Up: Changelog -5.34 0.1 +5.35 0.1 ======== First tagged release. @@ -1917,79 +1927,80 @@ GPLv3  Tag Table: Node: Top225 -Node: Contents1893 -Node: Screenshots2016 -Node: Installation2134 -Node: Quelpa2648 -Node: Helm support3176 -Node: Usage3579 -Node: Commands3977 -Node: org-ql-find4442 -Node: org-ql-open-link5350 -Node: org-ql-refile6205 -Node: org-ql-search6533 -Node: helm-org-ql8464 -Node: org-ql-view8842 -Node: org-ql-view-sidebar9372 -Node: org-ql-view-recent-items9752 -Node: org-ql-sparse-tree10248 -Node: Queries11048 -Node: Non-sexp query syntax12165 -Node: General predicates13924 -Node: Ancestor/descendant predicates20849 -Node: Date/time predicates21977 -Node: Functions / Macros25101 -Node: Agenda-like views25399 -Ref: Function org-ql-block25561 -Node: Listing / acting-on results26822 -Ref: Caching27030 -Ref: Function org-ql-select27943 -Ref: Function org-ql-query30369 -Ref: Macro org-ql (deprecated)32143 -Node: Custom predicates32458 -Ref: Macro org-ql-defpred32682 -Node: Dynamic block36123 -Node: Links38847 -Node: Tips39534 -Node: Changelog39858 -Node: 08340716 -Node: 08241045 -Node: 08141438 -Node: 0841859 -Node: 07444583 -Node: 07344806 -Node: 07245538 -Node: 07146457 -Node: 0747266 -Node: 06350130 -Node: 06250663 -Node: 06150970 -Node: 0651540 -Node: 05254596 -Node: 05154898 -Node: 0555323 -Node: 04956854 -Node: 04857136 -Node: 04757485 -Node: 04657894 -Node: 04558302 -Node: 04458663 -Node: 04359022 -Node: 04259225 -Node: 04159386 -Node: 0459633 -Node: 03263734 -Node: 03164137 -Node: 0364334 -Node: 02367634 -Node: 02267868 -Node: 02168148 -Node: 0268353 -Node: 0172431 -Node: Notes72532 -Node: Comparison with Org Agenda searches72694 -Node: org-sidebar73583 -Node: License73862 +Node: Contents1915 +Node: Screenshots2038 +Node: Installation2156 +Node: Quelpa2670 +Node: Helm support3198 +Node: Usage3601 +Node: Commands3999 +Node: org-ql-find4464 +Node: org-ql-open-link5372 +Node: org-ql-refile6227 +Node: org-ql-search6555 +Node: helm-org-ql8486 +Node: org-ql-view8864 +Node: org-ql-view-sidebar9394 +Node: org-ql-view-recent-items9774 +Node: org-ql-sparse-tree10270 +Node: Queries11070 +Node: Non-sexp query syntax12187 +Node: General predicates13946 +Node: Ancestor/descendant predicates20871 +Node: Date/time predicates21999 +Node: Functions / Macros25123 +Node: Agenda-like views25421 +Ref: Function org-ql-block25583 +Node: Listing / acting-on results26844 +Ref: Caching27052 +Ref: Function org-ql-select27965 +Ref: Function org-ql-query30391 +Ref: Macro org-ql (deprecated)32165 +Node: Custom predicates32480 +Ref: Macro org-ql-defpred32704 +Node: Dynamic block36145 +Node: Links38869 +Node: Tips39556 +Node: Changelog39880 +Node: 084-pre40760 +Node: 08340872 +Node: 08241217 +Node: 08141610 +Node: 0842031 +Node: 07444755 +Node: 07344978 +Node: 07245710 +Node: 07146629 +Node: 0747438 +Node: 06350304 +Node: 06250837 +Node: 06151144 +Node: 0651714 +Node: 05254770 +Node: 05155072 +Node: 0555497 +Node: 04957028 +Node: 04857310 +Node: 04757659 +Node: 04658068 +Node: 04558476 +Node: 04458837 +Node: 04359196 +Node: 04259399 +Node: 04159560 +Node: 0459807 +Node: 03263908 +Node: 03164311 +Node: 0364508 +Node: 02367808 +Node: 02268042 +Node: 02168322 +Node: 0268527 +Node: 0172605 +Node: Notes72706 +Node: Comparison with Org Agenda searches72868 +Node: org-sidebar73757 +Node: License74036  End Tag Table From 34f8b75b35f6cf4d886385d3d0f8f965bef3db22 Mon Sep 17 00:00:00 2001 From: Adam Porter Date: Sat, 13 Jan 2024 00:02:16 -0600 Subject: [PATCH 08/70] Fix: (org-ql-find) Go to base buffer if possible Use the base buffer if it has one, because if we run the search from an indirect buffer, it's likely already narrowed to a different entry, and making an indirect buffer from that one would end up with a restriction that would likely hide the selected entry. --- README.org | 4 ++- org-ql-find.el | 3 +- org-ql.info | 84 +++++++++++++++++++++++++++----------------------- 3 files changed, 50 insertions(+), 41 deletions(-) diff --git a/README.org b/README.org index b8f2475..d1c606e 100644 --- a/README.org +++ b/README.org @@ -555,7 +555,9 @@ Simple links may also be written manually in either sexp or non-sexp form, like: ** 0.8.4-pre -Nothing new yet. +*Fixes* + ++ Command ~org-ql-find~ goes to the selected entry in the base buffer (rather than potentially an indirect buffer, whose narrowing could leave the selected entry hidden. The nuances around going to entries in buffers that may be indirect and/or narrowed are surprisingly complicated. Hopefully this is the last fix). ** 0.8.3 diff --git a/org-ql-find.el b/org-ql-find.el index 591e958..f6f2b9c 100644 --- a/org-ql-find.el +++ b/org-ql-find.el @@ -75,7 +75,8 @@ single predicate)." :query-prefix query-prefix :query-filter query-filter :prompt prompt))) - (set-buffer (marker-buffer marker)) + (set-buffer (or (buffer-base-buffer (marker-buffer marker)) + (marker-buffer marker))) (pop-to-buffer (current-buffer) org-ql-find-display-buffer-action) (without-restriction (goto-char marker) diff --git a/org-ql.info b/org-ql.info index 10249a2..e501628 100644 --- a/org-ql.info +++ b/org-ql.info @@ -1074,7 +1074,13 @@ File: README.info, Node: 084-pre, Next: 083, Up: Changelog 5.1 0.8.4-pre ============= -Nothing new yet. +*Fixes* + + • Command ‘org-ql-find’ goes to the selected entry in the base buffer + (rather than potentially an indirect buffer, whose narrowing could + leave the selected entry hidden. The nuances around going to + entries in buffers that may be indirect and/or narrowed are + surprisingly complicated. Hopefully this is the last fix).  File: README.info, Node: 083, Next: 082, Prev: 084-pre, Up: Changelog @@ -1963,44 +1969,44 @@ Node: Links38869 Node: Tips39556 Node: Changelog39880 Node: 084-pre40760 -Node: 08340872 -Node: 08241217 -Node: 08141610 -Node: 0842031 -Node: 07444755 -Node: 07344978 -Node: 07245710 -Node: 07146629 -Node: 0747438 -Node: 06350304 -Node: 06250837 -Node: 06151144 -Node: 0651714 -Node: 05254770 -Node: 05155072 -Node: 0555497 -Node: 04957028 -Node: 04857310 -Node: 04757659 -Node: 04658068 -Node: 04558476 -Node: 04458837 -Node: 04359196 -Node: 04259399 -Node: 04159560 -Node: 0459807 -Node: 03263908 -Node: 03164311 -Node: 0364508 -Node: 02367808 -Node: 02268042 -Node: 02168322 -Node: 0268527 -Node: 0172605 -Node: Notes72706 -Node: Comparison with Org Agenda searches72868 -Node: org-sidebar73757 -Node: License74036 +Node: 08341212 +Node: 08241557 +Node: 08141950 +Node: 0842371 +Node: 07445095 +Node: 07345318 +Node: 07246050 +Node: 07146969 +Node: 0747778 +Node: 06350644 +Node: 06251177 +Node: 06151484 +Node: 0652054 +Node: 05255110 +Node: 05155412 +Node: 0555837 +Node: 04957368 +Node: 04857650 +Node: 04757999 +Node: 04658408 +Node: 04558816 +Node: 04459177 +Node: 04359536 +Node: 04259739 +Node: 04159900 +Node: 0460147 +Node: 03264248 +Node: 03164651 +Node: 0364848 +Node: 02368148 +Node: 02268382 +Node: 02168662 +Node: 0268867 +Node: 0172945 +Node: Notes73046 +Node: Comparison with Org Agenda searches73208 +Node: org-sidebar74097 +Node: License74376  End Tag Table From 9606aaf81230d1faf2c7f54925b45e527fa32bf0 Mon Sep 17 00:00:00 2001 From: Adam Porter Date: Sat, 13 Jan 2024 00:03:28 -0600 Subject: [PATCH 09/70] Release: v0.8.4 --- README.org | 2 +- org-ql.el | 2 +- org-ql.info | 160 ++++++++++++++++++++++++++-------------------------- 3 files changed, 82 insertions(+), 82 deletions(-) diff --git a/README.org b/README.org index d1c606e..9175943 100644 --- a/README.org +++ b/README.org @@ -553,7 +553,7 @@ Simple links may also be written manually in either sexp or non-sexp form, like: /Note:/ Breaking changes may be made before version 1.0, but in the event of major changes, attempts at backward compatibility will be made with obsolescence declarations, translation of arguments, etc. Users who need stability guarantees before 1.0 may choose to use tagged stable releases. -** 0.8.4-pre +** 0.8.4 *Fixes* diff --git a/org-ql.el b/org-ql.el index 865c598..9f24c03 100644 --- a/org-ql.el +++ b/org-ql.el @@ -4,7 +4,7 @@ ;; Author: Adam Porter ;; Url: https://github.com/alphapapa/org-ql -;; Version: 0.8.4-pre +;; Version: 0.8.4 ;; Package-Requires: ((emacs "27.1") (compat "29.1") (dash "2.18.1") (f "0.17.2") (map "2.1") (org "9.0") (org-super-agenda "1.2") (ov "1.0.6") (peg "1.0.1") (s "1.12.0") (transient "0.1") (ts "0.2-pre")) ;; Keywords: hypermedia, outlines, Org, agenda diff --git a/org-ql.info b/org-ql.info index e501628..0ce52d0 100644 --- a/org-ql.info +++ b/org-ql.info @@ -72,7 +72,7 @@ Functions / Macros Changelog -* 0.8.4-pre: 084-pre. +* 0.8.4: 084. * 0.8.3: 083. * 0.8.2: 082. * 0.8.1: 081. @@ -1032,7 +1032,7 @@ releases. * Menu: -* 0.8.4-pre: 084-pre. +* 0.8.4: 084. * 0.8.3: 083. * 0.8.2: 082. * 0.8.1: 081. @@ -1069,10 +1069,10 @@ releases. * 0.1: 01.  -File: README.info, Node: 084-pre, Next: 083, Up: Changelog +File: README.info, Node: 084, Next: 083, Up: Changelog -5.1 0.8.4-pre -============= +5.1 0.8.4 +========= *Fixes* @@ -1083,7 +1083,7 @@ File: README.info, Node: 084-pre, Next: 083, Up: Changelog surprisingly complicated. Hopefully this is the last fix).  -File: README.info, Node: 083, Next: 082, Prev: 084-pre, Up: Changelog +File: README.info, Node: 083, Next: 082, Prev: 084, Up: Changelog 5.2 0.8.3 ========= @@ -1933,80 +1933,80 @@ GPLv3  Tag Table: Node: Top225 -Node: Contents1915 -Node: Screenshots2038 -Node: Installation2156 -Node: Quelpa2670 -Node: Helm support3198 -Node: Usage3601 -Node: Commands3999 -Node: org-ql-find4464 -Node: org-ql-open-link5372 -Node: org-ql-refile6227 -Node: org-ql-search6555 -Node: helm-org-ql8486 -Node: org-ql-view8864 -Node: org-ql-view-sidebar9394 -Node: org-ql-view-recent-items9774 -Node: org-ql-sparse-tree10270 -Node: Queries11070 -Node: Non-sexp query syntax12187 -Node: General predicates13946 -Node: Ancestor/descendant predicates20871 -Node: Date/time predicates21999 -Node: Functions / Macros25123 -Node: Agenda-like views25421 -Ref: Function org-ql-block25583 -Node: Listing / acting-on results26844 -Ref: Caching27052 -Ref: Function org-ql-select27965 -Ref: Function org-ql-query30391 -Ref: Macro org-ql (deprecated)32165 -Node: Custom predicates32480 -Ref: Macro org-ql-defpred32704 -Node: Dynamic block36145 -Node: Links38869 -Node: Tips39556 -Node: Changelog39880 -Node: 084-pre40760 -Node: 08341212 -Node: 08241557 -Node: 08141950 -Node: 0842371 -Node: 07445095 -Node: 07345318 -Node: 07246050 -Node: 07146969 -Node: 0747778 -Node: 06350644 -Node: 06251177 -Node: 06151484 -Node: 0652054 -Node: 05255110 -Node: 05155412 -Node: 0555837 -Node: 04957368 -Node: 04857650 -Node: 04757999 -Node: 04658408 -Node: 04558816 -Node: 04459177 -Node: 04359536 -Node: 04259739 -Node: 04159900 -Node: 0460147 -Node: 03264248 -Node: 03164651 -Node: 0364848 -Node: 02368148 -Node: 02268382 -Node: 02168662 -Node: 0268867 -Node: 0172945 -Node: Notes73046 -Node: Comparison with Org Agenda searches73208 -Node: org-sidebar74097 -Node: License74376 +Node: Contents1907 +Node: Screenshots2030 +Node: Installation2148 +Node: Quelpa2662 +Node: Helm support3190 +Node: Usage3593 +Node: Commands3991 +Node: org-ql-find4456 +Node: org-ql-open-link5364 +Node: org-ql-refile6219 +Node: org-ql-search6547 +Node: helm-org-ql8478 +Node: org-ql-view8856 +Node: org-ql-view-sidebar9386 +Node: org-ql-view-recent-items9766 +Node: org-ql-sparse-tree10262 +Node: Queries11062 +Node: Non-sexp query syntax12179 +Node: General predicates13938 +Node: Ancestor/descendant predicates20863 +Node: Date/time predicates21991 +Node: Functions / Macros25115 +Node: Agenda-like views25413 +Ref: Function org-ql-block25575 +Node: Listing / acting-on results26836 +Ref: Caching27044 +Ref: Function org-ql-select27957 +Ref: Function org-ql-query30383 +Ref: Macro org-ql (deprecated)32157 +Node: Custom predicates32472 +Ref: Macro org-ql-defpred32696 +Node: Dynamic block36137 +Node: Links38861 +Node: Tips39548 +Node: Changelog39872 +Node: 08440744 +Node: 08341184 +Node: 08241525 +Node: 08141918 +Node: 0842339 +Node: 07445063 +Node: 07345286 +Node: 07246018 +Node: 07146937 +Node: 0747746 +Node: 06350612 +Node: 06251145 +Node: 06151452 +Node: 0652022 +Node: 05255078 +Node: 05155380 +Node: 0555805 +Node: 04957336 +Node: 04857618 +Node: 04757967 +Node: 04658376 +Node: 04558784 +Node: 04459145 +Node: 04359504 +Node: 04259707 +Node: 04159868 +Node: 0460115 +Node: 03264216 +Node: 03164619 +Node: 0364816 +Node: 02368116 +Node: 02268350 +Node: 02168630 +Node: 0268835 +Node: 0172913 +Node: Notes73014 +Node: Comparison with Org Agenda searches73176 +Node: org-sidebar74065 +Node: License74344  End Tag Table From 9c63a458211c2b6214f352fdd80f2363a761d42e Mon Sep 17 00:00:00 2001 From: Adam Porter Date: Sat, 13 Jan 2024 00:47:35 -0600 Subject: [PATCH 10/70] Meta: Update makem.sh --- makem.sh | 71 +++++++++++++++++++++++++++++++++++++++++++++----------- 1 file changed, 57 insertions(+), 14 deletions(-) diff --git a/makem.sh b/makem.sh index 82a2db0..c320e5d 100755 --- a/makem.sh +++ b/makem.sh @@ -3,7 +3,7 @@ # * makem.sh --- Script to aid building and testing Emacs Lisp packages # URL: https://github.com/alphapapa/makem.sh -# Version: 0.6-pre +# Version: 0.7 # * Commentary: @@ -112,6 +112,12 @@ Source files are automatically discovered from git, or may be specified with options. Package dependencies are discovered from "Package-Requires" headers in source files, from -pkg.el files, and from a Cask file. + +Checkdoc's spell checker may not recognize some words, causing the +`lint-checkdoc' rule to fail. Custom words can be added in file-local +or directory-local variables using the variable +`ispell-buffer-session-localwords', which should be set to a list of +strings. EOF } @@ -177,6 +183,7 @@ function elisp-checkdoc-file { (setq makem-checkdoc-errors-p t) ;; Return nil because we *are* generating a buffered list of errors. nil)))) + (put 'ispell-buffer-session-localwords 'safe-local-variable #'list-of-strings-p) (mapcar #'checkdoc-file files) (when makem-checkdoc-errors-p (kill-emacs 1)))) @@ -379,6 +386,36 @@ function byte-compile-file { # ** Files +function submodules { + # Echo a list of submodules's paths relative to the repo root. + # TODO: Parse with bash regexp instead of cut. + git submodule status | awk '{print $2}' +} + +function project-root { + # Echo the root of the project (or superproject, if running from + # within a submodule). + root_dir=$(git rev-parse --show-superproject-working-tree) + [[ $root_dir ]] || root_dir=$(git rev-parse --show-toplevel) + [[ $root_dir ]] || error "Can't find repo root." + + echo "$root_dir" +} + +function files-project { + # Echo a list of files in project; or with $1, files in it + # matching that pattern with "git ls-files". Excludes submodules. + [[ $1 ]] && pattern="/$1" || pattern="." + + local excludes + for submodule in $(submodules) + do + excludes+=(":!:$submodule") + done + + git ls-files -- "$pattern" "${excludes[@]}" +} + function dirs-project { # Echo list of directories to be used in load path. files-project-feature | dirnames @@ -387,7 +424,7 @@ function dirs-project { function files-project-elisp { # Echo list of Elisp files in project. - git ls-files 2>/dev/null \ + files-project 2>/dev/null \ | egrep "\.el$" \ | filter-files-exclude-default \ | filter-files-exclude-args @@ -396,13 +433,13 @@ function files-project-elisp { function files-project-feature { # Echo list of Elisp files that are not tests and provide a feature. files-project-elisp \ - | egrep -v "$test_files_regexp" \ + | grep -E -v "$test_files_regexp" \ | filter-files-feature } function files-project-test { # Echo list of Elisp test files. - files-project-elisp | egrep "$test_files_regexp" + files-project-elisp | grep -E "$test_files_regexp" } function dirnames { @@ -415,7 +452,7 @@ function dirnames { function filter-files-exclude-default { # Filter out paths (STDIN) which should be excluded by default. - egrep -v "(/\.cask/|-autoloads.el|.dir-locals)" + grep -E -v "(/\.cask/|-autoloads\.el|\.dir-locals)" } function filter-files-exclude-args { @@ -441,7 +478,7 @@ function filter-files-feature { # Read paths on STDIN and echo ones that (provide 'a-feature). while read path do - egrep "^\\(provide '" "$path" &>/dev/null \ + grep -E "^\\(provide '" "$path" &>/dev/null \ && echo "$path" done } @@ -489,7 +526,7 @@ function ert-tests-p { function package-main-file { # Echo the package's main file. - file_pkg=$(git ls-files ./*-pkg.el 2>/dev/null) + file_pkg=$(files-project "*-pkg.el" 2>/dev/null) if [[ $file_pkg ]] then @@ -512,23 +549,23 @@ function dependencies { # Search package headers. Use -a so grep won't think that an Elisp file containing # control characters (rare, but sometimes necessary) is binary and refuse to search it. - egrep -a -i '^;; Package-Requires: ' $(files-project-feature) $(files-project-test) \ - | egrep -o '\([^([:space:]][^)]*\)' \ - | egrep -o '^[^[:space:])]+' \ + grep -E -a -i '^;; Package-Requires: ' $(files-project-feature) $(files-project-test) \ + | grep -E -o '\([^([:space:]][^)]*\)' \ + | grep -E -o '^[^[:space:])]+' \ | sed -r 's/\(//g' \ - | egrep -v '^emacs$' # Ignore Emacs version requirement. + | grep -E -v '^emacs$' # Ignore Emacs version requirement. # Search Cask file. if [[ -r Cask ]] then - egrep '\(depends-on "[^"]+"' Cask \ + grep -E '\(depends-on "[^"]+"' Cask \ | sed -r -e 's/\(depends-on "([^"]+)".*/\1/g' fi # Search -pkg.el file. - if [[ $(git ls-files ./*-pkg.el 2>/dev/null) ]] + if [[ $(files-project "*-pkg.el" 2>/dev/null) ]] then - sed -nr 's/.*\(([-[:alnum:]]+)[[:blank:]]+"[.[:digit:]]+"\).*/\1/p' $(git ls-files ./*-pkg.el 2>/dev/null) + sed -nr 's/.*\(([-[:alnum:]]+)[[:blank:]]+"[.[:digit:]]+"\).*/\1/p' $(files-project- -- -pkg.el 2>/dev/null) fi } @@ -581,6 +618,9 @@ function sandbox { local deps=($(dependencies)) debug "Installing dependencies: ${deps[@]}" + # Ensure built-in packages get upgraded to newer versions from ELPA. + args_sandbox_package_install+=(--eval "(setq package-install-upgrade-built-in t)") + for package in "${deps[@]}" do args_sandbox_package_install+=(--eval "(package-install '$package)") @@ -1193,6 +1233,9 @@ paths_temp+=("$package_initialize_file") trap cleanup EXIT INT TERM +# Change to project root directory first. +cd "$(project-root)" + # Discover project files. files_project_feature=($(files-project-feature)) files_project_test=($(files-project-test)) From 8d3c93b8838bd5d5347dd8962b68cc3cabcf0147 Mon Sep 17 00:00:00 2001 From: Adam Porter Date: Sat, 13 Jan 2024 00:47:47 -0600 Subject: [PATCH 11/70] Tidy: Compiler warning I've no explanation for why this isn't caught by makem.sh's linting compilation and declarations, but somehow it shows up at installation time. --- org-ql-completing-read.el | 2 ++ 1 file changed, 2 insertions(+) diff --git a/org-ql-completing-read.el b/org-ql-completing-read.el index 4db51e6..640033d 100644 --- a/org-ql-completing-read.el +++ b/org-ql-completing-read.el @@ -26,6 +26,8 @@ (require 'org-ql) +(declare-function org-ql-search "org-ql-search") + ;;;; Variables (defvar-keymap org-ql-completing-read-map From 770e60766a8f309943d68c1e7234e109904360ba Mon Sep 17 00:00:00 2001 From: Adam Porter Date: Wed, 21 Feb 2024 04:51:30 -0600 Subject: [PATCH 12/70] Meta: v0.8.5-pre --- README.org | 4 + org-ql.el | 2 +- org-ql.info | 233 +++++++++++++++++++++++++++------------------------- 3 files changed, 127 insertions(+), 112 deletions(-) diff --git a/README.org b/README.org index 9175943..a1af574 100644 --- a/README.org +++ b/README.org @@ -553,6 +553,10 @@ Simple links may also be written manually in either sexp or non-sexp form, like: /Note:/ Breaking changes may be made before version 1.0, but in the event of major changes, attempts at backward compatibility will be made with obsolescence declarations, translation of arguments, etc. Users who need stability guarantees before 1.0 may choose to use tagged stable releases. +** 0.8.5-pre + +Nothing new yet. + ** 0.8.4 *Fixes* diff --git a/org-ql.el b/org-ql.el index 9f24c03..28e1b0f 100644 --- a/org-ql.el +++ b/org-ql.el @@ -4,7 +4,7 @@ ;; Author: Adam Porter ;; Url: https://github.com/alphapapa/org-ql -;; Version: 0.8.4 +;; Version: 0.8.5-pre ;; Package-Requires: ((emacs "27.1") (compat "29.1") (dash "2.18.1") (f "0.17.2") (map "2.1") (org "9.0") (org-super-agenda "1.2") (ov "1.0.6") (peg "1.0.1") (s "1.12.0") (transient "0.1") (ts "0.2-pre")) ;; Keywords: hypermedia, outlines, Org, agenda diff --git a/org-ql.info b/org-ql.info index 0ce52d0..a0cfe4a 100644 --- a/org-ql.info +++ b/org-ql.info @@ -72,6 +72,7 @@ Functions / Macros Changelog +* 0.8.5-pre: 085-pre. * 0.8.4: 084. * 0.8.3: 083. * 0.8.2: 082. @@ -1032,6 +1033,7 @@ releases. * Menu: +* 0.8.5-pre: 085-pre. * 0.8.4: 084. * 0.8.3: 083. * 0.8.2: 082. @@ -1069,9 +1071,17 @@ releases. * 0.1: 01.  -File: README.info, Node: 084, Next: 083, Up: Changelog +File: README.info, Node: 085-pre, Next: 084, Up: Changelog -5.1 0.8.4 +5.1 0.8.5-pre +============= + +Nothing new yet. + + +File: README.info, Node: 084, Next: 083, Prev: 085-pre, Up: Changelog + +5.2 0.8.4 ========= *Fixes* @@ -1085,7 +1095,7 @@ File: README.info, Node: 084, Next: 083, Up: Changelog  File: README.info, Node: 083, Next: 082, Prev: 084, Up: Changelog -5.2 0.8.3 +5.3 0.8.3 ========= *Fixes* @@ -1098,7 +1108,7 @@ File: README.info, Node: 083, Next: 082, Prev: 084, Up: Changelog  File: README.info, Node: 082, Next: 081, Prev: 083, Up: Changelog -5.3 0.8.2 +5.4 0.8.2 ========= *Fixes* @@ -1112,7 +1122,7 @@ File: README.info, Node: 082, Next: 081, Prev: 083, Up: Changelog  File: README.info, Node: 081, Next: 08, Prev: 082, Up: Changelog -5.4 0.8.1 +5.5 0.8.1 ========= *Fixes* @@ -1127,7 +1137,7 @@ File: README.info, Node: 081, Next: 08, Prev: 082, Up: Changelog  File: README.info, Node: 08, Next: 074, Prev: 081, Up: Changelog -5.5 0.8 +5.6 0.8 ======= *Additions* @@ -1183,7 +1193,7 @@ File: README.info, Node: 08, Next: 074, Prev: 081, Up: Changelog  File: README.info, Node: 074, Next: 073, Prev: 08, Up: Changelog -5.6 0.7.4 +5.7 0.7.4 ========= *Fixes* @@ -1193,7 +1203,7 @@ File: README.info, Node: 074, Next: 073, Prev: 08, Up: Changelog  File: README.info, Node: 073, Next: 072, Prev: 074, Up: Changelog -5.7 0.7.3 +5.8 0.7.3 ========= *Fixes* @@ -1211,7 +1221,7 @@ File: README.info, Node: 073, Next: 072, Prev: 074, Up: Changelog  File: README.info, Node: 072, Next: 071, Prev: 073, Up: Changelog -5.8 0.7.2 +5.9 0.7.2 ========= *Fixes* @@ -1232,8 +1242,8 @@ File: README.info, Node: 072, Next: 071, Prev: 073, Up: Changelog  File: README.info, Node: 071, Next: 07, Prev: 072, Up: Changelog -5.9 0.7.1 -========= +5.10 0.7.1 +========== *Fixes* • Function ‘org-ql-completing-read’ is more compatible with default @@ -1251,7 +1261,7 @@ File: README.info, Node: 071, Next: 07, Prev: 072, Up: Changelog  File: README.info, Node: 07, Next: 063, Prev: 071, Up: Changelog -5.10 0.7 +5.11 0.7 ======== *Added* @@ -1310,7 +1320,7 @@ File: README.info, Node: 07, Next: 063, Prev: 071, Up: Changelog  File: README.info, Node: 063, Next: 062, Prev: 07, Up: Changelog -5.11 0.6.3 +5.12 0.6.3 ========== *Fixed* @@ -1326,7 +1336,7 @@ File: README.info, Node: 063, Next: 062, Prev: 07, Up: Changelog  File: README.info, Node: 062, Next: 061, Prev: 063, Up: Changelog -5.12 0.6.2 +5.13 0.6.2 ========== *Fixed* @@ -1337,7 +1347,7 @@ File: README.info, Node: 062, Next: 061, Prev: 063, Up: Changelog  File: README.info, Node: 061, Next: 06, Prev: 062, Up: Changelog -5.13 0.6.1 +5.14 0.6.1 ========== *Fixed* @@ -1355,7 +1365,7 @@ File: README.info, Node: 061, Next: 06, Prev: 062, Up: Changelog  File: README.info, Node: 06, Next: 052, Prev: 061, Up: Changelog -5.14 0.6 +5.15 0.6 ======== *Added* @@ -1422,7 +1432,7 @@ File: README.info, Node: 06, Next: 052, Prev: 061, Up: Changelog  File: README.info, Node: 052, Next: 051, Prev: 06, Up: Changelog -5.15 0.5.2 +5.16 0.5.2 ========== *Fixed* @@ -1433,7 +1443,7 @@ File: README.info, Node: 052, Next: 051, Prev: 06, Up: Changelog  File: README.info, Node: 051, Next: 05, Prev: 052, Up: Changelog -5.16 0.5.1 +5.17 0.5.1 ========== *Fixed* @@ -1446,7 +1456,7 @@ File: README.info, Node: 051, Next: 05, Prev: 052, Up: Changelog  File: README.info, Node: 05, Next: 049, Prev: 051, Up: Changelog -5.17 0.5 +5.18 0.5 ======== *Added* @@ -1487,7 +1497,7 @@ File: README.info, Node: 05, Next: 049, Prev: 051, Up: Changelog  File: README.info, Node: 049, Next: 048, Prev: 05, Up: Changelog -5.18 0.4.9 +5.19 0.4.9 ========== *Fixed* @@ -1498,7 +1508,7 @@ File: README.info, Node: 049, Next: 048, Prev: 05, Up: Changelog  File: README.info, Node: 048, Next: 047, Prev: 049, Up: Changelog -5.19 0.4.8 +5.20 0.4.8 ========== *Fixed* @@ -1510,7 +1520,7 @@ File: README.info, Node: 048, Next: 047, Prev: 049, Up: Changelog  File: README.info, Node: 047, Next: 046, Prev: 048, Up: Changelog -5.20 0.4.7 +5.21 0.4.7 ========== *Fixed* @@ -1523,7 +1533,7 @@ File: README.info, Node: 047, Next: 046, Prev: 048, Up: Changelog  File: README.info, Node: 046, Next: 045, Prev: 047, Up: Changelog -5.21 0.4.6 +5.22 0.4.6 ========== *Fixed* @@ -1536,7 +1546,7 @@ File: README.info, Node: 046, Next: 045, Prev: 047, Up: Changelog  File: README.info, Node: 045, Next: 044, Prev: 046, Up: Changelog -5.22 0.4.5 +5.23 0.4.5 ========== *Fixed* @@ -1548,7 +1558,7 @@ File: README.info, Node: 045, Next: 044, Prev: 046, Up: Changelog  File: README.info, Node: 044, Next: 043, Prev: 045, Up: Changelog -5.23 0.4.4 +5.24 0.4.4 ========== *Fixed* @@ -1560,7 +1570,7 @@ File: README.info, Node: 044, Next: 043, Prev: 045, Up: Changelog  File: README.info, Node: 043, Next: 042, Prev: 044, Up: Changelog -5.24 0.4.3 +5.25 0.4.3 ========== *Fixed* @@ -1570,7 +1580,7 @@ File: README.info, Node: 043, Next: 042, Prev: 044, Up: Changelog  File: README.info, Node: 042, Next: 041, Prev: 043, Up: Changelog -5.25 0.4.2 +5.26 0.4.2 ========== *Fixed* @@ -1579,7 +1589,7 @@ File: README.info, Node: 042, Next: 041, Prev: 043, Up: Changelog  File: README.info, Node: 041, Next: 04, Prev: 042, Up: Changelog -5.26 0.4.1 +5.27 0.4.1 ========== *Fixed* @@ -1589,7 +1599,7 @@ File: README.info, Node: 041, Next: 04, Prev: 042, Up: Changelog  File: README.info, Node: 04, Next: 032, Prev: 041, Up: Changelog -5.27 0.4 +5.28 0.4 ======== _Note:_ The next release, 0.5, may include changes which will require @@ -1670,7 +1680,7 @@ automatically, as they will be pushed to the ‘master’ branch when ready.  File: README.info, Node: 032, Next: 031, Prev: 04, Up: Changelog -5.28 0.3.2 +5.29 0.3.2 ========== *Fixed* @@ -1683,7 +1693,7 @@ File: README.info, Node: 032, Next: 031, Prev: 04, Up: Changelog  File: README.info, Node: 031, Next: 03, Prev: 032, Up: Changelog -5.29 0.3.1 +5.30 0.3.1 ========== *Fixed* @@ -1693,7 +1703,7 @@ File: README.info, Node: 031, Next: 03, Prev: 032, Up: Changelog  File: README.info, Node: 03, Next: 023, Prev: 031, Up: Changelog -5.30 0.3 +5.31 0.3 ======== *Added* @@ -1761,7 +1771,7 @@ File: README.info, Node: 03, Next: 023, Prev: 031, Up: Changelog  File: README.info, Node: 023, Next: 022, Prev: 03, Up: Changelog -5.31 0.2.3 +5.32 0.2.3 ========== *Fixed* @@ -1771,7 +1781,7 @@ File: README.info, Node: 023, Next: 022, Prev: 03, Up: Changelog  File: README.info, Node: 022, Next: 021, Prev: 023, Up: Changelog -5.32 0.2.2 +5.33 0.2.2 ========== *Fixed* @@ -1782,7 +1792,7 @@ File: README.info, Node: 022, Next: 021, Prev: 023, Up: Changelog  File: README.info, Node: 021, Next: 02, Prev: 022, Up: Changelog -5.33 0.2.1 +5.34 0.2.1 ========== *Fixed* @@ -1792,7 +1802,7 @@ File: README.info, Node: 021, Next: 02, Prev: 022, Up: Changelog  File: README.info, Node: 02, Next: 01, Prev: 021, Up: Changelog -5.34 0.2 +5.35 0.2 ======== *Added* @@ -1875,7 +1885,7 @@ File: README.info, Node: 02, Next: 01, Prev: 021, Up: Changelog  File: README.info, Node: 01, Prev: 02, Up: Changelog -5.35 0.1 +5.36 0.1 ======== First tagged release. @@ -1933,80 +1943,81 @@ GPLv3  Tag Table: Node: Top225 -Node: Contents1907 -Node: Screenshots2030 -Node: Installation2148 -Node: Quelpa2662 -Node: Helm support3190 -Node: Usage3593 -Node: Commands3991 -Node: org-ql-find4456 -Node: org-ql-open-link5364 -Node: org-ql-refile6219 -Node: org-ql-search6547 -Node: helm-org-ql8478 -Node: org-ql-view8856 -Node: org-ql-view-sidebar9386 -Node: org-ql-view-recent-items9766 -Node: org-ql-sparse-tree10262 -Node: Queries11062 -Node: Non-sexp query syntax12179 -Node: General predicates13938 -Node: Ancestor/descendant predicates20863 -Node: Date/time predicates21991 -Node: Functions / Macros25115 -Node: Agenda-like views25413 -Ref: Function org-ql-block25575 -Node: Listing / acting-on results26836 -Ref: Caching27044 -Ref: Function org-ql-select27957 -Ref: Function org-ql-query30383 -Ref: Macro org-ql (deprecated)32157 -Node: Custom predicates32472 -Ref: Macro org-ql-defpred32696 -Node: Dynamic block36137 -Node: Links38861 -Node: Tips39548 -Node: Changelog39872 -Node: 08440744 -Node: 08341184 -Node: 08241525 -Node: 08141918 -Node: 0842339 -Node: 07445063 -Node: 07345286 -Node: 07246018 -Node: 07146937 -Node: 0747746 -Node: 06350612 -Node: 06251145 -Node: 06151452 -Node: 0652022 -Node: 05255078 -Node: 05155380 -Node: 0555805 -Node: 04957336 -Node: 04857618 -Node: 04757967 -Node: 04658376 -Node: 04558784 -Node: 04459145 -Node: 04359504 -Node: 04259707 -Node: 04159868 -Node: 0460115 -Node: 03264216 -Node: 03164619 -Node: 0364816 -Node: 02368116 -Node: 02268350 -Node: 02168630 -Node: 0268835 -Node: 0172913 -Node: Notes73014 -Node: Comparison with Org Agenda searches73176 -Node: org-sidebar74065 -Node: License74344 +Node: Contents1929 +Node: Screenshots2052 +Node: Installation2170 +Node: Quelpa2684 +Node: Helm support3212 +Node: Usage3615 +Node: Commands4013 +Node: org-ql-find4478 +Node: org-ql-open-link5386 +Node: org-ql-refile6241 +Node: org-ql-search6569 +Node: helm-org-ql8500 +Node: org-ql-view8878 +Node: org-ql-view-sidebar9408 +Node: org-ql-view-recent-items9788 +Node: org-ql-sparse-tree10284 +Node: Queries11084 +Node: Non-sexp query syntax12201 +Node: General predicates13960 +Node: Ancestor/descendant predicates20885 +Node: Date/time predicates22013 +Node: Functions / Macros25137 +Node: Agenda-like views25435 +Ref: Function org-ql-block25597 +Node: Listing / acting-on results26858 +Ref: Caching27066 +Ref: Function org-ql-select27979 +Ref: Function org-ql-query30405 +Ref: Macro org-ql (deprecated)32179 +Node: Custom predicates32494 +Ref: Macro org-ql-defpred32718 +Node: Dynamic block36159 +Node: Links38883 +Node: Tips39570 +Node: Changelog39894 +Node: 085-pre40788 +Node: 08440900 +Node: 08341356 +Node: 08241697 +Node: 08142090 +Node: 0842511 +Node: 07445235 +Node: 07345458 +Node: 07246190 +Node: 07147109 +Node: 0747920 +Node: 06350786 +Node: 06251319 +Node: 06151626 +Node: 0652196 +Node: 05255252 +Node: 05155554 +Node: 0555979 +Node: 04957510 +Node: 04857792 +Node: 04758141 +Node: 04658550 +Node: 04558958 +Node: 04459319 +Node: 04359678 +Node: 04259881 +Node: 04160042 +Node: 0460289 +Node: 03264390 +Node: 03164793 +Node: 0364990 +Node: 02368290 +Node: 02268524 +Node: 02168804 +Node: 0269009 +Node: 0173087 +Node: Notes73188 +Node: Comparison with Org Agenda searches73350 +Node: org-sidebar74239 +Node: License74518  End Tag Table From b6efba9aebe24794101afd608ab60322e6e73277 Mon Sep 17 00:00:00 2001 From: Adam Porter Date: Wed, 21 Feb 2024 04:57:44 -0600 Subject: [PATCH 13/70] Fix: (heading) Don't match strings as regexps Reported-by: Alex Popescu --- README.org | 3 +- org-ql.el | 36 ++++--------------- org-ql.info | 85 +++++++++++++++++++++++--------------------- tests/test-org-ql.el | 10 ++++-- 4 files changed, 61 insertions(+), 73 deletions(-) diff --git a/README.org b/README.org index a1af574..d122bdd 100644 --- a/README.org +++ b/README.org @@ -555,7 +555,8 @@ Simple links may also be written manually in either sexp or non-sexp form, like: ** 0.8.5-pre -Nothing new yet. +*Fixes* ++ Predicate ~heading~ incorrectly matched strings as regular expressions, sometimes returning incorrect results. (See [[https://github.com/alphapapa/org-ql/discussions/410][discussion]]. Thanks to [[https://github.com/al3xandru][Alex Popescu]] for reporting.) ** 0.8.4 diff --git a/org-ql.el b/org-ql.el index 28e1b0f..da4456e 100644 --- a/org-ql.el +++ b/org-ql.el @@ -1461,40 +1461,16 @@ Org effort string, like \"5\" or \"0:05\"." (list :regexp (rx bol (0+ space) ":STYLE:" (1+ space) "habit" (0+ space) eol)))) :body (org-is-habit-p)) -(org-ql-defpred (heading h) (&rest strings) +(org-ql-defpred (heading h) (&rest _strings) "Return non-nil if current entry's heading matches all STRINGS. Matching is done case-insensitively." :coalesce t :normalizers ((`(,predicate-names . ,args) - ;; "h" alias. - `(heading ,@args))) - ;; TODO: Adjust regexp to avoid matching in tag list. - :preambles ((`(,predicate-names) - ;; This clause protects against the case in which the - ;; arguments are nil, which would cause an error in - ;; `rx-to-string' in other clauses. This can happen - ;; with `org-ql-completing-read', e.g. when the input - ;; is "h:" while the user is typing. - (list :regexp (rx bol (1+ "*") (1+ blank) (0+ nonl)) - :case-fold t :query query)) - (`(,predicate-names ,string) - ;; Only one string: match with preamble, then let predicate confirm (because - ;; the match could be in e.g. the tags rather than the heading text). - (list :regexp (rx-to-string `(seq bol (1+ "*") (1+ blank) (0+ nonl) - ,string) - 'no-group) - :case-fold t :query query)) - (`(,predicate-names . ,strings) - ;; Multiple strings: use preamble to match against first - ;; string, then let the predicate match the rest. - (list :regexp (rx-to-string `(seq bol (1+ "*") (1+ blank) (0+ nonl) - ,(car strings)) - 'no-group) - :case-fold t :query query))) - ;; TODO: In Org 9.2+, `org-get-heading' takes 2 more arguments. - :body (let ((heading (org-get-heading 'no-tags 'no-todo)) - (case-fold-search t)) - (--all? (string-match it heading) strings))) + ;; NOTE: Each string argument must be converted to a regexp + ;; for testing by the body, so we just normalize to the + ;; `heading-regexp' predicate, leaving this predicate as + ;; one that merely regexp-quotes its arguments. + `(heading-regexp ,@(mapcar #'regexp-quote args))))) (org-ql-defpred (heading-regexp h*) (&rest regexps) "Return non-nil if current entry's heading matches all REGEXPS (regexp strings). diff --git a/org-ql.info b/org-ql.info index a0cfe4a..33a3dca 100644 --- a/org-ql.info +++ b/org-ql.info @@ -1076,7 +1076,12 @@ File: README.info, Node: 085-pre, Next: 084, Up: Changelog 5.1 0.8.5-pre ============= -Nothing new yet. +*Fixes* + • Predicate ‘heading’ incorrectly matched strings as regular + expressions, sometimes returning incorrect results. (See + discussion (https://github.com/alphapapa/org-ql/discussions/410). + Thanks to Alex Popescu (https://github.com/al3xandru) for + reporting.)  File: README.info, Node: 084, Next: 083, Prev: 085-pre, Up: Changelog @@ -1979,45 +1984,45 @@ Node: Links38883 Node: Tips39570 Node: Changelog39894 Node: 085-pre40788 -Node: 08440900 -Node: 08341356 -Node: 08241697 -Node: 08142090 -Node: 0842511 -Node: 07445235 -Node: 07345458 -Node: 07246190 -Node: 07147109 -Node: 0747920 -Node: 06350786 -Node: 06251319 -Node: 06151626 -Node: 0652196 -Node: 05255252 -Node: 05155554 -Node: 0555979 -Node: 04957510 -Node: 04857792 -Node: 04758141 -Node: 04658550 -Node: 04558958 -Node: 04459319 -Node: 04359678 -Node: 04259881 -Node: 04160042 -Node: 0460289 -Node: 03264390 -Node: 03164793 -Node: 0364990 -Node: 02368290 -Node: 02268524 -Node: 02168804 -Node: 0269009 -Node: 0173087 -Node: Notes73188 -Node: Comparison with Org Agenda searches73350 -Node: org-sidebar74239 -Node: License74518 +Node: 08441175 +Node: 08341631 +Node: 08241972 +Node: 08142365 +Node: 0842786 +Node: 07445510 +Node: 07345733 +Node: 07246465 +Node: 07147384 +Node: 0748195 +Node: 06351061 +Node: 06251594 +Node: 06151901 +Node: 0652471 +Node: 05255527 +Node: 05155829 +Node: 0556254 +Node: 04957785 +Node: 04858067 +Node: 04758416 +Node: 04658825 +Node: 04559233 +Node: 04459594 +Node: 04359953 +Node: 04260156 +Node: 04160317 +Node: 0460564 +Node: 03264665 +Node: 03165068 +Node: 0365265 +Node: 02368565 +Node: 02268799 +Node: 02169079 +Node: 0269284 +Node: 0173362 +Node: Notes73463 +Node: Comparison with Org Agenda searches73625 +Node: org-sidebar74514 +Node: License74793  End Tag Table diff --git a/tests/test-org-ql.el b/tests/test-org-ql.el index 7bf6a9b..247fa78 100644 --- a/tests/test-org-ql.el +++ b/tests/test-org-ql.el @@ -218,7 +218,8 @@ with keyword arg NOW in PLIST." (it "coalesces a single AND clause that uses two predicates (and preserves predicate order)" (expect (org-ql--normalize-query '(and (rifle "foo") (rifle "bar") (heading "baz") (heading "buz"))) - :to-equal '(and (rifle :regexps '("foo" "bar")) (heading "baz" "buz")))) + ;; NOTE: `heading' is normalized to `heading-regexp'. + :to-equal '(and (rifle :regexps '("foo" "bar")) (heading-regexp "baz" "buz")))) (it "preserves independent OR clauses" (expect (org-ql--normalize-query '(and (or (rifle "foo") (rifle "bar")) (or (rifle "baz") (rifle "buz")))) @@ -1112,7 +1113,12 @@ with keyword arg NOW in PLIST." '("Take over the world"))) (org-ql-it "with two arguments" (org-ql-expect ('(heading "Take over" "world")) - '("Take over the world")))) + '("Take over the world"))) + (org-ql-it "does not match strings as regexps" + (org-ql-expect ('(heading "over")) + '("Take over the universe" "Take over the world" "Take over Mars" "Take over the moon")) + (org-ql-expect ('(heading "[over]")) + nil))) (describe "(heading-regexp)" (org-ql-it "with one argument" From c90bae0eabad948dad0b693f1005b79eec457f30 Mon Sep 17 00:00:00 2001 From: Adam Porter Date: Wed, 21 Feb 2024 05:41:49 -0600 Subject: [PATCH 14/70] Fix: (ancestors, parent) Normalize sub-queries I'm not sure why calling the REC labeled function didn't correctly normalize these sub-queries; it seemed to only normalize for one round, leaving some queries incorrectly normalized. But this fixes it. Fixes #365. Reported-by: Gabriele Mongiano --- README.org | 1 + org-ql.el | 4 +-- org-ql.info | 82 +++++++++++++++++++++++--------------------- tests/test-org-ql.el | 12 +++++++ 4 files changed, 58 insertions(+), 41 deletions(-) diff --git a/README.org b/README.org index d122bdd..4d9fcbe 100644 --- a/README.org +++ b/README.org @@ -557,6 +557,7 @@ Simple links may also be written manually in either sexp or non-sexp form, like: *Fixes* + Predicate ~heading~ incorrectly matched strings as regular expressions, sometimes returning incorrect results. (See [[https://github.com/alphapapa/org-ql/discussions/410][discussion]]. Thanks to [[https://github.com/al3xandru][Alex Popescu]] for reporting.) ++ Predicates ~ancestor~ and ~parent~ did not normalize their sub-queries, sometimes returning incorrect results. ([[https://github.com/alphapapa/org-ql/issues/365][#365]]. Thanks to [[https://github.com/kofm][Gabriele Mongiano]] for reporting.) ** 0.8.4 diff --git a/org-ql.el b/org-ql.el index da4456e..2bc33f5 100644 --- a/org-ql.el +++ b/org-ql.el @@ -2077,7 +2077,7 @@ With KEYWORDS, return non-nil if its keyword is one of KEYWORDS." :normalizers ((`(,predicate-names ;; Avoid infinitely compiling already-compiled functions. ,(and query (guard (not (byte-code-function-p query))))) - `(ancestors ,(org-ql--query-predicate (rec query)))) + `(ancestors ,(org-ql--query-predicate (org-ql--normalize-query query)))) (`(,predicate-names) '(ancestors (lambda () t)))) :body (org-with-wide-buffer @@ -2089,7 +2089,7 @@ With KEYWORDS, return non-nil if its keyword is one of KEYWORDS." :normalizers ((`(,predicate-names ;; Avoid infinitely compiling already-compiled functions. ,(and query (guard (not (byte-code-function-p query))))) - `(parent ,(org-ql--query-predicate (rec query)))) + `(parent ,(org-ql--query-predicate (org-ql--normalize-query query)))) (`(,predicate-names) '(parent (lambda () t)))) :body (org-with-wide-buffer diff --git a/org-ql.info b/org-ql.info index 33a3dca..f17deee 100644 --- a/org-ql.info +++ b/org-ql.info @@ -1082,6 +1082,10 @@ File: README.info, Node: 085-pre, Next: 084, Up: Changelog discussion (https://github.com/alphapapa/org-ql/discussions/410). Thanks to Alex Popescu (https://github.com/al3xandru) for reporting.) + • Predicates ‘ancestor’ and ‘parent’ did not normalize their + sub-queries, sometimes returning incorrect results. (#365 + (https://github.com/alphapapa/org-ql/issues/365). Thanks to + Gabriele Mongiano (https://github.com/kofm) for reporting.)  File: README.info, Node: 084, Next: 083, Prev: 085-pre, Up: Changelog @@ -1984,45 +1988,45 @@ Node: Links38883 Node: Tips39570 Node: Changelog39894 Node: 085-pre40788 -Node: 08441175 -Node: 08341631 -Node: 08241972 -Node: 08142365 -Node: 0842786 -Node: 07445510 -Node: 07345733 -Node: 07246465 -Node: 07147384 -Node: 0748195 -Node: 06351061 -Node: 06251594 -Node: 06151901 -Node: 0652471 -Node: 05255527 -Node: 05155829 -Node: 0556254 -Node: 04957785 -Node: 04858067 -Node: 04758416 -Node: 04658825 -Node: 04559233 -Node: 04459594 -Node: 04359953 -Node: 04260156 -Node: 04160317 -Node: 0460564 -Node: 03264665 -Node: 03165068 -Node: 0365265 -Node: 02368565 -Node: 02268799 -Node: 02169079 -Node: 0269284 -Node: 0173362 -Node: Notes73463 -Node: Comparison with Org Agenda searches73625 -Node: org-sidebar74514 -Node: License74793 +Node: 08441444 +Node: 08341900 +Node: 08242241 +Node: 08142634 +Node: 0843055 +Node: 07445779 +Node: 07346002 +Node: 07246734 +Node: 07147653 +Node: 0748464 +Node: 06351330 +Node: 06251863 +Node: 06152170 +Node: 0652740 +Node: 05255796 +Node: 05156098 +Node: 0556523 +Node: 04958054 +Node: 04858336 +Node: 04758685 +Node: 04659094 +Node: 04559502 +Node: 04459863 +Node: 04360222 +Node: 04260425 +Node: 04160586 +Node: 0460833 +Node: 03264934 +Node: 03165337 +Node: 0365534 +Node: 02368834 +Node: 02269068 +Node: 02169348 +Node: 0269553 +Node: 0173631 +Node: Notes73732 +Node: Comparison with Org Agenda searches73894 +Node: org-sidebar74783 +Node: License75062  End Tag Table diff --git a/tests/test-org-ql.el b/tests/test-org-ql.el index 247fa78..8d2b84c 100644 --- a/tests/test-org-ql.el +++ b/tests/test-org-ql.el @@ -254,6 +254,18 @@ with keyword arg NOW in PLIST." (expect (org-ql--normalize-query "\"quoted phrase\"") :to-equal '(rifle :regexps '("\"quoted phrase\"")))) + (describe "Ancestor/Parent predicates" + ;; NOTE: Because the ancestor and parent predicates byte-compile their + ;; subquery predicates, we have to test the byte-compiled forms here. + (expect (org-ql--normalize-query '(ancestors "scheduled")) + ;; No colon after keyword, so not a predicate query. + :to-equal ;; '(ancestors (rifle :regexps '("scheduled"))) + `(ancestors #[nil "\300\301\302\"\207" [rifle :regexps ("scheduled")] 3])) + (expect (org-ql--normalize-query '(parent "scheduled")) + ;; No colon after keyword, so not a predicate query. + :to-equal ;; '(parent (rifle :regexps '("scheduled"))) + `(parent #[nil "\300\301\302\"\207" [rifle :regexps ("scheduled")] 3]))) + (describe "Plain strings" (it "normalizes plain strings to the default predicate (using AND)" (expect (org-ql--normalize-query '(and "string1" "string2")) From bfff0b5517d55d01bf12de27e10a73c9a077767b Mon Sep 17 00:00:00 2001 From: Adam Porter Date: Wed, 21 Feb 2024 05:46:04 -0600 Subject: [PATCH 15/70] Release: v0.8.5 --- README.org | 2 +- org-ql.el | 2 +- org-ql.info | 162 ++++++++++++++++++++++++++-------------------------- 3 files changed, 83 insertions(+), 83 deletions(-) diff --git a/README.org b/README.org index 4d9fcbe..39f18c5 100644 --- a/README.org +++ b/README.org @@ -553,7 +553,7 @@ Simple links may also be written manually in either sexp or non-sexp form, like: /Note:/ Breaking changes may be made before version 1.0, but in the event of major changes, attempts at backward compatibility will be made with obsolescence declarations, translation of arguments, etc. Users who need stability guarantees before 1.0 may choose to use tagged stable releases. -** 0.8.5-pre +** 0.8.5 *Fixes* + Predicate ~heading~ incorrectly matched strings as regular expressions, sometimes returning incorrect results. (See [[https://github.com/alphapapa/org-ql/discussions/410][discussion]]. Thanks to [[https://github.com/al3xandru][Alex Popescu]] for reporting.) diff --git a/org-ql.el b/org-ql.el index 2bc33f5..d1f13a3 100644 --- a/org-ql.el +++ b/org-ql.el @@ -4,7 +4,7 @@ ;; Author: Adam Porter ;; Url: https://github.com/alphapapa/org-ql -;; Version: 0.8.5-pre +;; Version: 0.8.5 ;; Package-Requires: ((emacs "27.1") (compat "29.1") (dash "2.18.1") (f "0.17.2") (map "2.1") (org "9.0") (org-super-agenda "1.2") (ov "1.0.6") (peg "1.0.1") (s "1.12.0") (transient "0.1") (ts "0.2-pre")) ;; Keywords: hypermedia, outlines, Org, agenda diff --git a/org-ql.info b/org-ql.info index f17deee..ec5076b 100644 --- a/org-ql.info +++ b/org-ql.info @@ -72,7 +72,7 @@ Functions / Macros Changelog -* 0.8.5-pre: 085-pre. +* 0.8.5: 085. * 0.8.4: 084. * 0.8.3: 083. * 0.8.2: 082. @@ -1033,7 +1033,7 @@ releases. * Menu: -* 0.8.5-pre: 085-pre. +* 0.8.5: 085. * 0.8.4: 084. * 0.8.3: 083. * 0.8.2: 082. @@ -1071,10 +1071,10 @@ releases. * 0.1: 01.  -File: README.info, Node: 085-pre, Next: 084, Up: Changelog +File: README.info, Node: 085, Next: 084, Up: Changelog -5.1 0.8.5-pre -============= +5.1 0.8.5 +========= *Fixes* • Predicate ‘heading’ incorrectly matched strings as regular @@ -1088,7 +1088,7 @@ File: README.info, Node: 085-pre, Next: 084, Up: Changelog Gabriele Mongiano (https://github.com/kofm) for reporting.)  -File: README.info, Node: 084, Next: 083, Prev: 085-pre, Up: Changelog +File: README.info, Node: 084, Next: 083, Prev: 085, Up: Changelog 5.2 0.8.4 ========= @@ -1952,81 +1952,81 @@ GPLv3  Tag Table: Node: Top225 -Node: Contents1929 -Node: Screenshots2052 -Node: Installation2170 -Node: Quelpa2684 -Node: Helm support3212 -Node: Usage3615 -Node: Commands4013 -Node: org-ql-find4478 -Node: org-ql-open-link5386 -Node: org-ql-refile6241 -Node: org-ql-search6569 -Node: helm-org-ql8500 -Node: org-ql-view8878 -Node: org-ql-view-sidebar9408 -Node: org-ql-view-recent-items9788 -Node: org-ql-sparse-tree10284 -Node: Queries11084 -Node: Non-sexp query syntax12201 -Node: General predicates13960 -Node: Ancestor/descendant predicates20885 -Node: Date/time predicates22013 -Node: Functions / Macros25137 -Node: Agenda-like views25435 -Ref: Function org-ql-block25597 -Node: Listing / acting-on results26858 -Ref: Caching27066 -Ref: Function org-ql-select27979 -Ref: Function org-ql-query30405 -Ref: Macro org-ql (deprecated)32179 -Node: Custom predicates32494 -Ref: Macro org-ql-defpred32718 -Node: Dynamic block36159 -Node: Links38883 -Node: Tips39570 -Node: Changelog39894 -Node: 085-pre40788 -Node: 08441444 -Node: 08341900 -Node: 08242241 -Node: 08142634 -Node: 0843055 -Node: 07445779 -Node: 07346002 -Node: 07246734 -Node: 07147653 -Node: 0748464 -Node: 06351330 -Node: 06251863 -Node: 06152170 -Node: 0652740 -Node: 05255796 -Node: 05156098 -Node: 0556523 -Node: 04958054 -Node: 04858336 -Node: 04758685 -Node: 04659094 -Node: 04559502 -Node: 04459863 -Node: 04360222 -Node: 04260425 -Node: 04160586 -Node: 0460833 -Node: 03264934 -Node: 03165337 -Node: 0365534 -Node: 02368834 -Node: 02269068 -Node: 02169348 -Node: 0269553 -Node: 0173631 -Node: Notes73732 -Node: Comparison with Org Agenda searches73894 -Node: org-sidebar74783 -Node: License75062 +Node: Contents1921 +Node: Screenshots2044 +Node: Installation2162 +Node: Quelpa2676 +Node: Helm support3204 +Node: Usage3607 +Node: Commands4005 +Node: org-ql-find4470 +Node: org-ql-open-link5378 +Node: org-ql-refile6233 +Node: org-ql-search6561 +Node: helm-org-ql8492 +Node: org-ql-view8870 +Node: org-ql-view-sidebar9400 +Node: org-ql-view-recent-items9780 +Node: org-ql-sparse-tree10276 +Node: Queries11076 +Node: Non-sexp query syntax12193 +Node: General predicates13952 +Node: Ancestor/descendant predicates20877 +Node: Date/time predicates22005 +Node: Functions / Macros25129 +Node: Agenda-like views25427 +Ref: Function org-ql-block25589 +Node: Listing / acting-on results26850 +Ref: Caching27058 +Ref: Function org-ql-select27971 +Ref: Function org-ql-query30397 +Ref: Macro org-ql (deprecated)32171 +Node: Custom predicates32486 +Ref: Macro org-ql-defpred32710 +Node: Dynamic block36151 +Node: Links38875 +Node: Tips39562 +Node: Changelog39886 +Node: 08540772 +Node: 08441416 +Node: 08341868 +Node: 08242209 +Node: 08142602 +Node: 0843023 +Node: 07445747 +Node: 07345970 +Node: 07246702 +Node: 07147621 +Node: 0748432 +Node: 06351298 +Node: 06251831 +Node: 06152138 +Node: 0652708 +Node: 05255764 +Node: 05156066 +Node: 0556491 +Node: 04958022 +Node: 04858304 +Node: 04758653 +Node: 04659062 +Node: 04559470 +Node: 04459831 +Node: 04360190 +Node: 04260393 +Node: 04160554 +Node: 0460801 +Node: 03264902 +Node: 03165305 +Node: 0365502 +Node: 02368802 +Node: 02269036 +Node: 02169316 +Node: 0269521 +Node: 0173599 +Node: Notes73700 +Node: Comparison with Org Agenda searches73862 +Node: org-sidebar74751 +Node: License75030  End Tag Table From e41fe9018a4699532ec875bedddc9746f8e362aa Mon Sep 17 00:00:00 2001 From: Adam Porter Date: Wed, 21 Feb 2024 20:00:39 -0600 Subject: [PATCH 16/70] Docs: Add development section --- README.org | 9 +++ org-ql.info | 200 ++++++++++++++++++++++++++++++---------------------- 2 files changed, 126 insertions(+), 83 deletions(-) diff --git a/README.org b/README.org index 947a37e..0e11006 100644 --- a/README.org +++ b/README.org @@ -19,6 +19,7 @@ It includes three libraries: The =org-ql= library is flexible and may be used as - [[#installation][Installation]] - [[#usage][Usage]] - [[#changelog][Changelog]] +- [[#development][Development]] :END: @@ -949,6 +950,14 @@ Nothing new yet. First tagged release. +* Development + +Bug reports, feature requests, and suggestions are welcome. For patches, see below. + +** Copyright assignment + +While Org QL is currently distributed in MELPA, it's [[https://github.com/alphapapa/org-ql/issues/409][intended]] to merge Org QL into Org mode. When that happens, it will become a part of Emacs and Org, and therefore cumulative contributions of more than 15 lines of code will require that the author assign copyright of such contributions to the FSF. Authors who are interested in doing so may contact [[mailto:assign@gnu.org][assign@gnu.org]] to request the appropriate form. + * Notes :PROPERTIES: :TOC: :ignore this diff --git a/org-ql.info b/org-ql.info index fb0383c..0ecc336 100644 --- a/org-ql.info +++ b/org-ql.info @@ -26,6 +26,7 @@ and saved views. * Installation:: * Usage:: * Changelog:: +* Development:: * Notes:: * License:: @@ -110,6 +111,10 @@ Changelog * 0.2: 02. * 0.1: 01. +Development + +* Copyright assignment:: + Notes * Comparison with Org Agenda searches:: @@ -122,7 +127,7 @@ File: README.info, Node: Contents, Next: Screenshots, Prev: Top, Up: Top 1 Contents ********** - • • • • + • • • • •  File: README.info, Node: Screenshots, Next: Installation, Prev: Contents, Up: Top @@ -1021,7 +1026,7 @@ File: README.info, Node: Tips, Prev: Links, Up: Usage (https://github.com/alphapapa/burly.el).  -File: README.info, Node: Changelog, Next: Notes, Prev: Usage, Up: Top +File: README.info, Node: Changelog, Next: Development, Prev: Usage, Up: Top 5 Changelog *********** @@ -1910,9 +1915,36 @@ File: README.info, Node: 01, Prev: 02, Up: Changelog First tagged release.  -File: README.info, Node: Notes, Next: License, Prev: Changelog, Up: Top +File: README.info, Node: Development, Next: Notes, Prev: Changelog, Up: Top -6 Notes +6 Development +************* + +Bug reports, feature requests, and suggestions are welcome. For +patches, see below. + +* Menu: + +* Copyright assignment:: + + +File: README.info, Node: Copyright assignment, Up: Development + +6.1 Copyright assignment +======================== + +While Org QL is currently distributed in MELPA, it’s intended +(https://github.com/alphapapa/org-ql/issues/409) to merge Org QL into +Org mode. When that happens, it will become a part of Emacs and Org, +and therefore cumulative contributions of more than 15 lines of code +will require that the author assign copyright of such contributions to +the FSF. Authors who are interested in doing so may contact +assign@gnu.org to request the appropriate form. + + +File: README.info, Node: Notes, Next: License, Prev: Development, Up: Top + +7 Notes ******* * Menu: @@ -1923,7 +1955,7 @@ File: README.info, Node: Notes, Next: License, Prev: Changelog, Up: Top  File: README.info, Node: Comparison with Org Agenda searches, Next: org-sidebar, Up: Notes -6.1 Comparison with Org Agenda searches +7.1 Comparison with Org Agenda searches ======================================= Of course, queries like these can already be written with Org Agenda @@ -1943,7 +1975,7 @@ todo:TO-READ’, or in Lisp syntax, ‘(and "lisp" (todo "TO-READ"))’.  File: README.info, Node: org-sidebar, Prev: Comparison with Org Agenda searches, Up: Notes -6.2 org-sidebar +7.2 org-sidebar =============== This package is used by org-sidebar @@ -1953,7 +1985,7 @@ customizable agenda-like view in a sidebar window.  File: README.info, Node: License, Prev: Notes, Up: Top -7 License +8 License ********* GPLv3 @@ -1962,82 +1994,84 @@ GPLv3  Tag Table: Node: Top225 -Node: Contents1940 -Node: Screenshots2063 -Node: Installation2181 -Node: Quelpa2695 -Node: Helm support3223 -Node: Usage3626 -Node: Commands4024 -Node: org-ql-find4489 -Node: org-ql-open-link5397 -Node: org-ql-refile6252 -Node: org-ql-search6580 -Node: helm-org-ql8511 -Node: org-ql-view8889 -Node: org-ql-view-sidebar9419 -Node: org-ql-view-recent-items9799 -Node: org-ql-sparse-tree10295 -Node: Queries11095 -Node: Non-sexp query syntax12212 -Node: General predicates13971 -Node: Ancestor/descendant predicates20896 -Node: Date/time predicates22024 -Node: Functions / Macros25148 -Node: Agenda-like views25446 -Ref: Function org-ql-block25608 -Node: Listing / acting-on results26869 -Ref: Caching27077 -Ref: Function org-ql-select27990 -Ref: Function org-ql-query30416 -Ref: Macro org-ql (deprecated)32190 -Node: Custom predicates32505 -Ref: Macro org-ql-defpred32729 -Node: Dynamic block36170 -Node: Links38894 -Node: Tips39581 -Node: Changelog39905 -Node: 09-pre40810 -Node: 08540917 -Node: 08441576 -Node: 08342028 -Node: 08242369 -Node: 08142762 -Node: 0843183 -Node: 07445907 -Node: 07346130 -Node: 07246862 -Node: 07147783 -Node: 0748594 -Node: 06351460 -Node: 06251993 -Node: 06152300 -Node: 0652870 -Node: 05255926 -Node: 05156228 -Node: 0556653 -Node: 04958184 -Node: 04858466 -Node: 04758815 -Node: 04659224 -Node: 04559632 -Node: 04459993 -Node: 04360352 -Node: 04260555 -Node: 04160716 -Node: 0460963 -Node: 03265064 -Node: 03165467 -Node: 0365664 -Node: 02368964 -Node: 02269198 -Node: 02169478 -Node: 0269683 -Node: 0173761 -Node: Notes73862 -Node: Comparison with Org Agenda searches74024 -Node: org-sidebar74913 -Node: License75192 +Node: Contents1995 +Node: Screenshots2122 +Node: Installation2240 +Node: Quelpa2754 +Node: Helm support3282 +Node: Usage3685 +Node: Commands4083 +Node: org-ql-find4548 +Node: org-ql-open-link5456 +Node: org-ql-refile6311 +Node: org-ql-search6639 +Node: helm-org-ql8570 +Node: org-ql-view8948 +Node: org-ql-view-sidebar9478 +Node: org-ql-view-recent-items9858 +Node: org-ql-sparse-tree10354 +Node: Queries11154 +Node: Non-sexp query syntax12271 +Node: General predicates14030 +Node: Ancestor/descendant predicates20955 +Node: Date/time predicates22083 +Node: Functions / Macros25207 +Node: Agenda-like views25505 +Ref: Function org-ql-block25667 +Node: Listing / acting-on results26928 +Ref: Caching27136 +Ref: Function org-ql-select28049 +Ref: Function org-ql-query30475 +Ref: Macro org-ql (deprecated)32249 +Node: Custom predicates32564 +Ref: Macro org-ql-defpred32788 +Node: Dynamic block36229 +Node: Links38953 +Node: Tips39640 +Node: Changelog39964 +Node: 09-pre40875 +Node: 08540982 +Node: 08441641 +Node: 08342093 +Node: 08242434 +Node: 08142827 +Node: 0843248 +Node: 07445972 +Node: 07346195 +Node: 07246927 +Node: 07147848 +Node: 0748659 +Node: 06351525 +Node: 06252058 +Node: 06152365 +Node: 0652935 +Node: 05255991 +Node: 05156293 +Node: 0556718 +Node: 04958249 +Node: 04858531 +Node: 04758880 +Node: 04659289 +Node: 04559697 +Node: 04460058 +Node: 04360417 +Node: 04260620 +Node: 04160781 +Node: 0461028 +Node: 03265129 +Node: 03165532 +Node: 0365729 +Node: 02369029 +Node: 02269263 +Node: 02169543 +Node: 0269748 +Node: 0173826 +Node: Development73927 +Node: Copyright assignment74160 +Node: Notes74750 +Node: Comparison with Org Agenda searches74914 +Node: org-sidebar75803 +Node: License76082  End Tag Table From d3f6dde344e7e499b6a5da7cae85472044248840 Mon Sep 17 00:00:00 2001 From: Adam Porter Date: Wed, 3 Apr 2024 15:25:06 -0500 Subject: [PATCH 17/70] Meta: v0.8.6-pre --- README.org | 4 + org-ql.el | 2 +- org-ql.info | 237 +++++++++++++++++++++++++++------------------------- 3 files changed, 129 insertions(+), 114 deletions(-) diff --git a/README.org b/README.org index 39f18c5..cf74b52 100644 --- a/README.org +++ b/README.org @@ -553,6 +553,10 @@ Simple links may also be written manually in either sexp or non-sexp form, like: /Note:/ Breaking changes may be made before version 1.0, but in the event of major changes, attempts at backward compatibility will be made with obsolescence declarations, translation of arguments, etc. Users who need stability guarantees before 1.0 may choose to use tagged stable releases. +** 0.8.6-pre + +Nothing new yet. + ** 0.8.5 *Fixes* diff --git a/org-ql.el b/org-ql.el index d1f13a3..bae593b 100644 --- a/org-ql.el +++ b/org-ql.el @@ -4,7 +4,7 @@ ;; Author: Adam Porter ;; Url: https://github.com/alphapapa/org-ql -;; Version: 0.8.5 +;; Version: 0.8.6-pre ;; Package-Requires: ((emacs "27.1") (compat "29.1") (dash "2.18.1") (f "0.17.2") (map "2.1") (org "9.0") (org-super-agenda "1.2") (ov "1.0.6") (peg "1.0.1") (s "1.12.0") (transient "0.1") (ts "0.2-pre")) ;; Keywords: hypermedia, outlines, Org, agenda diff --git a/org-ql.info b/org-ql.info index ec5076b..25c1f11 100644 --- a/org-ql.info +++ b/org-ql.info @@ -72,6 +72,7 @@ Functions / Macros Changelog +* 0.8.6-pre: 086-pre. * 0.8.5: 085. * 0.8.4: 084. * 0.8.3: 083. @@ -1033,6 +1034,7 @@ releases. * Menu: +* 0.8.6-pre: 086-pre. * 0.8.5: 085. * 0.8.4: 084. * 0.8.3: 083. @@ -1071,9 +1073,17 @@ releases. * 0.1: 01.  -File: README.info, Node: 085, Next: 084, Up: Changelog +File: README.info, Node: 086-pre, Next: 085, Up: Changelog -5.1 0.8.5 +5.1 0.8.6-pre +============= + +Nothing new yet. + + +File: README.info, Node: 085, Next: 084, Prev: 086-pre, Up: Changelog + +5.2 0.8.5 ========= *Fixes* @@ -1090,7 +1100,7 @@ File: README.info, Node: 085, Next: 084, Up: Changelog  File: README.info, Node: 084, Next: 083, Prev: 085, Up: Changelog -5.2 0.8.4 +5.3 0.8.4 ========= *Fixes* @@ -1104,7 +1114,7 @@ File: README.info, Node: 084, Next: 083, Prev: 085, Up: Changelog  File: README.info, Node: 083, Next: 082, Prev: 084, Up: Changelog -5.3 0.8.3 +5.4 0.8.3 ========= *Fixes* @@ -1117,7 +1127,7 @@ File: README.info, Node: 083, Next: 082, Prev: 084, Up: Changelog  File: README.info, Node: 082, Next: 081, Prev: 083, Up: Changelog -5.4 0.8.2 +5.5 0.8.2 ========= *Fixes* @@ -1131,7 +1141,7 @@ File: README.info, Node: 082, Next: 081, Prev: 083, Up: Changelog  File: README.info, Node: 081, Next: 08, Prev: 082, Up: Changelog -5.5 0.8.1 +5.6 0.8.1 ========= *Fixes* @@ -1146,7 +1156,7 @@ File: README.info, Node: 081, Next: 08, Prev: 082, Up: Changelog  File: README.info, Node: 08, Next: 074, Prev: 081, Up: Changelog -5.6 0.8 +5.7 0.8 ======= *Additions* @@ -1202,7 +1212,7 @@ File: README.info, Node: 08, Next: 074, Prev: 081, Up: Changelog  File: README.info, Node: 074, Next: 073, Prev: 08, Up: Changelog -5.7 0.7.4 +5.8 0.7.4 ========= *Fixes* @@ -1212,7 +1222,7 @@ File: README.info, Node: 074, Next: 073, Prev: 08, Up: Changelog  File: README.info, Node: 073, Next: 072, Prev: 074, Up: Changelog -5.8 0.7.3 +5.9 0.7.3 ========= *Fixes* @@ -1230,8 +1240,8 @@ File: README.info, Node: 073, Next: 072, Prev: 074, Up: Changelog  File: README.info, Node: 072, Next: 071, Prev: 073, Up: Changelog -5.9 0.7.2 -========= +5.10 0.7.2 +========== *Fixes* • Timestamp predicates are more tolerant of partial input (e.g. @@ -1251,7 +1261,7 @@ File: README.info, Node: 072, Next: 071, Prev: 073, Up: Changelog  File: README.info, Node: 071, Next: 07, Prev: 072, Up: Changelog -5.10 0.7.1 +5.11 0.7.1 ========== *Fixes* @@ -1270,7 +1280,7 @@ File: README.info, Node: 071, Next: 07, Prev: 072, Up: Changelog  File: README.info, Node: 07, Next: 063, Prev: 071, Up: Changelog -5.11 0.7 +5.12 0.7 ======== *Added* @@ -1329,7 +1339,7 @@ File: README.info, Node: 07, Next: 063, Prev: 071, Up: Changelog  File: README.info, Node: 063, Next: 062, Prev: 07, Up: Changelog -5.12 0.6.3 +5.13 0.6.3 ========== *Fixed* @@ -1345,7 +1355,7 @@ File: README.info, Node: 063, Next: 062, Prev: 07, Up: Changelog  File: README.info, Node: 062, Next: 061, Prev: 063, Up: Changelog -5.13 0.6.2 +5.14 0.6.2 ========== *Fixed* @@ -1356,7 +1366,7 @@ File: README.info, Node: 062, Next: 061, Prev: 063, Up: Changelog  File: README.info, Node: 061, Next: 06, Prev: 062, Up: Changelog -5.14 0.6.1 +5.15 0.6.1 ========== *Fixed* @@ -1374,7 +1384,7 @@ File: README.info, Node: 061, Next: 06, Prev: 062, Up: Changelog  File: README.info, Node: 06, Next: 052, Prev: 061, Up: Changelog -5.15 0.6 +5.16 0.6 ======== *Added* @@ -1441,7 +1451,7 @@ File: README.info, Node: 06, Next: 052, Prev: 061, Up: Changelog  File: README.info, Node: 052, Next: 051, Prev: 06, Up: Changelog -5.16 0.5.2 +5.17 0.5.2 ========== *Fixed* @@ -1452,7 +1462,7 @@ File: README.info, Node: 052, Next: 051, Prev: 06, Up: Changelog  File: README.info, Node: 051, Next: 05, Prev: 052, Up: Changelog -5.17 0.5.1 +5.18 0.5.1 ========== *Fixed* @@ -1465,7 +1475,7 @@ File: README.info, Node: 051, Next: 05, Prev: 052, Up: Changelog  File: README.info, Node: 05, Next: 049, Prev: 051, Up: Changelog -5.18 0.5 +5.19 0.5 ======== *Added* @@ -1506,7 +1516,7 @@ File: README.info, Node: 05, Next: 049, Prev: 051, Up: Changelog  File: README.info, Node: 049, Next: 048, Prev: 05, Up: Changelog -5.19 0.4.9 +5.20 0.4.9 ========== *Fixed* @@ -1517,7 +1527,7 @@ File: README.info, Node: 049, Next: 048, Prev: 05, Up: Changelog  File: README.info, Node: 048, Next: 047, Prev: 049, Up: Changelog -5.20 0.4.8 +5.21 0.4.8 ========== *Fixed* @@ -1529,7 +1539,7 @@ File: README.info, Node: 048, Next: 047, Prev: 049, Up: Changelog  File: README.info, Node: 047, Next: 046, Prev: 048, Up: Changelog -5.21 0.4.7 +5.22 0.4.7 ========== *Fixed* @@ -1542,7 +1552,7 @@ File: README.info, Node: 047, Next: 046, Prev: 048, Up: Changelog  File: README.info, Node: 046, Next: 045, Prev: 047, Up: Changelog -5.22 0.4.6 +5.23 0.4.6 ========== *Fixed* @@ -1555,7 +1565,7 @@ File: README.info, Node: 046, Next: 045, Prev: 047, Up: Changelog  File: README.info, Node: 045, Next: 044, Prev: 046, Up: Changelog -5.23 0.4.5 +5.24 0.4.5 ========== *Fixed* @@ -1567,7 +1577,7 @@ File: README.info, Node: 045, Next: 044, Prev: 046, Up: Changelog  File: README.info, Node: 044, Next: 043, Prev: 045, Up: Changelog -5.24 0.4.4 +5.25 0.4.4 ========== *Fixed* @@ -1579,7 +1589,7 @@ File: README.info, Node: 044, Next: 043, Prev: 045, Up: Changelog  File: README.info, Node: 043, Next: 042, Prev: 044, Up: Changelog -5.25 0.4.3 +5.26 0.4.3 ========== *Fixed* @@ -1589,7 +1599,7 @@ File: README.info, Node: 043, Next: 042, Prev: 044, Up: Changelog  File: README.info, Node: 042, Next: 041, Prev: 043, Up: Changelog -5.26 0.4.2 +5.27 0.4.2 ========== *Fixed* @@ -1598,7 +1608,7 @@ File: README.info, Node: 042, Next: 041, Prev: 043, Up: Changelog  File: README.info, Node: 041, Next: 04, Prev: 042, Up: Changelog -5.27 0.4.1 +5.28 0.4.1 ========== *Fixed* @@ -1608,7 +1618,7 @@ File: README.info, Node: 041, Next: 04, Prev: 042, Up: Changelog  File: README.info, Node: 04, Next: 032, Prev: 041, Up: Changelog -5.28 0.4 +5.29 0.4 ======== _Note:_ The next release, 0.5, may include changes which will require @@ -1689,7 +1699,7 @@ automatically, as they will be pushed to the ‘master’ branch when ready.  File: README.info, Node: 032, Next: 031, Prev: 04, Up: Changelog -5.29 0.3.2 +5.30 0.3.2 ========== *Fixed* @@ -1702,7 +1712,7 @@ File: README.info, Node: 032, Next: 031, Prev: 04, Up: Changelog  File: README.info, Node: 031, Next: 03, Prev: 032, Up: Changelog -5.30 0.3.1 +5.31 0.3.1 ========== *Fixed* @@ -1712,7 +1722,7 @@ File: README.info, Node: 031, Next: 03, Prev: 032, Up: Changelog  File: README.info, Node: 03, Next: 023, Prev: 031, Up: Changelog -5.31 0.3 +5.32 0.3 ======== *Added* @@ -1780,7 +1790,7 @@ File: README.info, Node: 03, Next: 023, Prev: 031, Up: Changelog  File: README.info, Node: 023, Next: 022, Prev: 03, Up: Changelog -5.32 0.2.3 +5.33 0.2.3 ========== *Fixed* @@ -1790,7 +1800,7 @@ File: README.info, Node: 023, Next: 022, Prev: 03, Up: Changelog  File: README.info, Node: 022, Next: 021, Prev: 023, Up: Changelog -5.33 0.2.2 +5.34 0.2.2 ========== *Fixed* @@ -1801,7 +1811,7 @@ File: README.info, Node: 022, Next: 021, Prev: 023, Up: Changelog  File: README.info, Node: 021, Next: 02, Prev: 022, Up: Changelog -5.34 0.2.1 +5.35 0.2.1 ========== *Fixed* @@ -1811,7 +1821,7 @@ File: README.info, Node: 021, Next: 02, Prev: 022, Up: Changelog  File: README.info, Node: 02, Next: 01, Prev: 021, Up: Changelog -5.35 0.2 +5.36 0.2 ======== *Added* @@ -1894,7 +1904,7 @@ File: README.info, Node: 02, Next: 01, Prev: 021, Up: Changelog  File: README.info, Node: 01, Prev: 02, Up: Changelog -5.36 0.1 +5.37 0.1 ======== First tagged release. @@ -1952,81 +1962,82 @@ GPLv3  Tag Table: Node: Top225 -Node: Contents1921 -Node: Screenshots2044 -Node: Installation2162 -Node: Quelpa2676 -Node: Helm support3204 -Node: Usage3607 -Node: Commands4005 -Node: org-ql-find4470 -Node: org-ql-open-link5378 -Node: org-ql-refile6233 -Node: org-ql-search6561 -Node: helm-org-ql8492 -Node: org-ql-view8870 -Node: org-ql-view-sidebar9400 -Node: org-ql-view-recent-items9780 -Node: org-ql-sparse-tree10276 -Node: Queries11076 -Node: Non-sexp query syntax12193 -Node: General predicates13952 -Node: Ancestor/descendant predicates20877 -Node: Date/time predicates22005 -Node: Functions / Macros25129 -Node: Agenda-like views25427 -Ref: Function org-ql-block25589 -Node: Listing / acting-on results26850 -Ref: Caching27058 -Ref: Function org-ql-select27971 -Ref: Function org-ql-query30397 -Ref: Macro org-ql (deprecated)32171 -Node: Custom predicates32486 -Ref: Macro org-ql-defpred32710 -Node: Dynamic block36151 -Node: Links38875 -Node: Tips39562 -Node: Changelog39886 -Node: 08540772 -Node: 08441416 -Node: 08341868 -Node: 08242209 -Node: 08142602 -Node: 0843023 -Node: 07445747 -Node: 07345970 -Node: 07246702 -Node: 07147621 -Node: 0748432 -Node: 06351298 -Node: 06251831 -Node: 06152138 -Node: 0652708 -Node: 05255764 -Node: 05156066 -Node: 0556491 -Node: 04958022 -Node: 04858304 -Node: 04758653 -Node: 04659062 -Node: 04559470 -Node: 04459831 -Node: 04360190 -Node: 04260393 -Node: 04160554 -Node: 0460801 -Node: 03264902 -Node: 03165305 -Node: 0365502 -Node: 02368802 -Node: 02269036 -Node: 02169316 -Node: 0269521 -Node: 0173599 -Node: Notes73700 -Node: Comparison with Org Agenda searches73862 -Node: org-sidebar74751 -Node: License75030 +Node: Contents1943 +Node: Screenshots2066 +Node: Installation2184 +Node: Quelpa2698 +Node: Helm support3226 +Node: Usage3629 +Node: Commands4027 +Node: org-ql-find4492 +Node: org-ql-open-link5400 +Node: org-ql-refile6255 +Node: org-ql-search6583 +Node: helm-org-ql8514 +Node: org-ql-view8892 +Node: org-ql-view-sidebar9422 +Node: org-ql-view-recent-items9802 +Node: org-ql-sparse-tree10298 +Node: Queries11098 +Node: Non-sexp query syntax12215 +Node: General predicates13974 +Node: Ancestor/descendant predicates20899 +Node: Date/time predicates22027 +Node: Functions / Macros25151 +Node: Agenda-like views25449 +Ref: Function org-ql-block25611 +Node: Listing / acting-on results26872 +Ref: Caching27080 +Ref: Function org-ql-select27993 +Ref: Function org-ql-query30419 +Ref: Macro org-ql (deprecated)32193 +Node: Custom predicates32508 +Ref: Macro org-ql-defpred32732 +Node: Dynamic block36173 +Node: Links38897 +Node: Tips39584 +Node: Changelog39908 +Node: 086-pre40816 +Node: 08540928 +Node: 08441588 +Node: 08342040 +Node: 08242381 +Node: 08142774 +Node: 0843195 +Node: 07445919 +Node: 07346142 +Node: 07246874 +Node: 07147795 +Node: 0748606 +Node: 06351472 +Node: 06252005 +Node: 06152312 +Node: 0652882 +Node: 05255938 +Node: 05156240 +Node: 0556665 +Node: 04958196 +Node: 04858478 +Node: 04758827 +Node: 04659236 +Node: 04559644 +Node: 04460005 +Node: 04360364 +Node: 04260567 +Node: 04160728 +Node: 0460975 +Node: 03265076 +Node: 03165479 +Node: 0365676 +Node: 02368976 +Node: 02269210 +Node: 02169490 +Node: 0269695 +Node: 0173773 +Node: Notes73874 +Node: Comparison with Org Agenda searches74036 +Node: org-sidebar74925 +Node: License75204  End Tag Table From 8bd73b4b469ce29f54c1c9dcf27d71507d82437a Mon Sep 17 00:00:00 2001 From: Adam Porter Date: Wed, 3 Apr 2024 15:25:58 -0500 Subject: [PATCH 18/70] Fix: (org-ql-view-bookmark-make-record) buffers-files as symbol --- README.org | 3 +- org-ql-view.el | 1 + org-ql.info | 84 ++++++++++++++++++++++++++------------------------ 3 files changed, 46 insertions(+), 42 deletions(-) diff --git a/README.org b/README.org index cf74b52..19eb49e 100644 --- a/README.org +++ b/README.org @@ -555,7 +555,8 @@ Simple links may also be written manually in either sexp or non-sexp form, like: ** 0.8.6-pre -Nothing new yet. +*Fixes* ++ Bookmarking ~org-ql-view~ buffers when the ~buffers-files~ argument is a symbol (like ~org-agenda-files~). ** 0.8.5 diff --git a/org-ql-view.el b/org-ql-view.el index 4d3c8c3..41ada72 100644 --- a/org-ql-view.el +++ b/org-ql-view.el @@ -548,6 +548,7 @@ dates in the past, and negative for dates in the future." ;; Replace buffers with their filenames, and signal error if any are not file-backed. (setf plist (plist-put plist :buffers-files (cl-etypecase buffers-files + (symbol buffers-files) (string buffers-files) (buffer (file-nameize buffers-files)) (list (mapcar #'file-nameize buffers-files))))) diff --git a/org-ql.info b/org-ql.info index 25c1f11..1e920e7 100644 --- a/org-ql.info +++ b/org-ql.info @@ -1078,7 +1078,9 @@ File: README.info, Node: 086-pre, Next: 085, Up: Changelog 5.1 0.8.6-pre ============= -Nothing new yet. +*Fixes* + • Bookmarking ‘org-ql-view’ buffers when the ‘buffers-files’ argument + is a symbol (like ‘org-agenda-files’).  File: README.info, Node: 085, Next: 084, Prev: 086-pre, Up: Changelog @@ -1998,46 +2000,46 @@ Node: Links38897 Node: Tips39584 Node: Changelog39908 Node: 086-pre40816 -Node: 08540928 -Node: 08441588 -Node: 08342040 -Node: 08242381 -Node: 08142774 -Node: 0843195 -Node: 07445919 -Node: 07346142 -Node: 07246874 -Node: 07147795 -Node: 0748606 -Node: 06351472 -Node: 06252005 -Node: 06152312 -Node: 0652882 -Node: 05255938 -Node: 05156240 -Node: 0556665 -Node: 04958196 -Node: 04858478 -Node: 04758827 -Node: 04659236 -Node: 04559644 -Node: 04460005 -Node: 04360364 -Node: 04260567 -Node: 04160728 -Node: 0460975 -Node: 03265076 -Node: 03165479 -Node: 0365676 -Node: 02368976 -Node: 02269210 -Node: 02169490 -Node: 0269695 -Node: 0173773 -Node: Notes73874 -Node: Comparison with Org Agenda searches74036 -Node: org-sidebar74925 -Node: License75204 +Node: 08541050 +Node: 08441710 +Node: 08342162 +Node: 08242503 +Node: 08142896 +Node: 0843317 +Node: 07446041 +Node: 07346264 +Node: 07246996 +Node: 07147917 +Node: 0748728 +Node: 06351594 +Node: 06252127 +Node: 06152434 +Node: 0653004 +Node: 05256060 +Node: 05156362 +Node: 0556787 +Node: 04958318 +Node: 04858600 +Node: 04758949 +Node: 04659358 +Node: 04559766 +Node: 04460127 +Node: 04360486 +Node: 04260689 +Node: 04160850 +Node: 0461097 +Node: 03265198 +Node: 03165601 +Node: 0365798 +Node: 02369098 +Node: 02269332 +Node: 02169612 +Node: 0269817 +Node: 0173895 +Node: Notes73996 +Node: Comparison with Org Agenda searches74158 +Node: org-sidebar75047 +Node: License75326  End Tag Table From 1f264bf4649dc2ad90f16a763794561ee6164d84 Mon Sep 17 00:00:00 2001 From: Adam Porter Date: Wed, 3 Apr 2024 15:26:33 -0500 Subject: [PATCH 19/70] Release: v0.8.6 --- README.org | 2 +- org-ql.el | 2 +- org-ql.info | 164 ++++++++++++++++++++++++++-------------------------- 3 files changed, 84 insertions(+), 84 deletions(-) diff --git a/README.org b/README.org index 19eb49e..e4f791e 100644 --- a/README.org +++ b/README.org @@ -553,7 +553,7 @@ Simple links may also be written manually in either sexp or non-sexp form, like: /Note:/ Breaking changes may be made before version 1.0, but in the event of major changes, attempts at backward compatibility will be made with obsolescence declarations, translation of arguments, etc. Users who need stability guarantees before 1.0 may choose to use tagged stable releases. -** 0.8.6-pre +** 0.8.6 *Fixes* + Bookmarking ~org-ql-view~ buffers when the ~buffers-files~ argument is a symbol (like ~org-agenda-files~). diff --git a/org-ql.el b/org-ql.el index bae593b..f8a84bb 100644 --- a/org-ql.el +++ b/org-ql.el @@ -4,7 +4,7 @@ ;; Author: Adam Porter ;; Url: https://github.com/alphapapa/org-ql -;; Version: 0.8.6-pre +;; Version: 0.8.6 ;; Package-Requires: ((emacs "27.1") (compat "29.1") (dash "2.18.1") (f "0.17.2") (map "2.1") (org "9.0") (org-super-agenda "1.2") (ov "1.0.6") (peg "1.0.1") (s "1.12.0") (transient "0.1") (ts "0.2-pre")) ;; Keywords: hypermedia, outlines, Org, agenda diff --git a/org-ql.info b/org-ql.info index 1e920e7..519a64f 100644 --- a/org-ql.info +++ b/org-ql.info @@ -72,7 +72,7 @@ Functions / Macros Changelog -* 0.8.6-pre: 086-pre. +* 0.8.6: 086. * 0.8.5: 085. * 0.8.4: 084. * 0.8.3: 083. @@ -1034,7 +1034,7 @@ releases. * Menu: -* 0.8.6-pre: 086-pre. +* 0.8.6: 086. * 0.8.5: 085. * 0.8.4: 084. * 0.8.3: 083. @@ -1073,17 +1073,17 @@ releases. * 0.1: 01.  -File: README.info, Node: 086-pre, Next: 085, Up: Changelog +File: README.info, Node: 086, Next: 085, Up: Changelog -5.1 0.8.6-pre -============= +5.1 0.8.6 +========= *Fixes* • Bookmarking ‘org-ql-view’ buffers when the ‘buffers-files’ argument is a symbol (like ‘org-agenda-files’).  -File: README.info, Node: 085, Next: 084, Prev: 086-pre, Up: Changelog +File: README.info, Node: 085, Next: 084, Prev: 086, Up: Changelog 5.2 0.8.5 ========= @@ -1964,82 +1964,82 @@ GPLv3  Tag Table: Node: Top225 -Node: Contents1943 -Node: Screenshots2066 -Node: Installation2184 -Node: Quelpa2698 -Node: Helm support3226 -Node: Usage3629 -Node: Commands4027 -Node: org-ql-find4492 -Node: org-ql-open-link5400 -Node: org-ql-refile6255 -Node: org-ql-search6583 -Node: helm-org-ql8514 -Node: org-ql-view8892 -Node: org-ql-view-sidebar9422 -Node: org-ql-view-recent-items9802 -Node: org-ql-sparse-tree10298 -Node: Queries11098 -Node: Non-sexp query syntax12215 -Node: General predicates13974 -Node: Ancestor/descendant predicates20899 -Node: Date/time predicates22027 -Node: Functions / Macros25151 -Node: Agenda-like views25449 -Ref: Function org-ql-block25611 -Node: Listing / acting-on results26872 -Ref: Caching27080 -Ref: Function org-ql-select27993 -Ref: Function org-ql-query30419 -Ref: Macro org-ql (deprecated)32193 -Node: Custom predicates32508 -Ref: Macro org-ql-defpred32732 -Node: Dynamic block36173 -Node: Links38897 -Node: Tips39584 -Node: Changelog39908 -Node: 086-pre40816 -Node: 08541050 -Node: 08441710 -Node: 08342162 -Node: 08242503 -Node: 08142896 -Node: 0843317 -Node: 07446041 -Node: 07346264 -Node: 07246996 -Node: 07147917 -Node: 0748728 -Node: 06351594 -Node: 06252127 -Node: 06152434 -Node: 0653004 -Node: 05256060 -Node: 05156362 -Node: 0556787 -Node: 04958318 -Node: 04858600 -Node: 04758949 -Node: 04659358 -Node: 04559766 -Node: 04460127 -Node: 04360486 -Node: 04260689 -Node: 04160850 -Node: 0461097 -Node: 03265198 -Node: 03165601 -Node: 0365798 -Node: 02369098 -Node: 02269332 -Node: 02169612 -Node: 0269817 -Node: 0173895 -Node: Notes73996 -Node: Comparison with Org Agenda searches74158 -Node: org-sidebar75047 -Node: License75326 +Node: Contents1935 +Node: Screenshots2058 +Node: Installation2176 +Node: Quelpa2690 +Node: Helm support3218 +Node: Usage3621 +Node: Commands4019 +Node: org-ql-find4484 +Node: org-ql-open-link5392 +Node: org-ql-refile6247 +Node: org-ql-search6575 +Node: helm-org-ql8506 +Node: org-ql-view8884 +Node: org-ql-view-sidebar9414 +Node: org-ql-view-recent-items9794 +Node: org-ql-sparse-tree10290 +Node: Queries11090 +Node: Non-sexp query syntax12207 +Node: General predicates13966 +Node: Ancestor/descendant predicates20891 +Node: Date/time predicates22019 +Node: Functions / Macros25143 +Node: Agenda-like views25441 +Ref: Function org-ql-block25603 +Node: Listing / acting-on results26864 +Ref: Caching27072 +Ref: Function org-ql-select27985 +Ref: Function org-ql-query30411 +Ref: Macro org-ql (deprecated)32185 +Node: Custom predicates32500 +Ref: Macro org-ql-defpred32724 +Node: Dynamic block36165 +Node: Links38889 +Node: Tips39576 +Node: Changelog39900 +Node: 08640800 +Node: 08541022 +Node: 08441678 +Node: 08342130 +Node: 08242471 +Node: 08142864 +Node: 0843285 +Node: 07446009 +Node: 07346232 +Node: 07246964 +Node: 07147885 +Node: 0748696 +Node: 06351562 +Node: 06252095 +Node: 06152402 +Node: 0652972 +Node: 05256028 +Node: 05156330 +Node: 0556755 +Node: 04958286 +Node: 04858568 +Node: 04758917 +Node: 04659326 +Node: 04559734 +Node: 04460095 +Node: 04360454 +Node: 04260657 +Node: 04160818 +Node: 0461065 +Node: 03265166 +Node: 03165569 +Node: 0365766 +Node: 02369066 +Node: 02269300 +Node: 02169580 +Node: 0269785 +Node: 0173863 +Node: Notes73964 +Node: Comparison with Org Agenda searches74126 +Node: org-sidebar75015 +Node: License75294  End Tag Table From 0f01f0a9d8a23cf48e5801e9365c84537e927b3b Mon Sep 17 00:00:00 2001 From: Adam Porter Date: Wed, 12 Jun 2024 22:47:33 -0500 Subject: [PATCH 20/70] Tidy: Compilation warnings --- org-ql-completing-read.el | 1 + org-ql-find.el | 2 ++ org-ql-search.el | 2 ++ org-ql-view.el | 1 + tests/test-org-ql.el | 2 ++ 5 files changed, 8 insertions(+) diff --git a/org-ql-completing-read.el b/org-ql-completing-read.el index 640033d..18cfd7f 100644 --- a/org-ql-completing-read.el +++ b/org-ql-completing-read.el @@ -27,6 +27,7 @@ (require 'org-ql) (declare-function org-ql-search "org-ql-search") +(declare-function org-ql--normalize-query "org-ql" t t) ;;;; Variables diff --git a/org-ql-find.el b/org-ql-find.el index f6f2b9c..820d2dd 100644 --- a/org-ql-find.el +++ b/org-ql-find.el @@ -33,6 +33,8 @@ (require 'org-ql-search) (require 'org-ql-completing-read) +(declare-function org-ql--normalize-query "org-ql" t t) + ;;;; Customization (defgroup org-ql-find nil diff --git a/org-ql-search.el b/org-ql-search.el index d08397a..9c783b9 100644 --- a/org-ql-search.el +++ b/org-ql-search.el @@ -40,6 +40,8 @@ (require 'org-ql) (require 'org-ql-view) +(declare-function org-ql--normalize-query "org-ql" t t) + ;;;; Compatibility (defalias 'org-ql-search--link-heading-search-string diff --git a/org-ql-view.el b/org-ql-view.el index 5889a56..918fc7f 100644 --- a/org-ql-view.el +++ b/org-ql-view.el @@ -44,6 +44,7 @@ (declare-function org-ql-search "org-ql-search" t) (declare-function org-ql-search--org-link-store-props "org-ql-search" t) +(declare-function org-ql--normalize-query "org-ql" t t) (require 'dash) (require 's) diff --git a/tests/test-org-ql.el b/tests/test-org-ql.el index 8d2b84c..1259004 100644 --- a/tests/test-org-ql.el +++ b/tests/test-org-ql.el @@ -35,6 +35,8 @@ (require 'xr) +(declare-function org-ql--normalize-query "org-ql" t t) + ;;;; Variables (defvar org-ql-test-buffer nil From f7c3a61e32e8da62da1e69a2a79ec5b333a7d1f5 Mon Sep 17 00:00:00 2001 From: Adam Porter Date: Wed, 12 Jun 2024 22:50:45 -0500 Subject: [PATCH 21/70] Fix: (helm-org-ql [v0.6.2]) Compilation warnings --- README.org | 4 ++ helm-org-ql.el | 22 +++++-- org-ql.info | 175 +++++++++++++++++++++++++++---------------------- 3 files changed, 116 insertions(+), 85 deletions(-) diff --git a/README.org b/README.org index b210126..aebc64a 100644 --- a/README.org +++ b/README.org @@ -558,6 +558,10 @@ Simple links may also be written manually in either sexp or non-sexp form, like: Nothing new yet. +*** helm-org-ql + +Tagged v0.6.2, fixing a compilation warning. + ** 0.8.6 *Fixes* diff --git a/helm-org-ql.el b/helm-org-ql.el index 5d460a5..c6a38a7 100644 --- a/helm-org-ql.el +++ b/helm-org-ql.el @@ -2,8 +2,8 @@ ;; Author: Adam Porter ;; URL: https://github.com/alphapapa/org-ql -;; Version: 0.6.1 -;; Package-Requires: ((emacs "26.1") (dash "2.18.1") (s "1.12.0") (helm-org "1.0") (org-ql "0.6-pre")) +;; Version: 0.6.2 +;; Package-Requires: ((emacs "26.1") (compat "29.1.4.5") (dash "2.18.1") (s "1.12.0") (helm-org "1.0") (org-ql "0.6-pre")) ;;; Commentary: @@ -35,6 +35,7 @@ (require 'cl-lib) (require 'org) +(require 'compat) (require 'dash) (require 's) @@ -44,6 +45,15 @@ (require 'org-ql) (require 'org-ql-search) +(declare-function org-ql--normalize-query "org-ql" t t) + +;;;; Compatibility + +(defalias 'helm-org-ql--show-entry + (if (version< org-version "9.6") + 'org-show-entry + 'org-fold-show-entry)) + ;;;; Variables (defvar helm-org-ql-map @@ -102,7 +112,7 @@ NAME is passed to `helm-org-ql-source', which see. NOTE: Atoms in the query are turned into strings where appropriate, which makes it unnecessary to type quotation marks -around words that are intended to be searched for as indepenent +around words that are intended to be searched for as independent strings. All query tokens are wrapped in the operator BOOLEAN (default @@ -151,7 +161,7 @@ Is transformed into this query: ;; it to go to the previous heading. I don't know why it does that. (switch-to-buffer (marker-buffer marker)) (goto-char marker) - (org-show-entry)) + (helm-org-ql--show-entry)) (defun helm-org-ql-show-marker-indirect (marker) "Show heading at MARKER with `org-tree-to-indirect-buffer'." @@ -177,7 +187,7 @@ Is transformed into this query: ;;;###autoload (cl-defun helm-org-ql-source (buffers-files &key (name "helm-org-ql")) - "Return Helm source named NAME that searches BUFFERS-FILES with `helm-org-ql'." + "Return Helm source named NAME to search BUFFERS-FILES with `helm-org-ql'." ;; Expansion of `helm-build-sync-source' macro. (helm-make-source name 'helm-source-sync :candidates (lambda () @@ -201,7 +211,7 @@ Is transformed into this query: (defun helm-org-ql--heading (window-width) "Return string for Helm for heading at point. WINDOW-WIDTH should be the width of the Helm window." - (font-lock-ensure (point-at-bol) (point-at-eol)) + (font-lock-ensure (pos-bol) (pos-eol)) ;; TODO: It would be better to avoid calculating the prefix and width ;; at each heading, but there's no easy way to do that once in each ;; buffer, unless we manually called `org-ql' in each buffer, which diff --git a/org-ql.info b/org-ql.info index 1f3b1f6..3471e69 100644 --- a/org-ql.info +++ b/org-ql.info @@ -112,6 +112,10 @@ Changelog * 0.2: 02. * 0.1: 01. +0.9-pre + +* helm-org-ql: helm-org-ql (1). + Development * Copyright assignment:: @@ -1087,6 +1091,18 @@ File: README.info, Node: 09-pre, Next: 086, Up: Changelog Nothing new yet. +* Menu: + +* helm-org-ql: helm-org-ql (1). + + +File: README.info, Node: helm-org-ql (1), Up: 09-pre + +5.1.1 helm-org-ql +----------------- + +Tagged v0.6.2, fixing a compilation warning. +  File: README.info, Node: 086, Next: 085, Prev: 09-pre, Up: Changelog @@ -2006,85 +2022,86 @@ GPLv3  Tag Table: Node: Top225 -Node: Contents2009 -Node: Screenshots2136 -Node: Installation2254 -Node: Quelpa2768 -Node: Helm support3296 -Node: Usage3699 -Node: Commands4097 -Node: org-ql-find4562 -Node: org-ql-open-link5470 -Node: org-ql-refile6325 -Node: org-ql-search6653 -Node: helm-org-ql8584 -Node: org-ql-view8962 -Node: org-ql-view-sidebar9492 -Node: org-ql-view-recent-items9872 -Node: org-ql-sparse-tree10368 -Node: Queries11168 -Node: Non-sexp query syntax12285 -Node: General predicates14044 -Node: Ancestor/descendant predicates20969 -Node: Date/time predicates22097 -Node: Functions / Macros25221 -Node: Agenda-like views25519 -Ref: Function org-ql-block25681 -Node: Listing / acting-on results26942 -Ref: Caching27150 -Ref: Function org-ql-select28063 -Ref: Function org-ql-query30489 -Ref: Macro org-ql (deprecated)32263 -Node: Custom predicates32578 -Ref: Macro org-ql-defpred32802 -Node: Dynamic block36243 -Node: Links38967 -Node: Tips39654 -Node: Changelog39978 -Node: 09-pre40903 -Node: 08641010 -Node: 08541247 -Node: 08441903 -Node: 08342355 -Node: 08242696 -Node: 08143089 -Node: 0843510 -Node: 07446234 -Node: 07346457 -Node: 07247191 -Node: 07148112 -Node: 0748923 -Node: 06351789 -Node: 06252322 -Node: 06152629 -Node: 0653199 -Node: 05256255 -Node: 05156557 -Node: 0556982 -Node: 04958513 -Node: 04858795 -Node: 04759144 -Node: 04659553 -Node: 04559961 -Node: 04460322 -Node: 04360681 -Node: 04260884 -Node: 04161045 -Node: 0461292 -Node: 03265393 -Node: 03165796 -Node: 0365993 -Node: 02369293 -Node: 02269527 -Node: 02169807 -Node: 0270012 -Node: 0174090 -Node: Development74191 -Node: Copyright assignment74424 -Node: Notes75014 -Node: Comparison with Org Agenda searches75178 -Node: org-sidebar76067 -Node: License76346 +Node: Contents2051 +Node: Screenshots2178 +Node: Installation2296 +Node: Quelpa2810 +Node: Helm support3338 +Node: Usage3741 +Node: Commands4139 +Node: org-ql-find4604 +Node: org-ql-open-link5512 +Node: org-ql-refile6367 +Node: org-ql-search6695 +Node: helm-org-ql8626 +Node: org-ql-view9004 +Node: org-ql-view-sidebar9534 +Node: org-ql-view-recent-items9914 +Node: org-ql-sparse-tree10410 +Node: Queries11210 +Node: Non-sexp query syntax12327 +Node: General predicates14086 +Node: Ancestor/descendant predicates21011 +Node: Date/time predicates22139 +Node: Functions / Macros25263 +Node: Agenda-like views25561 +Ref: Function org-ql-block25723 +Node: Listing / acting-on results26984 +Ref: Caching27192 +Ref: Function org-ql-select28105 +Ref: Function org-ql-query30531 +Ref: Macro org-ql (deprecated)32305 +Node: Custom predicates32620 +Ref: Macro org-ql-defpred32844 +Node: Dynamic block36285 +Node: Links39009 +Node: Tips39696 +Node: Changelog40020 +Node: 09-pre40945 +Node: helm-org-ql (1)41094 +Node: 08641235 +Node: 08541472 +Node: 08442128 +Node: 08342580 +Node: 08242921 +Node: 08143314 +Node: 0843735 +Node: 07446459 +Node: 07346682 +Node: 07247416 +Node: 07148337 +Node: 0749148 +Node: 06352014 +Node: 06252547 +Node: 06152854 +Node: 0653424 +Node: 05256480 +Node: 05156782 +Node: 0557207 +Node: 04958738 +Node: 04859020 +Node: 04759369 +Node: 04659778 +Node: 04560186 +Node: 04460547 +Node: 04360906 +Node: 04261109 +Node: 04161270 +Node: 0461517 +Node: 03265618 +Node: 03166021 +Node: 0366218 +Node: 02369518 +Node: 02269752 +Node: 02170032 +Node: 0270237 +Node: 0174315 +Node: Development74416 +Node: Copyright assignment74649 +Node: Notes75239 +Node: Comparison with Org Agenda searches75403 +Node: org-sidebar76292 +Node: License76571  End Tag Table From e9d08ca3443a10cd751e56c6fe0021ca73b4c8c2 Mon Sep 17 00:00:00 2001 From: Adam Porter Date: Wed, 12 Jun 2024 23:08:54 -0500 Subject: [PATCH 22/70] Tidy: (org-ql-defpred) Docstring This does not solve the compilation warning, because that's caused by the Pcase patterns at the end of the docstring, which the linter falsely identifies as incorrect. --- org-ql.el | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/org-ql.el b/org-ql.el index 3f48a0b..11e93e6 100644 --- a/org-ql.el +++ b/org-ql.el @@ -1141,7 +1141,7 @@ defined in `org-ql-predicates' by calling `org-ql-defpred'." (byte-compile 'org-ql--query-preamble))) (cl-defmacro org-ql-defpred (name args docstring &key body preambles normalizers coalesce) - "Define an \\+`org-ql' selector predicate \\=`org-ql--predicate-NAME'. + "Define an Org QL selector predicate `org-ql--predicate-NAME'. NAME may be a symbol or a list of symbols: if a list, the first is used as NAME and the rest are aliases. A function is only created for NAME, not for aliases, so a normalizer should be used @@ -1226,7 +1226,7 @@ Then if NORMALIZERS were: It would be expanded to: - ((\\=`(,(or 'heading 'h) . ,args) + ((\\=`(,(or \\='heading \\='h) . ,args) \\=`(heading ,@args)))" ;; FIXME: Update defpred tutorial to include :coalesce. From d5269bb5e283f3b12b45fb05c4a7926d23e07d1f Mon Sep 17 00:00:00 2001 From: Adam Porter Date: Wed, 12 Jun 2024 23:45:43 -0500 Subject: [PATCH 23/70] Comment: Add FIXME --- org-ql.el | 3 +++ 1 file changed, 3 insertions(+) diff --git a/org-ql.el b/org-ql.el index 11e93e6..02d51dc 100644 --- a/org-ql.el +++ b/org-ql.el @@ -1118,6 +1118,9 @@ defined in `org-ql-predicates' by calling `org-ql-defpred'." ;; Only one preamble is allowed element) (pcase element + ;; FIXME: Should the pattern below be "`(or . ,_)"? It + ;; seems to work fine either way, but it seems like it + ;; should be changed. (`(or _) element) ,@preamble-patterns From 5ef4364d0a439e409dcc5610f7df9e161a0144d7 Mon Sep 17 00:00:00 2001 From: Adam Porter Date: Sat, 22 Jun 2024 05:00:03 -0500 Subject: [PATCH 24/70] Tidy: Compiler warnings --- org-ql-view.el | 3 +++ 1 file changed, 3 insertions(+) diff --git a/org-ql-view.el b/org-ql-view.el index 918fc7f..02ebb3f 100644 --- a/org-ql-view.el +++ b/org-ql-view.el @@ -611,6 +611,7 @@ The optional, second argument is temporarily _IGNORED for purposes of compatibility with changes in Org 9.4." (require 'url-parse) (require 'url-util) + (declare-function url-path-and-query "url-parse") (when (version<= "9.3" (org-version)) ;; Org 9.3+ makes a backward-incompatible change to link escaping. ;; I don't think it would be a good idea to try to guess whether @@ -712,6 +713,8 @@ When opened, the link searches the buffer it's opened from." ;; Transient manual is written very well, not everything is covered in ;; it, so I'm having to try to imitate examples from `magit-transient'. +(require 'eieio-core) + (require 'transient) (defclass org-ql-view--variable (transient-variable) From b8284c8f5caf16a1c6b4408344477eff0991ba7c Mon Sep 17 00:00:00 2001 From: Adam Porter Date: Wed, 26 Jun 2024 09:58:11 -0500 Subject: [PATCH 25/70] Meta: v0.8.7-pre --- README.org | 4 + org-ql.el | 2 +- org-ql.info | 241 +++++++++++++++++++++++++++------------------------- 3 files changed, 131 insertions(+), 116 deletions(-) diff --git a/README.org b/README.org index e4f791e..e38b31c 100644 --- a/README.org +++ b/README.org @@ -553,6 +553,10 @@ Simple links may also be written manually in either sexp or non-sexp form, like: /Note:/ Breaking changes may be made before version 1.0, but in the event of major changes, attempts at backward compatibility will be made with obsolescence declarations, translation of arguments, etc. Users who need stability guarantees before 1.0 may choose to use tagged stable releases. +** 0.8.7-pre + +Nothing new yet. + ** 0.8.6 *Fixes* diff --git a/org-ql.el b/org-ql.el index f8a84bb..ead158e 100644 --- a/org-ql.el +++ b/org-ql.el @@ -4,7 +4,7 @@ ;; Author: Adam Porter ;; Url: https://github.com/alphapapa/org-ql -;; Version: 0.8.6 +;; Version: 0.8.7-pre ;; Package-Requires: ((emacs "27.1") (compat "29.1") (dash "2.18.1") (f "0.17.2") (map "2.1") (org "9.0") (org-super-agenda "1.2") (ov "1.0.6") (peg "1.0.1") (s "1.12.0") (transient "0.1") (ts "0.2-pre")) ;; Keywords: hypermedia, outlines, Org, agenda diff --git a/org-ql.info b/org-ql.info index 519a64f..dffc0ab 100644 --- a/org-ql.info +++ b/org-ql.info @@ -72,6 +72,7 @@ Functions / Macros Changelog +* 0.8.7-pre: 087-pre. * 0.8.6: 086. * 0.8.5: 085. * 0.8.4: 084. @@ -1034,6 +1035,7 @@ releases. * Menu: +* 0.8.7-pre: 087-pre. * 0.8.6: 086. * 0.8.5: 085. * 0.8.4: 084. @@ -1073,9 +1075,17 @@ releases. * 0.1: 01.  -File: README.info, Node: 086, Next: 085, Up: Changelog +File: README.info, Node: 087-pre, Next: 086, Up: Changelog -5.1 0.8.6 +5.1 0.8.7-pre +============= + +Nothing new yet. + + +File: README.info, Node: 086, Next: 085, Prev: 087-pre, Up: Changelog + +5.2 0.8.6 ========= *Fixes* @@ -1085,7 +1095,7 @@ File: README.info, Node: 086, Next: 085, Up: Changelog  File: README.info, Node: 085, Next: 084, Prev: 086, Up: Changelog -5.2 0.8.5 +5.3 0.8.5 ========= *Fixes* @@ -1102,7 +1112,7 @@ File: README.info, Node: 085, Next: 084, Prev: 086, Up: Changelog  File: README.info, Node: 084, Next: 083, Prev: 085, Up: Changelog -5.3 0.8.4 +5.4 0.8.4 ========= *Fixes* @@ -1116,7 +1126,7 @@ File: README.info, Node: 084, Next: 083, Prev: 085, Up: Changelog  File: README.info, Node: 083, Next: 082, Prev: 084, Up: Changelog -5.4 0.8.3 +5.5 0.8.3 ========= *Fixes* @@ -1129,7 +1139,7 @@ File: README.info, Node: 083, Next: 082, Prev: 084, Up: Changelog  File: README.info, Node: 082, Next: 081, Prev: 083, Up: Changelog -5.5 0.8.2 +5.6 0.8.2 ========= *Fixes* @@ -1143,7 +1153,7 @@ File: README.info, Node: 082, Next: 081, Prev: 083, Up: Changelog  File: README.info, Node: 081, Next: 08, Prev: 082, Up: Changelog -5.6 0.8.1 +5.7 0.8.1 ========= *Fixes* @@ -1158,7 +1168,7 @@ File: README.info, Node: 081, Next: 08, Prev: 082, Up: Changelog  File: README.info, Node: 08, Next: 074, Prev: 081, Up: Changelog -5.7 0.8 +5.8 0.8 ======= *Additions* @@ -1214,7 +1224,7 @@ File: README.info, Node: 08, Next: 074, Prev: 081, Up: Changelog  File: README.info, Node: 074, Next: 073, Prev: 08, Up: Changelog -5.8 0.7.4 +5.9 0.7.4 ========= *Fixes* @@ -1224,8 +1234,8 @@ File: README.info, Node: 074, Next: 073, Prev: 08, Up: Changelog  File: README.info, Node: 073, Next: 072, Prev: 074, Up: Changelog -5.9 0.7.3 -========= +5.10 0.7.3 +========== *Fixes* • Disable ‘case-fold-search’ when collecting headings in outline @@ -1242,7 +1252,7 @@ File: README.info, Node: 073, Next: 072, Prev: 074, Up: Changelog  File: README.info, Node: 072, Next: 071, Prev: 073, Up: Changelog -5.10 0.7.2 +5.11 0.7.2 ========== *Fixes* @@ -1263,7 +1273,7 @@ File: README.info, Node: 072, Next: 071, Prev: 073, Up: Changelog  File: README.info, Node: 071, Next: 07, Prev: 072, Up: Changelog -5.11 0.7.1 +5.12 0.7.1 ========== *Fixes* @@ -1282,7 +1292,7 @@ File: README.info, Node: 071, Next: 07, Prev: 072, Up: Changelog  File: README.info, Node: 07, Next: 063, Prev: 071, Up: Changelog -5.12 0.7 +5.13 0.7 ======== *Added* @@ -1341,7 +1351,7 @@ File: README.info, Node: 07, Next: 063, Prev: 071, Up: Changelog  File: README.info, Node: 063, Next: 062, Prev: 07, Up: Changelog -5.13 0.6.3 +5.14 0.6.3 ========== *Fixed* @@ -1357,7 +1367,7 @@ File: README.info, Node: 063, Next: 062, Prev: 07, Up: Changelog  File: README.info, Node: 062, Next: 061, Prev: 063, Up: Changelog -5.14 0.6.2 +5.15 0.6.2 ========== *Fixed* @@ -1368,7 +1378,7 @@ File: README.info, Node: 062, Next: 061, Prev: 063, Up: Changelog  File: README.info, Node: 061, Next: 06, Prev: 062, Up: Changelog -5.15 0.6.1 +5.16 0.6.1 ========== *Fixed* @@ -1386,7 +1396,7 @@ File: README.info, Node: 061, Next: 06, Prev: 062, Up: Changelog  File: README.info, Node: 06, Next: 052, Prev: 061, Up: Changelog -5.16 0.6 +5.17 0.6 ======== *Added* @@ -1453,7 +1463,7 @@ File: README.info, Node: 06, Next: 052, Prev: 061, Up: Changelog  File: README.info, Node: 052, Next: 051, Prev: 06, Up: Changelog -5.17 0.5.2 +5.18 0.5.2 ========== *Fixed* @@ -1464,7 +1474,7 @@ File: README.info, Node: 052, Next: 051, Prev: 06, Up: Changelog  File: README.info, Node: 051, Next: 05, Prev: 052, Up: Changelog -5.18 0.5.1 +5.19 0.5.1 ========== *Fixed* @@ -1477,7 +1487,7 @@ File: README.info, Node: 051, Next: 05, Prev: 052, Up: Changelog  File: README.info, Node: 05, Next: 049, Prev: 051, Up: Changelog -5.19 0.5 +5.20 0.5 ======== *Added* @@ -1518,7 +1528,7 @@ File: README.info, Node: 05, Next: 049, Prev: 051, Up: Changelog  File: README.info, Node: 049, Next: 048, Prev: 05, Up: Changelog -5.20 0.4.9 +5.21 0.4.9 ========== *Fixed* @@ -1529,7 +1539,7 @@ File: README.info, Node: 049, Next: 048, Prev: 05, Up: Changelog  File: README.info, Node: 048, Next: 047, Prev: 049, Up: Changelog -5.21 0.4.8 +5.22 0.4.8 ========== *Fixed* @@ -1541,7 +1551,7 @@ File: README.info, Node: 048, Next: 047, Prev: 049, Up: Changelog  File: README.info, Node: 047, Next: 046, Prev: 048, Up: Changelog -5.22 0.4.7 +5.23 0.4.7 ========== *Fixed* @@ -1554,7 +1564,7 @@ File: README.info, Node: 047, Next: 046, Prev: 048, Up: Changelog  File: README.info, Node: 046, Next: 045, Prev: 047, Up: Changelog -5.23 0.4.6 +5.24 0.4.6 ========== *Fixed* @@ -1567,7 +1577,7 @@ File: README.info, Node: 046, Next: 045, Prev: 047, Up: Changelog  File: README.info, Node: 045, Next: 044, Prev: 046, Up: Changelog -5.24 0.4.5 +5.25 0.4.5 ========== *Fixed* @@ -1579,7 +1589,7 @@ File: README.info, Node: 045, Next: 044, Prev: 046, Up: Changelog  File: README.info, Node: 044, Next: 043, Prev: 045, Up: Changelog -5.25 0.4.4 +5.26 0.4.4 ========== *Fixed* @@ -1591,7 +1601,7 @@ File: README.info, Node: 044, Next: 043, Prev: 045, Up: Changelog  File: README.info, Node: 043, Next: 042, Prev: 044, Up: Changelog -5.26 0.4.3 +5.27 0.4.3 ========== *Fixed* @@ -1601,7 +1611,7 @@ File: README.info, Node: 043, Next: 042, Prev: 044, Up: Changelog  File: README.info, Node: 042, Next: 041, Prev: 043, Up: Changelog -5.27 0.4.2 +5.28 0.4.2 ========== *Fixed* @@ -1610,7 +1620,7 @@ File: README.info, Node: 042, Next: 041, Prev: 043, Up: Changelog  File: README.info, Node: 041, Next: 04, Prev: 042, Up: Changelog -5.28 0.4.1 +5.29 0.4.1 ========== *Fixed* @@ -1620,7 +1630,7 @@ File: README.info, Node: 041, Next: 04, Prev: 042, Up: Changelog  File: README.info, Node: 04, Next: 032, Prev: 041, Up: Changelog -5.29 0.4 +5.30 0.4 ======== _Note:_ The next release, 0.5, may include changes which will require @@ -1701,7 +1711,7 @@ automatically, as they will be pushed to the ‘master’ branch when ready.  File: README.info, Node: 032, Next: 031, Prev: 04, Up: Changelog -5.30 0.3.2 +5.31 0.3.2 ========== *Fixed* @@ -1714,7 +1724,7 @@ File: README.info, Node: 032, Next: 031, Prev: 04, Up: Changelog  File: README.info, Node: 031, Next: 03, Prev: 032, Up: Changelog -5.31 0.3.1 +5.32 0.3.1 ========== *Fixed* @@ -1724,7 +1734,7 @@ File: README.info, Node: 031, Next: 03, Prev: 032, Up: Changelog  File: README.info, Node: 03, Next: 023, Prev: 031, Up: Changelog -5.32 0.3 +5.33 0.3 ======== *Added* @@ -1792,7 +1802,7 @@ File: README.info, Node: 03, Next: 023, Prev: 031, Up: Changelog  File: README.info, Node: 023, Next: 022, Prev: 03, Up: Changelog -5.33 0.2.3 +5.34 0.2.3 ========== *Fixed* @@ -1802,7 +1812,7 @@ File: README.info, Node: 023, Next: 022, Prev: 03, Up: Changelog  File: README.info, Node: 022, Next: 021, Prev: 023, Up: Changelog -5.34 0.2.2 +5.35 0.2.2 ========== *Fixed* @@ -1813,7 +1823,7 @@ File: README.info, Node: 022, Next: 021, Prev: 023, Up: Changelog  File: README.info, Node: 021, Next: 02, Prev: 022, Up: Changelog -5.35 0.2.1 +5.36 0.2.1 ========== *Fixed* @@ -1823,7 +1833,7 @@ File: README.info, Node: 021, Next: 02, Prev: 022, Up: Changelog  File: README.info, Node: 02, Next: 01, Prev: 021, Up: Changelog -5.36 0.2 +5.37 0.2 ======== *Added* @@ -1906,7 +1916,7 @@ File: README.info, Node: 02, Next: 01, Prev: 021, Up: Changelog  File: README.info, Node: 01, Prev: 02, Up: Changelog -5.37 0.1 +5.38 0.1 ======== First tagged release. @@ -1964,82 +1974,83 @@ GPLv3  Tag Table: Node: Top225 -Node: Contents1935 -Node: Screenshots2058 -Node: Installation2176 -Node: Quelpa2690 -Node: Helm support3218 -Node: Usage3621 -Node: Commands4019 -Node: org-ql-find4484 -Node: org-ql-open-link5392 -Node: org-ql-refile6247 -Node: org-ql-search6575 -Node: helm-org-ql8506 -Node: org-ql-view8884 -Node: org-ql-view-sidebar9414 -Node: org-ql-view-recent-items9794 -Node: org-ql-sparse-tree10290 -Node: Queries11090 -Node: Non-sexp query syntax12207 -Node: General predicates13966 -Node: Ancestor/descendant predicates20891 -Node: Date/time predicates22019 -Node: Functions / Macros25143 -Node: Agenda-like views25441 -Ref: Function org-ql-block25603 -Node: Listing / acting-on results26864 -Ref: Caching27072 -Ref: Function org-ql-select27985 -Ref: Function org-ql-query30411 -Ref: Macro org-ql (deprecated)32185 -Node: Custom predicates32500 -Ref: Macro org-ql-defpred32724 -Node: Dynamic block36165 -Node: Links38889 -Node: Tips39576 -Node: Changelog39900 -Node: 08640800 -Node: 08541022 -Node: 08441678 -Node: 08342130 -Node: 08242471 -Node: 08142864 -Node: 0843285 -Node: 07446009 -Node: 07346232 -Node: 07246964 -Node: 07147885 -Node: 0748696 -Node: 06351562 -Node: 06252095 -Node: 06152402 -Node: 0652972 -Node: 05256028 -Node: 05156330 -Node: 0556755 -Node: 04958286 -Node: 04858568 -Node: 04758917 -Node: 04659326 -Node: 04559734 -Node: 04460095 -Node: 04360454 -Node: 04260657 -Node: 04160818 -Node: 0461065 -Node: 03265166 -Node: 03165569 -Node: 0365766 -Node: 02369066 -Node: 02269300 -Node: 02169580 -Node: 0269785 -Node: 0173863 -Node: Notes73964 -Node: Comparison with Org Agenda searches74126 -Node: org-sidebar75015 -Node: License75294 +Node: Contents1957 +Node: Screenshots2080 +Node: Installation2198 +Node: Quelpa2712 +Node: Helm support3240 +Node: Usage3643 +Node: Commands4041 +Node: org-ql-find4506 +Node: org-ql-open-link5414 +Node: org-ql-refile6269 +Node: org-ql-search6597 +Node: helm-org-ql8528 +Node: org-ql-view8906 +Node: org-ql-view-sidebar9436 +Node: org-ql-view-recent-items9816 +Node: org-ql-sparse-tree10312 +Node: Queries11112 +Node: Non-sexp query syntax12229 +Node: General predicates13988 +Node: Ancestor/descendant predicates20913 +Node: Date/time predicates22041 +Node: Functions / Macros25165 +Node: Agenda-like views25463 +Ref: Function org-ql-block25625 +Node: Listing / acting-on results26886 +Ref: Caching27094 +Ref: Function org-ql-select28007 +Ref: Function org-ql-query30433 +Ref: Macro org-ql (deprecated)32207 +Node: Custom predicates32522 +Ref: Macro org-ql-defpred32746 +Node: Dynamic block36187 +Node: Links38911 +Node: Tips39598 +Node: Changelog39922 +Node: 087-pre40844 +Node: 08640956 +Node: 08541194 +Node: 08441850 +Node: 08342302 +Node: 08242643 +Node: 08143036 +Node: 0843457 +Node: 07446181 +Node: 07346404 +Node: 07247138 +Node: 07148059 +Node: 0748870 +Node: 06351736 +Node: 06252269 +Node: 06152576 +Node: 0653146 +Node: 05256202 +Node: 05156504 +Node: 0556929 +Node: 04958460 +Node: 04858742 +Node: 04759091 +Node: 04659500 +Node: 04559908 +Node: 04460269 +Node: 04360628 +Node: 04260831 +Node: 04160992 +Node: 0461239 +Node: 03265340 +Node: 03165743 +Node: 0365940 +Node: 02369240 +Node: 02269474 +Node: 02169754 +Node: 0269959 +Node: 0174037 +Node: Notes74138 +Node: Comparison with Org Agenda searches74300 +Node: org-sidebar75189 +Node: License75468  End Tag Table From 0d9c46247db0971c44a3c67ae38c148ea07146da Mon Sep 17 00:00:00 2001 From: Ihor Radchenko Date: Sun, 8 Aug 2021 16:34:43 +0800 Subject: [PATCH 26/70] org-ql-regexp-part-ts-time: Fix for time intervals --- org-ql.el | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/org-ql.el b/org-ql.el index ead158e..569bdaa 100644 --- a/org-ql.el +++ b/org-ql.el @@ -170,7 +170,8 @@ regexps.") Includes leading space character.") (defvar org-ql-regexp-part-ts-time - (rx " " (repeat 1 2 digit) ":" (repeat 2 digit)) + (rx " " (repeat 1 2 digit) ":" (repeat 2 digit) + (optional "-" (repeat 1 2 digit) ":" (repeat 2 digit))) "Matches the inner, time part of an Org timestamp (i.e. HH:MM). Includes leading space character. Used to build other timestamp regexps.") From 02b4213826fe21bebed562e9860e1d2a7a393ce2 Mon Sep 17 00:00:00 2001 From: Adam Porter Date: Wed, 26 Jun 2024 09:56:14 -0500 Subject: [PATCH 27/70] Tests: Timestamps with inner time ranges --- tests/data-ts.org | 23 +++++++++++++++++++++++ tests/test-org-ql.el | 31 ++++++++++++++++++++++++++++++- 2 files changed, 53 insertions(+), 1 deletion(-) create mode 100644 tests/data-ts.org diff --git a/tests/data-ts.org b/tests/data-ts.org new file mode 100644 index 0000000..01ebd57 --- /dev/null +++ b/tests/data-ts.org @@ -0,0 +1,23 @@ +#+title: Timestamp-specific tests + +/Timestamps in this file are active ones./ + +* Single-timestamp ranges + +** Single-timestamp, without repeater +<2024-06-25 Tue 08:00-09:00> + +** Single-timestamp, with repeater (deadline) +DEADLINE: <2024-06-25 Tue 08:00-09:00 ++7d> + +* Multi-timestamp ranges + +/Not sure that it would make sense to use repeaters for this kind of range./ + +** Multi-timestamp, without repeater +<2024-06-25 Tue 08:00>--<2024-06-26 Wed 08:00> + +* Canary + +/This entry should never be matched./ + diff --git a/tests/test-org-ql.el b/tests/test-org-ql.el index 8d2b84c..8721e0f 100644 --- a/tests/test-org-ql.el +++ b/tests/test-org-ql.el @@ -1688,7 +1688,36 @@ with keyword arg NOW in PLIST." (org-ql-expect ((org-ql--query-string-to-sexp "ts-active:with-time=")) '("Take over the universe" "Take over the world" "Visit Mars" "Visit the moon" "Practice leaping tall buildings in a single bound" "Get haircut" "Internet" "Spaceship lease" "Fix flux capacitor" "/r/emacs" "Shop for groceries" "Rewrite Emacs in Common Lisp")) (org-ql-expect ((org-ql--query-string-to-sexp "ts-active:with-time=t")) - '("Skype with president of Antarctica" "Renew membership in supervillain club" "Order a pizza")))) + '("Skype with president of Antarctica" "Renew membership in supervillain club" "Order a pizza"))) + + (describe "matches timestamps with inner time ranges" + (before-each + (setq org-ql-test-buffer (org-ql-test-data-buffer "data-ts.org") + org-ql-test-num-headings (with-current-buffer org-ql-test-buffer + (org-with-wide-buffer + (goto-char (point-min)) + ;; Exclude the "Canary" heading. + (1- (cl-loop while (re-search-forward org-heading-regexp nil t) + sum 1)))))) + + (org-ql-it "without specified timestamp" + (org-ql-expect ('(ts-active)) + '("Single-timestamp, without repeater" "Single-timestamp, with repeater (deadline)" "Multi-timestamp, without repeater"))) + (org-ql-it "with specified timestamps" + (org-ql-expect ('(ts-active :on "2024-06-25")) + '("Single-timestamp, without repeater" "Single-timestamp, with repeater (deadline)" "Multi-timestamp, without repeater")) + (org-ql-expect ('(ts-active :on "2024-06-26")) + '("Multi-timestamp, without repeater"))) + (org-ql-it "with specified time values" + (org-ql-expect ('(ts-active :to "2024-06-25 09:00")) + '("Single-timestamp, without repeater" "Single-timestamp, with repeater (deadline)" "Multi-timestamp, without repeater")) + ;; FIXME: The test below fails because timestamps with + ;; ranges are not yet parsed into multiple timestamps and + ;; compared as a range. This will have to be addressed in + ;; a new version. + ;; (org-ql-expect ('(ts-active :from "2024-06-25 08:30")) + ;; '("Single-timestamp, without repeater" "Single-timestamp, with repeater (deadline)" "Multi-timestamp, without repeater")) + ))) (describe "inactive" From e3b956e54d6d66a346e18683f9d6be48022f1935 Mon Sep 17 00:00:00 2001 From: Adam Porter Date: Wed, 26 Jun 2024 10:22:09 -0500 Subject: [PATCH 28/70] Docs: Update changelog --- README.org | 3 +- org-ql.info | 92 +++++++++++++++++++++++++++++------------------------ 2 files changed, 52 insertions(+), 43 deletions(-) diff --git a/README.org b/README.org index e38b31c..2b73078 100644 --- a/README.org +++ b/README.org @@ -555,7 +555,8 @@ Simple links may also be written manually in either sexp or non-sexp form, like: ** 0.8.7-pre -Nothing new yet. +*Fixes* ++ Timestamps with internal time ranges (e.g. ~<2024-06-26 10:00-11:00>~) are matched for simple queries. (This support is not yet comprehensive, e.g. a query that depends on the specific inner time range may not behave as expected. Previously such timestamps were not matched at all. See [[https://github.com/alphapapa/org-ql/pull/237][#237]] and [[https://github.com/alphapapa/org-ql/issues/371][#371]]. Thanks to [[https://github.com/yantar92][Ihor Radchenko]].) ** 0.8.6 diff --git a/org-ql.info b/org-ql.info index dffc0ab..711f169 100644 --- a/org-ql.info +++ b/org-ql.info @@ -1080,7 +1080,15 @@ File: README.info, Node: 087-pre, Next: 086, Up: Changelog 5.1 0.8.7-pre ============= -Nothing new yet. +*Fixes* + • Timestamps with internal time ranges (e.g. ‘<2024-06-26 + 10:00-11:00>’) are matched for simple queries. (This support is + not yet comprehensive, e.g. a query that depends on the specific + inner time range may not behave as expected. Previously such + timestamps were not matched at all. See #237 + (https://github.com/alphapapa/org-ql/pull/237) and #371 + (https://github.com/alphapapa/org-ql/issues/371). Thanks to Ihor + Radchenko (https://github.com/yantar92).)  File: README.info, Node: 086, Next: 085, Prev: 087-pre, Up: Changelog @@ -2010,47 +2018,47 @@ Node: Links38911 Node: Tips39598 Node: Changelog39922 Node: 087-pre40844 -Node: 08640956 -Node: 08541194 -Node: 08441850 -Node: 08342302 -Node: 08242643 -Node: 08143036 -Node: 0843457 -Node: 07446181 -Node: 07346404 -Node: 07247138 -Node: 07148059 -Node: 0748870 -Node: 06351736 -Node: 06252269 -Node: 06152576 -Node: 0653146 -Node: 05256202 -Node: 05156504 -Node: 0556929 -Node: 04958460 -Node: 04858742 -Node: 04759091 -Node: 04659500 -Node: 04559908 -Node: 04460269 -Node: 04360628 -Node: 04260831 -Node: 04160992 -Node: 0461239 -Node: 03265340 -Node: 03165743 -Node: 0365940 -Node: 02369240 -Node: 02269474 -Node: 02169754 -Node: 0269959 -Node: 0174037 -Node: Notes74138 -Node: Comparison with Org Agenda searches74300 -Node: org-sidebar75189 -Node: License75468 +Node: 08641453 +Node: 08541691 +Node: 08442347 +Node: 08342799 +Node: 08243140 +Node: 08143533 +Node: 0843954 +Node: 07446678 +Node: 07346901 +Node: 07247635 +Node: 07148556 +Node: 0749367 +Node: 06352233 +Node: 06252766 +Node: 06153073 +Node: 0653643 +Node: 05256699 +Node: 05157001 +Node: 0557426 +Node: 04958957 +Node: 04859239 +Node: 04759588 +Node: 04659997 +Node: 04560405 +Node: 04460766 +Node: 04361125 +Node: 04261328 +Node: 04161489 +Node: 0461736 +Node: 03265837 +Node: 03166240 +Node: 0366437 +Node: 02369737 +Node: 02269971 +Node: 02170251 +Node: 0270456 +Node: 0174534 +Node: Notes74635 +Node: Comparison with Org Agenda searches74797 +Node: org-sidebar75686 +Node: License75965  End Tag Table From 914e64746f382436a1024cf40e5fa5c41bd37b87 Mon Sep 17 00:00:00 2001 From: Adam Porter Date: Wed, 26 Jun 2024 10:41:58 -0500 Subject: [PATCH 29/70] Fix: (org-ql-search) Interactive narrowing Fixes #430. Closes #436. Reported-by: Akira Komamura --- README.org | 1 + org-ql-search.el | 2 +- org-ql.info | 84 +++++++++++++++++++++++++----------------------- 3 files changed, 45 insertions(+), 42 deletions(-) diff --git a/README.org b/README.org index 2b73078..c746528 100644 --- a/README.org +++ b/README.org @@ -557,6 +557,7 @@ Simple links may also be written manually in either sexp or non-sexp form, like: *Fixes* + Timestamps with internal time ranges (e.g. ~<2024-06-26 10:00-11:00>~) are matched for simple queries. (This support is not yet comprehensive, e.g. a query that depends on the specific inner time range may not behave as expected. Previously such timestamps were not matched at all. See [[https://github.com/alphapapa/org-ql/pull/237][#237]] and [[https://github.com/alphapapa/org-ql/issues/371][#371]]. Thanks to [[https://github.com/yantar92][Ihor Radchenko]].) ++ Command ~org-ql-search~ did not narrow properly when called interactively. ** 0.8.6 diff --git a/org-ql-search.el b/org-ql-search.el index 57215f8..b8cd148 100644 --- a/org-ql-search.el +++ b/org-ql-search.el @@ -184,7 +184,7 @@ necessary." (interactive (list (org-ql-view--complete-buffers-files) (read-string "Query: " (when org-ql-view-query (format "%S" org-ql-view-query))) - :narrow (or org-ql-view-narrow (eq current-prefix-arg '(4))) + :narrow (or org-ql-view-narrow (equal current-prefix-arg '(4))) :super-groups (org-ql-view--complete-super-groups) :sort (org-ql-view--complete-sort))) ;; NOTE: Using `with-temp-buffer' is a hack to work around the fact that `make-local-variable' diff --git a/org-ql.info b/org-ql.info index 711f169..cce0f1e 100644 --- a/org-ql.info +++ b/org-ql.info @@ -1089,6 +1089,8 @@ File: README.info, Node: 087-pre, Next: 086, Up: Changelog (https://github.com/alphapapa/org-ql/pull/237) and #371 (https://github.com/alphapapa/org-ql/issues/371). Thanks to Ihor Radchenko (https://github.com/yantar92).) + • Command ‘org-ql-search’ did not narrow properly when called + interactively.  File: README.info, Node: 086, Next: 085, Prev: 087-pre, Up: Changelog @@ -2018,47 +2020,47 @@ Node: Links38911 Node: Tips39598 Node: Changelog39922 Node: 087-pre40844 -Node: 08641453 -Node: 08541691 -Node: 08442347 -Node: 08342799 -Node: 08243140 -Node: 08143533 -Node: 0843954 -Node: 07446678 -Node: 07346901 -Node: 07247635 -Node: 07148556 -Node: 0749367 -Node: 06352233 -Node: 06252766 -Node: 06153073 -Node: 0653643 -Node: 05256699 -Node: 05157001 -Node: 0557426 -Node: 04958957 -Node: 04859239 -Node: 04759588 -Node: 04659997 -Node: 04560405 -Node: 04460766 -Node: 04361125 -Node: 04261328 -Node: 04161489 -Node: 0461736 -Node: 03265837 -Node: 03166240 -Node: 0366437 -Node: 02369737 -Node: 02269971 -Node: 02170251 -Node: 0270456 -Node: 0174534 -Node: Notes74635 -Node: Comparison with Org Agenda searches74797 -Node: org-sidebar75686 -Node: License75965 +Node: 08641544 +Node: 08541782 +Node: 08442438 +Node: 08342890 +Node: 08243231 +Node: 08143624 +Node: 0844045 +Node: 07446769 +Node: 07346992 +Node: 07247726 +Node: 07148647 +Node: 0749458 +Node: 06352324 +Node: 06252857 +Node: 06153164 +Node: 0653734 +Node: 05256790 +Node: 05157092 +Node: 0557517 +Node: 04959048 +Node: 04859330 +Node: 04759679 +Node: 04660088 +Node: 04560496 +Node: 04460857 +Node: 04361216 +Node: 04261419 +Node: 04161580 +Node: 0461827 +Node: 03265928 +Node: 03166331 +Node: 0366528 +Node: 02369828 +Node: 02270062 +Node: 02170342 +Node: 0270547 +Node: 0174625 +Node: Notes74726 +Node: Comparison with Org Agenda searches74888 +Node: org-sidebar75777 +Node: License76056  End Tag Table From ffc3477013f0ebdb5e223d5af5c1ef489d8b0055 Mon Sep 17 00:00:00 2001 From: Adam Porter Date: Wed, 26 Jun 2024 10:52:31 -0500 Subject: [PATCH 30/70] Fix: (org-ql-regexp-part-ts-date) Allow punctuation in day-of-week Fixes . Closes . Reported-by: Florian D. --- README.org | 1 + org-ql.el | 5 +-- org-ql.info | 87 +++++++++++++++++++++++--------------------- tests/data-ts.org | 6 +++ tests/test-org-ql.el | 29 +++++++++++---- 5 files changed, 76 insertions(+), 52 deletions(-) diff --git a/README.org b/README.org index c746528..6180135 100644 --- a/README.org +++ b/README.org @@ -557,6 +557,7 @@ Simple links may also be written manually in either sexp or non-sexp form, like: *Fixes* + Timestamps with internal time ranges (e.g. ~<2024-06-26 10:00-11:00>~) are matched for simple queries. (This support is not yet comprehensive, e.g. a query that depends on the specific inner time range may not behave as expected. Previously such timestamps were not matched at all. See [[https://github.com/alphapapa/org-ql/pull/237][#237]] and [[https://github.com/alphapapa/org-ql/issues/371][#371]]. Thanks to [[https://github.com/yantar92][Ihor Radchenko]].) ++ Timestamps with day-of-the-week abbreviations are matched more flexibly (allowing, e.g. a period in French locales). (See [[https://github.com/alphapapa/org-ql/discussions/429][#429]], [[https://github.com/alphapapa/org-ql/issues/432][#432]]. Thanks to [[https://github.com/neurolit][Florian D.]] for reporting.) + Command ~org-ql-search~ did not narrow properly when called interactively. ** 0.8.6 diff --git a/org-ql.el b/org-ql.el index 569bdaa..6300dd0 100644 --- a/org-ql.el +++ b/org-ql.el @@ -157,10 +157,9 @@ This list should not contain any duplicates.")) (defvar org-ql-regexp-part-ts-date (rx (repeat 4 digit) "-" (repeat 2 digit) "-" (repeat 2 digit) ;; Day of week - (optional " " (1+ alpha))) + (optional " " (1+ (or alpha punct)))) "Matches the inner, date part of an Org timestamp, both active and inactive. -Also matches optional day-of-week. Used to build other timestamp -regexps.") +Used to build other timestamp regexps.") (defvar org-ql-regexp-part-ts-repeaters ;; Repeaters (not sure if the colon is necessary, but it's in the org.el one) diff --git a/org-ql.info b/org-ql.info index cce0f1e..325eeb0 100644 --- a/org-ql.info +++ b/org-ql.info @@ -1089,6 +1089,11 @@ File: README.info, Node: 087-pre, Next: 086, Up: Changelog (https://github.com/alphapapa/org-ql/pull/237) and #371 (https://github.com/alphapapa/org-ql/issues/371). Thanks to Ihor Radchenko (https://github.com/yantar92).) + • Timestamps with day-of-the-week abbreviations are matched more + flexibly (allowing, e.g. a period in French locales). (See #429 + (https://github.com/alphapapa/org-ql/discussions/429), #432 + (https://github.com/alphapapa/org-ql/issues/432). Thanks to + Florian D. (https://github.com/neurolit) for reporting.) • Command ‘org-ql-search’ did not narrow properly when called interactively. @@ -2020,47 +2025,47 @@ Node: Links38911 Node: Tips39598 Node: Changelog39922 Node: 087-pre40844 -Node: 08641544 -Node: 08541782 -Node: 08442438 -Node: 08342890 -Node: 08243231 -Node: 08143624 -Node: 0844045 -Node: 07446769 -Node: 07346992 -Node: 07247726 -Node: 07148647 -Node: 0749458 -Node: 06352324 -Node: 06252857 -Node: 06153164 -Node: 0653734 -Node: 05256790 -Node: 05157092 -Node: 0557517 -Node: 04959048 -Node: 04859330 -Node: 04759679 -Node: 04660088 -Node: 04560496 -Node: 04460857 -Node: 04361216 -Node: 04261419 -Node: 04161580 -Node: 0461827 -Node: 03265928 -Node: 03166331 -Node: 0366528 -Node: 02369828 -Node: 02270062 -Node: 02170342 -Node: 0270547 -Node: 0174625 -Node: Notes74726 -Node: Comparison with Org Agenda searches74888 -Node: org-sidebar75777 -Node: License76056 +Node: 08641879 +Node: 08542117 +Node: 08442773 +Node: 08343225 +Node: 08243566 +Node: 08143959 +Node: 0844380 +Node: 07447104 +Node: 07347327 +Node: 07248061 +Node: 07148982 +Node: 0749793 +Node: 06352659 +Node: 06253192 +Node: 06153499 +Node: 0654069 +Node: 05257125 +Node: 05157427 +Node: 0557852 +Node: 04959383 +Node: 04859665 +Node: 04760014 +Node: 04660423 +Node: 04560831 +Node: 04461192 +Node: 04361551 +Node: 04261754 +Node: 04161915 +Node: 0462162 +Node: 03266263 +Node: 03166666 +Node: 0366863 +Node: 02370163 +Node: 02270397 +Node: 02170677 +Node: 0270882 +Node: 0174960 +Node: Notes75061 +Node: Comparison with Org Agenda searches75223 +Node: org-sidebar76112 +Node: License76391  End Tag Table diff --git a/tests/data-ts.org b/tests/data-ts.org index 01ebd57..a5169a7 100644 --- a/tests/data-ts.org +++ b/tests/data-ts.org @@ -17,6 +17,12 @@ DEADLINE: <2024-06-25 Tue 08:00-09:00 ++7d> ** Multi-timestamp, without repeater <2024-06-25 Tue 08:00>--<2024-06-26 Wed 08:00> +* Day-of-week abbreviations + +** French + +<2024-07-12 Fri> + * Canary /This entry should never be matched./ diff --git a/tests/test-org-ql.el b/tests/test-org-ql.el index 8721e0f..6717472 100644 --- a/tests/test-org-ql.el +++ b/tests/test-org-ql.el @@ -1700,16 +1700,16 @@ with keyword arg NOW in PLIST." (1- (cl-loop while (re-search-forward org-heading-regexp nil t) sum 1)))))) - (org-ql-it "without specified timestamp" + (org-ql-it "without :with-time" (org-ql-expect ('(ts-active)) - '("Single-timestamp, without repeater" "Single-timestamp, with repeater (deadline)" "Multi-timestamp, without repeater"))) - (org-ql-it "with specified timestamps" - (org-ql-expect ('(ts-active :on "2024-06-25")) + '("Single-timestamp, without repeater" "Single-timestamp, with repeater (deadline)" "Multi-timestamp, without repeater" "French"))) + (org-ql-it ":with-time t" + (org-ql-expect ('(ts-active :on "2024-06-25" :with-time t)) '("Single-timestamp, without repeater" "Single-timestamp, with repeater (deadline)" "Multi-timestamp, without repeater")) - (org-ql-expect ('(ts-active :on "2024-06-26")) + (org-ql-expect ('(ts-active :on "2024-06-26" :with-time t)) '("Multi-timestamp, without repeater"))) - (org-ql-it "with specified time values" - (org-ql-expect ('(ts-active :to "2024-06-25 09:00")) + (org-ql-it ":with-time t and with specified time value in :to" + (org-ql-expect ('(ts-active :to "2024-06-25 09:00" :with-time t)) '("Single-timestamp, without repeater" "Single-timestamp, with repeater (deadline)" "Multi-timestamp, without repeater")) ;; FIXME: The test below fails because timestamps with ;; ranges are not yet parsed into multiple timestamps and @@ -1856,7 +1856,20 @@ with keyword arg NOW in PLIST." '("Visit Mars"))) (org-ql-then (:now "2019-07-07") (org-ql-expect ('(ts :on today)) - nil))))) + nil)))) + + (describe "Day-of-week abbreviations" + (before-each + (setq org-ql-test-buffer (org-ql-test-data-buffer "data-ts.org") + org-ql-test-num-headings (with-current-buffer org-ql-test-buffer + (org-with-wide-buffer + (goto-char (point-min)) + ;; Exclude the "Canary" heading. + (1- (cl-loop while (re-search-forward org-heading-regexp nil t) + sum 1)))))) + (org-ql-it "matches French abbreviations (with trailing period)" + (org-ql-expect ('(ts :on "2024-07-12")) + '("French"))))) (describe "Compound queries" From b362dd68b000c804327bdf1b58d30e73449d4f4f Mon Sep 17 00:00:00 2001 From: Adam Porter Date: Wed, 26 Jun 2024 11:28:11 -0500 Subject: [PATCH 31/70] Fix: (org-dblock-write:org-ql) Resolve element properties Fixes . Reported-by: Jez Cope --- README.org | 3 ++ org-ql-search.el | 3 +- org-ql.info | 87 +++++++++++++++++++++++++----------------------- 3 files changed, 51 insertions(+), 42 deletions(-) diff --git a/README.org b/README.org index 6180135..8be6a28 100644 --- a/README.org +++ b/README.org @@ -560,6 +560,9 @@ Simple links may also be written manually in either sexp or non-sexp form, like: + Timestamps with day-of-the-week abbreviations are matched more flexibly (allowing, e.g. a period in French locales). (See [[https://github.com/alphapapa/org-ql/discussions/429][#429]], [[https://github.com/alphapapa/org-ql/issues/432][#432]]. Thanks to [[https://github.com/neurolit][Florian D.]] for reporting.) + Command ~org-ql-search~ did not narrow properly when called interactively. +*Compatibility* ++ Dynamic blocks work with Org 9.7. ([[https://github.com/alphapapa/org-ql/issues/431][#431]]. Thanks to [[https://github.com/jezcope][Jez Cope]] for reporting.) + ** 0.8.6 *Fixes* diff --git a/org-ql-search.el b/org-ql-search.el index b8cd148..72a2153 100644 --- a/org-ql-search.el +++ b/org-ql-search.el @@ -347,7 +347,8 @@ this (must be a single line in the Org buffer): (org-element-property (intern (concat ":" (upcase property))) element))))) (elements (org-ql-query :from (current-buffer) :where query - :select '(org-element-headline-parser (line-end-position)) + :select '(org-ql-view--resolve-element-properties + (org-element-headline-parser (line-end-position))) :order-by sort))) (when take (setf elements (cl-etypecase take diff --git a/org-ql.info b/org-ql.info index 325eeb0..4c8ac2c 100644 --- a/org-ql.info +++ b/org-ql.info @@ -1097,6 +1097,11 @@ File: README.info, Node: 087-pre, Next: 086, Up: Changelog • Command ‘org-ql-search’ did not narrow properly when called interactively. + *Compatibility* + • Dynamic blocks work with Org 9.7. (#431 + (https://github.com/alphapapa/org-ql/issues/431). Thanks to Jez + Cope (https://github.com/jezcope) for reporting.) +  File: README.info, Node: 086, Next: 085, Prev: 087-pre, Up: Changelog @@ -2025,47 +2030,47 @@ Node: Links38911 Node: Tips39598 Node: Changelog39922 Node: 087-pre40844 -Node: 08641879 -Node: 08542117 -Node: 08442773 -Node: 08343225 -Node: 08243566 -Node: 08143959 -Node: 0844380 -Node: 07447104 -Node: 07347327 -Node: 07248061 -Node: 07148982 -Node: 0749793 -Node: 06352659 -Node: 06253192 -Node: 06153499 -Node: 0654069 -Node: 05257125 -Node: 05157427 -Node: 0557852 -Node: 04959383 -Node: 04859665 -Node: 04760014 -Node: 04660423 -Node: 04560831 -Node: 04461192 -Node: 04361551 -Node: 04261754 -Node: 04161915 -Node: 0462162 -Node: 03266263 -Node: 03166666 -Node: 0366863 -Node: 02370163 -Node: 02270397 -Node: 02170677 -Node: 0270882 -Node: 0174960 -Node: Notes75061 -Node: Comparison with Org Agenda searches75223 -Node: org-sidebar76112 -Node: License76391 +Node: 08642072 +Node: 08542310 +Node: 08442966 +Node: 08343418 +Node: 08243759 +Node: 08144152 +Node: 0844573 +Node: 07447297 +Node: 07347520 +Node: 07248254 +Node: 07149175 +Node: 0749986 +Node: 06352852 +Node: 06253385 +Node: 06153692 +Node: 0654262 +Node: 05257318 +Node: 05157620 +Node: 0558045 +Node: 04959576 +Node: 04859858 +Node: 04760207 +Node: 04660616 +Node: 04561024 +Node: 04461385 +Node: 04361744 +Node: 04261947 +Node: 04162108 +Node: 0462355 +Node: 03266456 +Node: 03166859 +Node: 0367056 +Node: 02370356 +Node: 02270590 +Node: 02170870 +Node: 0271075 +Node: 0175153 +Node: Notes75254 +Node: Comparison with Org Agenda searches75416 +Node: org-sidebar76305 +Node: License76584  End Tag Table From c2b4404808185a9d5e160c8eea7967f906f77fd3 Mon Sep 17 00:00:00 2001 From: Adam Porter Date: Wed, 26 Jun 2024 11:31:17 -0500 Subject: [PATCH 32/70] Release: v0.8.7 --- README.org | 2 +- org-ql.el | 2 +- org-ql.info | 166 ++++++++++++++++++++++++++-------------------------- 3 files changed, 85 insertions(+), 85 deletions(-) diff --git a/README.org b/README.org index 8be6a28..9e3bd54 100644 --- a/README.org +++ b/README.org @@ -553,7 +553,7 @@ Simple links may also be written manually in either sexp or non-sexp form, like: /Note:/ Breaking changes may be made before version 1.0, but in the event of major changes, attempts at backward compatibility will be made with obsolescence declarations, translation of arguments, etc. Users who need stability guarantees before 1.0 may choose to use tagged stable releases. -** 0.8.7-pre +** 0.8.7 *Fixes* + Timestamps with internal time ranges (e.g. ~<2024-06-26 10:00-11:00>~) are matched for simple queries. (This support is not yet comprehensive, e.g. a query that depends on the specific inner time range may not behave as expected. Previously such timestamps were not matched at all. See [[https://github.com/alphapapa/org-ql/pull/237][#237]] and [[https://github.com/alphapapa/org-ql/issues/371][#371]]. Thanks to [[https://github.com/yantar92][Ihor Radchenko]].) diff --git a/org-ql.el b/org-ql.el index 6300dd0..87d2dab 100644 --- a/org-ql.el +++ b/org-ql.el @@ -4,7 +4,7 @@ ;; Author: Adam Porter ;; Url: https://github.com/alphapapa/org-ql -;; Version: 0.8.7-pre +;; Version: 0.8.7 ;; Package-Requires: ((emacs "27.1") (compat "29.1") (dash "2.18.1") (f "0.17.2") (map "2.1") (org "9.0") (org-super-agenda "1.2") (ov "1.0.6") (peg "1.0.1") (s "1.12.0") (transient "0.1") (ts "0.2-pre")) ;; Keywords: hypermedia, outlines, Org, agenda diff --git a/org-ql.info b/org-ql.info index 4c8ac2c..a408934 100644 --- a/org-ql.info +++ b/org-ql.info @@ -72,7 +72,7 @@ Functions / Macros Changelog -* 0.8.7-pre: 087-pre. +* 0.8.7: 087. * 0.8.6: 086. * 0.8.5: 085. * 0.8.4: 084. @@ -1035,7 +1035,7 @@ releases. * Menu: -* 0.8.7-pre: 087-pre. +* 0.8.7: 087. * 0.8.6: 086. * 0.8.5: 085. * 0.8.4: 084. @@ -1075,10 +1075,10 @@ releases. * 0.1: 01.  -File: README.info, Node: 087-pre, Next: 086, Up: Changelog +File: README.info, Node: 087, Next: 086, Up: Changelog -5.1 0.8.7-pre -============= +5.1 0.8.7 +========= *Fixes* • Timestamps with internal time ranges (e.g. ‘<2024-06-26 @@ -1103,7 +1103,7 @@ File: README.info, Node: 087-pre, Next: 086, Up: Changelog Cope (https://github.com/jezcope) for reporting.)  -File: README.info, Node: 086, Next: 085, Prev: 087-pre, Up: Changelog +File: README.info, Node: 086, Next: 085, Prev: 087, Up: Changelog 5.2 0.8.6 ========= @@ -1994,83 +1994,83 @@ GPLv3  Tag Table: Node: Top225 -Node: Contents1957 -Node: Screenshots2080 -Node: Installation2198 -Node: Quelpa2712 -Node: Helm support3240 -Node: Usage3643 -Node: Commands4041 -Node: org-ql-find4506 -Node: org-ql-open-link5414 -Node: org-ql-refile6269 -Node: org-ql-search6597 -Node: helm-org-ql8528 -Node: org-ql-view8906 -Node: org-ql-view-sidebar9436 -Node: org-ql-view-recent-items9816 -Node: org-ql-sparse-tree10312 -Node: Queries11112 -Node: Non-sexp query syntax12229 -Node: General predicates13988 -Node: Ancestor/descendant predicates20913 -Node: Date/time predicates22041 -Node: Functions / Macros25165 -Node: Agenda-like views25463 -Ref: Function org-ql-block25625 -Node: Listing / acting-on results26886 -Ref: Caching27094 -Ref: Function org-ql-select28007 -Ref: Function org-ql-query30433 -Ref: Macro org-ql (deprecated)32207 -Node: Custom predicates32522 -Ref: Macro org-ql-defpred32746 -Node: Dynamic block36187 -Node: Links38911 -Node: Tips39598 -Node: Changelog39922 -Node: 087-pre40844 -Node: 08642072 -Node: 08542310 -Node: 08442966 -Node: 08343418 -Node: 08243759 -Node: 08144152 -Node: 0844573 -Node: 07447297 -Node: 07347520 -Node: 07248254 -Node: 07149175 -Node: 0749986 -Node: 06352852 -Node: 06253385 -Node: 06153692 -Node: 0654262 -Node: 05257318 -Node: 05157620 -Node: 0558045 -Node: 04959576 -Node: 04859858 -Node: 04760207 -Node: 04660616 -Node: 04561024 -Node: 04461385 -Node: 04361744 -Node: 04261947 -Node: 04162108 -Node: 0462355 -Node: 03266456 -Node: 03166859 -Node: 0367056 -Node: 02370356 -Node: 02270590 -Node: 02170870 -Node: 0271075 -Node: 0175153 -Node: Notes75254 -Node: Comparison with Org Agenda searches75416 -Node: org-sidebar76305 -Node: License76584 +Node: Contents1949 +Node: Screenshots2072 +Node: Installation2190 +Node: Quelpa2704 +Node: Helm support3232 +Node: Usage3635 +Node: Commands4033 +Node: org-ql-find4498 +Node: org-ql-open-link5406 +Node: org-ql-refile6261 +Node: org-ql-search6589 +Node: helm-org-ql8520 +Node: org-ql-view8898 +Node: org-ql-view-sidebar9428 +Node: org-ql-view-recent-items9808 +Node: org-ql-sparse-tree10304 +Node: Queries11104 +Node: Non-sexp query syntax12221 +Node: General predicates13980 +Node: Ancestor/descendant predicates20905 +Node: Date/time predicates22033 +Node: Functions / Macros25157 +Node: Agenda-like views25455 +Ref: Function org-ql-block25617 +Node: Listing / acting-on results26878 +Ref: Caching27086 +Ref: Function org-ql-select27999 +Ref: Function org-ql-query30425 +Ref: Macro org-ql (deprecated)32199 +Node: Custom predicates32514 +Ref: Macro org-ql-defpred32738 +Node: Dynamic block36179 +Node: Links38903 +Node: Tips39590 +Node: Changelog39914 +Node: 08740828 +Node: 08642044 +Node: 08542278 +Node: 08442934 +Node: 08343386 +Node: 08243727 +Node: 08144120 +Node: 0844541 +Node: 07447265 +Node: 07347488 +Node: 07248222 +Node: 07149143 +Node: 0749954 +Node: 06352820 +Node: 06253353 +Node: 06153660 +Node: 0654230 +Node: 05257286 +Node: 05157588 +Node: 0558013 +Node: 04959544 +Node: 04859826 +Node: 04760175 +Node: 04660584 +Node: 04560992 +Node: 04461353 +Node: 04361712 +Node: 04261915 +Node: 04162076 +Node: 0462323 +Node: 03266424 +Node: 03166827 +Node: 0367024 +Node: 02370324 +Node: 02270558 +Node: 02170838 +Node: 0271043 +Node: 0175121 +Node: Notes75222 +Node: Comparison with Org Agenda searches75384 +Node: org-sidebar76273 +Node: License76552  End Tag Table From d4faa216407b6b99f8e4a75512ac8fc8640d67c5 Mon Sep 17 00:00:00 2001 From: Adam Porter Date: Wed, 26 Jun 2024 12:01:32 -0500 Subject: [PATCH 33/70] Fix: (data-ts.org) French day-of-week abbreviation The test data in v0.8.7 was accidentally changed to the English abbreviation (the perils of working on systems with differing locales), but the feature works as intended. See . --- tests/data-ts.org | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/data-ts.org b/tests/data-ts.org index a5169a7..d533493 100644 --- a/tests/data-ts.org +++ b/tests/data-ts.org @@ -21,7 +21,7 @@ DEADLINE: <2024-06-25 Tue 08:00-09:00 ++7d> ** French -<2024-07-12 Fri> +<2024-07-12 ven.> * Canary From ccbd5b45942602616a34ede5368446041f84c4f7 Mon Sep 17 00:00:00 2001 From: Adam Porter Date: Thu, 27 Jun 2024 07:02:09 -0500 Subject: [PATCH 34/70] Meta: (test.yml) Also test on Emacs 29.1-29.4 --- .github/workflows/test.yml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 4f11ce7..2de58b4 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -45,6 +45,10 @@ jobs: - 27.2 - 28.1 - 28.2 + - 29.1 + - 29.2 + - 29.3 + - 29.4 - snapshot steps: - uses: purcell/setup-emacs@master From bfb0fbeec11007fa570a8fbca7e61f950f8ee206 Mon Sep 17 00:00:00 2001 From: Adam Porter Date: Thu, 27 Jun 2024 07:41:16 -0500 Subject: [PATCH 35/70] Tests: Declare requirement on xr This was overlooked because makem.sh gets run with --install-linters, which installs relint, which depends on xr. --- tests/test-org-ql.el | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/test-org-ql.el b/tests/test-org-ql.el index 3e1ce25..7f5431c 100644 --- a/tests/test-org-ql.el +++ b/tests/test-org-ql.el @@ -3,7 +3,7 @@ ;; Copyright (C) 2019 Adam Porter ;; Author: Adam Porter -;; Package-Requires: ((buttercup) (with-simulated-input)) +;; Package-Requires: ((buttercup) (with-simulated-input) (xr)) ;; This program is free software; you can redistribute it and/or modify ;; it under the terms of the GNU General Public License as published by From a8608f408bc526d1bb1b806eb418ff52f6233046 Mon Sep 17 00:00:00 2001 From: Adam Porter Date: Thu, 27 Jun 2024 07:44:10 -0500 Subject: [PATCH 36/70] Fix/Meta: (makem.sh) Update to v0.7.1 This omits the obsolete Org ELPA repository, which apparently was causing a very old version of Org to be installed, which appeared to be causing Buttercup to inexplicably hang (sometimes, on some systems, in some circumstances...?). I don't know if this is related to Guix commit , which disables the tests due to Buttercup hanging, because Guix is not running the tests through makem.sh. --- makem.sh | 16 +++------------- 1 file changed, 3 insertions(+), 13 deletions(-) diff --git a/makem.sh b/makem.sh index c320e5d..fd81e0f 100755 --- a/makem.sh +++ b/makem.sh @@ -3,7 +3,7 @@ # * makem.sh --- Script to aid building and testing Emacs Lisp packages # URL: https://github.com/alphapapa/makem.sh -# Version: 0.7 +# Version: 0.7.1 # * Commentary: @@ -307,7 +307,6 @@ function elisp-package-initialize-file { (setq package-archives (list (cons "gnu" "https://elpa.gnu.org/packages/") (cons "melpa" "https://melpa.org/packages/") (cons "melpa-stable" "https://stable.melpa.org/packages/"))) -$elisp_org_package_archive (package-initialize) EOF echo $file @@ -1124,21 +1123,15 @@ args_package_archives=( --eval "(add-to-list 'package-archives '(\"melpa\" . \"https://melpa.org/packages/\") t)" ) -args_org_package_archives=( - --eval "(add-to-list 'package-archives '(\"org\" . \"https://orgmode.org/elpa/\") t)" -) - args_package_init=( --eval "(package-initialize)" ) -elisp_org_package_archive="(add-to-list 'package-archives '(\"org\" . \"https://orgmode.org/elpa/\") t)" - # * Args args=$(getopt -n "$0" \ - -o dhce:E:i:s::vf:CO \ - -l compile-batch,exclude:,emacs:,install-deps,install-linters,debug,debug-load-path,help,install:,verbose,file:,no-color,no-compile,no-org-repo,sandbox:: \ + -o dhce:E:i:s::vf:C \ + -l compile-batch,exclude:,emacs:,install-deps,install-linters,debug,debug-load-path,help,install:,verbose,file:,no-color,no-compile,sandbox:: \ -- "$@") \ || { usage; exit 1; } eval set -- "$args" @@ -1202,9 +1195,6 @@ do shift args_files+=("$1") ;; - -O|--no-org-repo) - unset elisp_org_package_archive - ;; --no-color) unset color ;; From 611198155dbdd5c82d00475aa6587273150c5e8f Mon Sep 17 00:00:00 2001 From: Adam Porter Date: Thu, 27 Jun 2024 08:03:04 -0500 Subject: [PATCH 37/70] Tests: Fix filename tests for CI As the comment says, in CI the filenames are being abbreviated, which I can't explain (it has not always been this way). So we compare them in abbreviated form. --- tests/test-org-ql.el | 40 +++++++++++++++++++++++++--------------- 1 file changed, 25 insertions(+), 15 deletions(-) diff --git a/tests/test-org-ql.el b/tests/test-org-ql.el index 7f5431c..7618327 100644 --- a/tests/test-org-ql.el +++ b/tests/test-org-ql.el @@ -2111,21 +2111,31 @@ with keyword arg NOW in PLIST." (describe "Buffers/Files" :var ((query '(and (todo "TODO") (regexp "heading"))) (one-filename (car temp-filenames))) - (it "One filename matches" - (expect (var-after-bookmark-set-and-jump 'org-ql-view-buffers-files one-filename query) - :to-equal one-filename)) - (it "A list of filenames matches" - (expect (var-after-bookmark-set-and-jump 'org-ql-view-buffers-files temp-filenames query) - :to-equal temp-filenames)) - ;; NOTE: These actually bookmark the filenames backing the buffers. - (it "One buffer matches" - (expect (var-after-bookmark-set-and-jump 'org-ql-view-buffers-files - (find-file-noselect (car temp-filenames)) query) - :to-equal one-filename)) - (it "A list of buffers matches" - (expect (var-after-bookmark-set-and-jump 'org-ql-view-buffers-files - (mapcar #'find-file-noselect temp-filenames) query) - :to-equal temp-filenames))))) + ;; NOTE: Inexplicably, on GitHub CI, the filenames are being + ;; abbreviated (i.e. "/home/FOO" is replaced with "~/FOO"); + ;; I can only guess it's something to do with the way the + ;; Emacs instance is built in the Nix images we use there. + ;; So we have to compare the filenames in abbreviated form. + (cl-labels ((filenames-equal-p (a b) + (seq-set-equal-p (mapcar #'abbreviate-file-name a) + (mapcar #'abbreviate-file-name b)))) + (it "One filename matches" + (should (equal (abbreviate-file-name + (var-after-bookmark-set-and-jump 'org-ql-view-buffers-files one-filename query)) + (abbreviate-file-name one-filename)))) + (it "A list of filenames matches" + (should (filenames-equal-p (var-after-bookmark-set-and-jump 'org-ql-view-buffers-files temp-filenames query) + temp-filenames))) + ;; NOTE: These actually bookmark the filenames backing the buffers. + (it "One buffer matches" + (should (equal (abbreviate-file-name + (var-after-bookmark-set-and-jump 'org-ql-view-buffers-files + (find-file-noselect (car temp-filenames)) query)) + (abbreviate-file-name one-filename)))) + (it "A list of buffers matches" + (should (filenames-equal-p (var-after-bookmark-set-and-jump 'org-ql-view-buffers-files + (mapcar #'find-file-noselect temp-filenames) query) + temp-filenames))))))) (describe "Dynamic blocks" (describe "warn about sexp queries" From b7d4856f926cb71e01427a940dc948a48b0a702d Mon Sep 17 00:00:00 2001 From: Adam Porter Date: Thu, 27 Jun 2024 09:10:47 -0500 Subject: [PATCH 38/70] Fix: (org-ql--define-query-preamble-fn) Pcase pattern for Emacs 30 Now all tests and lints pass on Emacs versions 27.1-29.4. But on the current Emacs snapshot build used in CI, Buttercup is hanging indefinitely, which may be the same problem that led Guix to disable the tests in . But I've no way of knowing whether that's a problem in org-ql (seems unlikely), Emacs snapshot, or Buttercup. It would be nice to solve this before Emacs 30.1 is released, but I don't know how to peer inside Buttercup to find out what it's hanging on. Fixes #433. Reported-by: Akira Komamura Co-developed-by: Stefan Monnier --- README.org | 3 +- org-ql.el | 8 ++--- org-ql.info | 96 ++++++++++++++++++++++++++++------------------------- 3 files changed, 56 insertions(+), 51 deletions(-) diff --git a/README.org b/README.org index 4fb2fb9..61995fb 100644 --- a/README.org +++ b/README.org @@ -556,7 +556,8 @@ Simple links may also be written manually in either sexp or non-sexp form, like: ** 0.9-pre -Nothing new yet. +*Compatibility* ++ Fix compilation error on Emacs 30. ([[https://github.com/alphapapa/org-ql/issues/433][#433]]. Thanks to [[https://github.com/akirak][Akira Komamura]] and [[https://github.com/monnier][Stefan Monnier]].) *** helm-org-ql diff --git a/org-ql.el b/org-ql.el index 921a5b2..811bd92 100644 --- a/org-ql.el +++ b/org-ql.el @@ -1118,10 +1118,10 @@ defined in `org-ql-predicates' by calling `org-ql-defpred'." ;; Only one preamble is allowed element) (pcase element - ;; FIXME: Should the pattern below be "`(or . ,_)"? It - ;; seems to work fine either way, but it seems like it - ;; should be changed. - (`(or _) element) + (`(or ,element) + ;; A predicate with a single name: unwrap the OR. (Pcase doesn't like + ;; "one-armed ORs", giving a "Please avoid it" compilation error.) + element) ,@preamble-patterns diff --git a/org-ql.info b/org-ql.info index cf608ad..c2641b7 100644 --- a/org-ql.info +++ b/org-ql.info @@ -1091,7 +1091,11 @@ File: README.info, Node: 09-pre, Next: 087, Up: Changelog 5.1 0.9-pre =========== -Nothing new yet. +*Compatibility* + • Fix compilation error on Emacs 30. (#433 + (https://github.com/alphapapa/org-ql/issues/433). Thanks to Akira + Komamura (https://github.com/akirak) and Stefan Monnier + (https://github.com/monnier).) * Menu: @@ -2088,51 +2092,51 @@ Node: Links39023 Node: Tips39710 Node: Changelog40034 Node: 09-pre40973 -Node: helm-org-ql (1)41122 -Node: 08741263 -Node: 08642494 -Node: 08542728 -Node: 08443384 -Node: 08343836 -Node: 08244177 -Node: 08144570 -Node: 0844991 -Node: 07447715 -Node: 07347940 -Node: 07248674 -Node: 07149595 -Node: 0750406 -Node: 06353272 -Node: 06253805 -Node: 06154112 -Node: 0654682 -Node: 05257738 -Node: 05158040 -Node: 0558465 -Node: 04959996 -Node: 04860278 -Node: 04760627 -Node: 04661036 -Node: 04561444 -Node: 04461805 -Node: 04362164 -Node: 04262367 -Node: 04162528 -Node: 0462775 -Node: 03266876 -Node: 03167279 -Node: 0367476 -Node: 02370776 -Node: 02271010 -Node: 02171290 -Node: 0271495 -Node: 0175573 -Node: Development75674 -Node: Copyright assignment75907 -Node: Notes76497 -Node: Comparison with Org Agenda searches76661 -Node: org-sidebar77550 -Node: License77829 +Node: helm-org-ql (1)41339 +Node: 08741480 +Node: 08642711 +Node: 08542945 +Node: 08443601 +Node: 08344053 +Node: 08244394 +Node: 08144787 +Node: 0845208 +Node: 07447932 +Node: 07348157 +Node: 07248891 +Node: 07149812 +Node: 0750623 +Node: 06353489 +Node: 06254022 +Node: 06154329 +Node: 0654899 +Node: 05257955 +Node: 05158257 +Node: 0558682 +Node: 04960213 +Node: 04860495 +Node: 04760844 +Node: 04661253 +Node: 04561661 +Node: 04462022 +Node: 04362381 +Node: 04262584 +Node: 04162745 +Node: 0462992 +Node: 03267093 +Node: 03167496 +Node: 0367693 +Node: 02370993 +Node: 02271227 +Node: 02171507 +Node: 0271712 +Node: 0175790 +Node: Development75891 +Node: Copyright assignment76124 +Node: Notes76714 +Node: Comparison with Org Agenda searches76878 +Node: org-sidebar77767 +Node: License78046  End Tag Table From ba49d0e3c7ed38e0603707bb7d23f6ce12b0813d Mon Sep 17 00:00:00 2001 From: Adam Porter Date: Mon, 26 Aug 2024 07:14:31 -0500 Subject: [PATCH 39/70] Change: Respect narrowing in org-ql-find 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"). --- org-ql-completing-read.el | 5 ++++- org-ql-find.el | 40 ++++++++++++++++++++++++--------------- 2 files changed, 29 insertions(+), 16 deletions(-) diff --git a/org-ql-completing-read.el b/org-ql-completing-read.el index 18cfd7f..03f3db1 100644 --- a/org-ql-completing-read.el +++ b/org-ql-completing-read.el @@ -134,7 +134,7 @@ value, or nil." ;;;###autoload (cl-defun org-ql-completing-read - (buffers-files &key query-prefix query-filter + (buffers-files &key query-prefix query-filter narrowp (action #'org-ql-completing-read-action) ;; FIXME: Unused argument. ;; (annotate #'org-ql-completing-read-snippet) @@ -145,6 +145,8 @@ value, or nil." "Return marker at entry in BUFFERS-FILES selected with `org-ql'. PROMPT is shown to the user. +NARROWP is passed to `org-ql-select', which see. + QUERY-PREFIX may be a string to prepend to the query entered by the user (e.g. use \"heading:\" to only search headings, easily creating a custom command that saves the user from having to type @@ -323,6 +325,7 @@ single predicate)." bow (or ,@query-tokens) (0+ (not space)) (optional (repeat 1 3 (0+ space) (repeat 1 15 (not space)))))))) (org-ql-select buffers-files (org-ql--query-string-to-sexp input) + :narrow narrowp :action #'action)))) (unless (listp buffers-files) ;; Since we map across this argument, we ensure it's a list. diff --git a/org-ql-find.el b/org-ql-find.el index 820d2dd..ed6d21d 100644 --- a/org-ql-find.el +++ b/org-ql-find.el @@ -54,14 +54,18 @@ See function `display-buffer'." ;;;; Commands ;;;###autoload -(cl-defun org-ql-find (buffers-files &key query-prefix query-filter +(cl-defun org-ql-find (buffers-files &key query-prefix query-filter widen (prompt "Find entry: ")) "Go to an Org entry in BUFFERS-FILES selected by searching entries with `org-ql'. Interactively, search the buffers and files relevant to the current buffer (i.e. in `org-agenda-mode', the value of `org-ql-view-buffers-files' or `org-agenda-contributing-files'; -in `org-mode', that buffer). With universal prefix, select -multiple buffers to search with completion and PROMPT. +in `org-mode', that buffer). + +With one or more universal prefix arguments, WIDEN buffers before +searching (otherwise, respect any narrowing). With two universal +prefix arguments, select multiple buffers to search with +completion and PROMPT. QUERY-PREFIX may be a string to prepend to the query (e.g. use \"heading:\" to only search headings, easily creating a custom @@ -72,11 +76,17 @@ types is filtered before execution (e.g. it could replace spaces with commas to turn multiple tokens, which would normally be treated as multiple predicates, into multiple arguments to a single predicate)." - (interactive (list (org-ql-find--buffers))) - (let ((marker (org-ql-completing-read buffers-files - :query-prefix query-prefix - :query-filter query-filter - :prompt prompt))) + (interactive (list (org-ql-find--buffers + :read-buffer-p (equal '(16) current-prefix-arg)) + :widen current-prefix-arg)) + (let ((marker (save-restriction + (when (and widen (equal (current-buffer) buffers-files)) + (widen)) + (org-ql-completing-read buffers-files + :narrowp (not widen) + :query-prefix query-prefix + :query-filter query-filter + :prompt prompt)))) (set-buffer (or (buffer-base-buffer (marker-buffer marker)) (marker-buffer marker))) (pop-to-buffer (current-buffer) org-ql-find-display-buffer-action) @@ -195,15 +205,15 @@ multiple buffers to search with completion and PROMPT." ;;;; Functions -(defun org-ql-find--buffers () - "Return list of buffers to search in. +(cl-defun org-ql-find--buffers (&key read-buffer-p) + "Return buffer or list of buffers to search in. In a mode derived from `org-agenda-mode', return the value of `org-ql-view-buffers-files' or `org-agenda-contributing-files'. -In a mode derived from `org-mode', return the current buffer. -When `current-prefix-arg', read a list of buffers in `org-mode' -with completion. To be used in `org-ql-find' commands' -interactive forms." - (if current-prefix-arg +In a mode derived from `org-mode', return the current buffer. If +READ-BUFFER-P, read a list of buffers in `org-mode' with +completion. To be used in `org-ql-find' commands' interactive +forms." + (if read-buffer-p (mapcar #'get-buffer (completing-read-multiple "Buffers: " From cfe5300987dcec095ccbced0ae2c77a847bca681 Mon Sep 17 00:00:00 2001 From: Adam Porter Date: Mon, 26 Aug 2024 07:19:09 -0500 Subject: [PATCH 40/70] Docs: Update changelog --- README.org | 4 +++ org-ql.info | 100 ++++++++++++++++++++++++++++------------------------ 2 files changed, 58 insertions(+), 46 deletions(-) diff --git a/README.org b/README.org index 61995fb..3382496 100644 --- a/README.org +++ b/README.org @@ -556,6 +556,10 @@ Simple links may also be written manually in either sexp or non-sexp form, like: ** 0.9-pre +*Changes* ++ Command ~org-ql-find~ respects narrowing of the current buffer by default, allowing searching within the narrowed region. (Using one ~C-u~ argument widens the current buffer, and using two ~C-u~ arguments prompts for the buffers to search.) ++ Function ~org-ql-completing-read~ accepts a new ~NARROWP~ argument, which is passed to ~org-ql-select~. + *Compatibility* + Fix compilation error on Emacs 30. ([[https://github.com/alphapapa/org-ql/issues/433][#433]]. Thanks to [[https://github.com/akirak][Akira Komamura]] and [[https://github.com/monnier][Stefan Monnier]].) diff --git a/org-ql.info b/org-ql.info index c2641b7..edf994a 100644 --- a/org-ql.info +++ b/org-ql.info @@ -1091,7 +1091,15 @@ File: README.info, Node: 09-pre, Next: 087, Up: Changelog 5.1 0.9-pre =========== -*Compatibility* +*Changes* + • Command ‘org-ql-find’ respects narrowing of the current buffer by + default, allowing searching within the narrowed region. (Using one + ‘C-u’ argument widens the current buffer, and using two ‘C-u’ + arguments prompts for the buffers to search.) + • Function ‘org-ql-completing-read’ accepts a new ‘NARROWP’ argument, + which is passed to ‘org-ql-select’. + + *Compatibility* • Fix compilation error on Emacs 30. (#433 (https://github.com/alphapapa/org-ql/issues/433). Thanks to Akira Komamura (https://github.com/akirak) and Stefan Monnier @@ -2092,51 +2100,51 @@ Node: Links39023 Node: Tips39710 Node: Changelog40034 Node: 09-pre40973 -Node: helm-org-ql (1)41339 -Node: 08741480 -Node: 08642711 -Node: 08542945 -Node: 08443601 -Node: 08344053 -Node: 08244394 -Node: 08144787 -Node: 0845208 -Node: 07447932 -Node: 07348157 -Node: 07248891 -Node: 07149812 -Node: 0750623 -Node: 06353489 -Node: 06254022 -Node: 06154329 -Node: 0654899 -Node: 05257955 -Node: 05158257 -Node: 0558682 -Node: 04960213 -Node: 04860495 -Node: 04760844 -Node: 04661253 -Node: 04561661 -Node: 04462022 -Node: 04362381 -Node: 04262584 -Node: 04162745 -Node: 0462992 -Node: 03267093 -Node: 03167496 -Node: 0367693 -Node: 02370993 -Node: 02271227 -Node: 02171507 -Node: 0271712 -Node: 0175790 -Node: Development75891 -Node: Copyright assignment76124 -Node: Notes76714 -Node: Comparison with Org Agenda searches76878 -Node: org-sidebar77767 -Node: License78046 +Node: helm-org-ql (1)41757 +Node: 08741898 +Node: 08643129 +Node: 08543363 +Node: 08444019 +Node: 08344471 +Node: 08244812 +Node: 08145205 +Node: 0845626 +Node: 07448350 +Node: 07348575 +Node: 07249309 +Node: 07150230 +Node: 0751041 +Node: 06353907 +Node: 06254440 +Node: 06154747 +Node: 0655317 +Node: 05258373 +Node: 05158675 +Node: 0559100 +Node: 04960631 +Node: 04860913 +Node: 04761262 +Node: 04661671 +Node: 04562079 +Node: 04462440 +Node: 04362799 +Node: 04263002 +Node: 04163163 +Node: 0463410 +Node: 03267511 +Node: 03167914 +Node: 0368111 +Node: 02371411 +Node: 02271645 +Node: 02171925 +Node: 0272130 +Node: 0176208 +Node: Development76309 +Node: Copyright assignment76542 +Node: Notes77132 +Node: Comparison with Org Agenda searches77296 +Node: org-sidebar78185 +Node: License78464  End Tag Table From b6704c28144693fa60f8f95a5b2dfdfa535e507d Mon Sep 17 00:00:00 2001 From: Adam Porter Date: Thu, 29 Aug 2024 14:19:10 -0500 Subject: [PATCH 41/70] Meta: v0.8.8-pre --- README.org | 4 + org-ql.el | 2 +- org-ql.info | 245 +++++++++++++++++++++++++++------------------------- 3 files changed, 133 insertions(+), 118 deletions(-) diff --git a/README.org b/README.org index 9e3bd54..a85e227 100644 --- a/README.org +++ b/README.org @@ -553,6 +553,10 @@ Simple links may also be written manually in either sexp or non-sexp form, like: /Note:/ Breaking changes may be made before version 1.0, but in the event of major changes, attempts at backward compatibility will be made with obsolescence declarations, translation of arguments, etc. Users who need stability guarantees before 1.0 may choose to use tagged stable releases. +** 0.8.8-pre + +Nothing new yet. + ** 0.8.7 *Fixes* diff --git a/org-ql.el b/org-ql.el index 87d2dab..f1ad6f1 100644 --- a/org-ql.el +++ b/org-ql.el @@ -4,7 +4,7 @@ ;; Author: Adam Porter ;; Url: https://github.com/alphapapa/org-ql -;; Version: 0.8.7 +;; Version: 0.8.8-pre ;; Package-Requires: ((emacs "27.1") (compat "29.1") (dash "2.18.1") (f "0.17.2") (map "2.1") (org "9.0") (org-super-agenda "1.2") (ov "1.0.6") (peg "1.0.1") (s "1.12.0") (transient "0.1") (ts "0.2-pre")) ;; Keywords: hypermedia, outlines, Org, agenda diff --git a/org-ql.info b/org-ql.info index a408934..2433869 100644 --- a/org-ql.info +++ b/org-ql.info @@ -72,6 +72,7 @@ Functions / Macros Changelog +* 0.8.8-pre: 088-pre. * 0.8.7: 087. * 0.8.6: 086. * 0.8.5: 085. @@ -1035,6 +1036,7 @@ releases. * Menu: +* 0.8.8-pre: 088-pre. * 0.8.7: 087. * 0.8.6: 086. * 0.8.5: 085. @@ -1075,9 +1077,17 @@ releases. * 0.1: 01.  -File: README.info, Node: 087, Next: 086, Up: Changelog +File: README.info, Node: 088-pre, Next: 087, Up: Changelog -5.1 0.8.7 +5.1 0.8.8-pre +============= + +Nothing new yet. + + +File: README.info, Node: 087, Next: 086, Prev: 088-pre, Up: Changelog + +5.2 0.8.7 ========= *Fixes* @@ -1105,7 +1115,7 @@ File: README.info, Node: 087, Next: 086, Up: Changelog  File: README.info, Node: 086, Next: 085, Prev: 087, Up: Changelog -5.2 0.8.6 +5.3 0.8.6 ========= *Fixes* @@ -1115,7 +1125,7 @@ File: README.info, Node: 086, Next: 085, Prev: 087, Up: Changelog  File: README.info, Node: 085, Next: 084, Prev: 086, Up: Changelog -5.3 0.8.5 +5.4 0.8.5 ========= *Fixes* @@ -1132,7 +1142,7 @@ File: README.info, Node: 085, Next: 084, Prev: 086, Up: Changelog  File: README.info, Node: 084, Next: 083, Prev: 085, Up: Changelog -5.4 0.8.4 +5.5 0.8.4 ========= *Fixes* @@ -1146,7 +1156,7 @@ File: README.info, Node: 084, Next: 083, Prev: 085, Up: Changelog  File: README.info, Node: 083, Next: 082, Prev: 084, Up: Changelog -5.5 0.8.3 +5.6 0.8.3 ========= *Fixes* @@ -1159,7 +1169,7 @@ File: README.info, Node: 083, Next: 082, Prev: 084, Up: Changelog  File: README.info, Node: 082, Next: 081, Prev: 083, Up: Changelog -5.6 0.8.2 +5.7 0.8.2 ========= *Fixes* @@ -1173,7 +1183,7 @@ File: README.info, Node: 082, Next: 081, Prev: 083, Up: Changelog  File: README.info, Node: 081, Next: 08, Prev: 082, Up: Changelog -5.7 0.8.1 +5.8 0.8.1 ========= *Fixes* @@ -1188,7 +1198,7 @@ File: README.info, Node: 081, Next: 08, Prev: 082, Up: Changelog  File: README.info, Node: 08, Next: 074, Prev: 081, Up: Changelog -5.8 0.8 +5.9 0.8 ======= *Additions* @@ -1244,8 +1254,8 @@ File: README.info, Node: 08, Next: 074, Prev: 081, Up: Changelog  File: README.info, Node: 074, Next: 073, Prev: 08, Up: Changelog -5.9 0.7.4 -========= +5.10 0.7.4 +========== *Fixes* • Ignore empty quoted strings in plain-string queries (#383 @@ -1254,7 +1264,7 @@ File: README.info, Node: 074, Next: 073, Prev: 08, Up: Changelog  File: README.info, Node: 073, Next: 072, Prev: 074, Up: Changelog -5.10 0.7.3 +5.11 0.7.3 ========== *Fixes* @@ -1272,7 +1282,7 @@ File: README.info, Node: 073, Next: 072, Prev: 074, Up: Changelog  File: README.info, Node: 072, Next: 071, Prev: 073, Up: Changelog -5.11 0.7.2 +5.12 0.7.2 ========== *Fixes* @@ -1293,7 +1303,7 @@ File: README.info, Node: 072, Next: 071, Prev: 073, Up: Changelog  File: README.info, Node: 071, Next: 07, Prev: 072, Up: Changelog -5.12 0.7.1 +5.13 0.7.1 ========== *Fixes* @@ -1312,7 +1322,7 @@ File: README.info, Node: 071, Next: 07, Prev: 072, Up: Changelog  File: README.info, Node: 07, Next: 063, Prev: 071, Up: Changelog -5.13 0.7 +5.14 0.7 ======== *Added* @@ -1371,7 +1381,7 @@ File: README.info, Node: 07, Next: 063, Prev: 071, Up: Changelog  File: README.info, Node: 063, Next: 062, Prev: 07, Up: Changelog -5.14 0.6.3 +5.15 0.6.3 ========== *Fixed* @@ -1387,7 +1397,7 @@ File: README.info, Node: 063, Next: 062, Prev: 07, Up: Changelog  File: README.info, Node: 062, Next: 061, Prev: 063, Up: Changelog -5.15 0.6.2 +5.16 0.6.2 ========== *Fixed* @@ -1398,7 +1408,7 @@ File: README.info, Node: 062, Next: 061, Prev: 063, Up: Changelog  File: README.info, Node: 061, Next: 06, Prev: 062, Up: Changelog -5.16 0.6.1 +5.17 0.6.1 ========== *Fixed* @@ -1416,7 +1426,7 @@ File: README.info, Node: 061, Next: 06, Prev: 062, Up: Changelog  File: README.info, Node: 06, Next: 052, Prev: 061, Up: Changelog -5.17 0.6 +5.18 0.6 ======== *Added* @@ -1483,7 +1493,7 @@ File: README.info, Node: 06, Next: 052, Prev: 061, Up: Changelog  File: README.info, Node: 052, Next: 051, Prev: 06, Up: Changelog -5.18 0.5.2 +5.19 0.5.2 ========== *Fixed* @@ -1494,7 +1504,7 @@ File: README.info, Node: 052, Next: 051, Prev: 06, Up: Changelog  File: README.info, Node: 051, Next: 05, Prev: 052, Up: Changelog -5.19 0.5.1 +5.20 0.5.1 ========== *Fixed* @@ -1507,7 +1517,7 @@ File: README.info, Node: 051, Next: 05, Prev: 052, Up: Changelog  File: README.info, Node: 05, Next: 049, Prev: 051, Up: Changelog -5.20 0.5 +5.21 0.5 ======== *Added* @@ -1548,7 +1558,7 @@ File: README.info, Node: 05, Next: 049, Prev: 051, Up: Changelog  File: README.info, Node: 049, Next: 048, Prev: 05, Up: Changelog -5.21 0.4.9 +5.22 0.4.9 ========== *Fixed* @@ -1559,7 +1569,7 @@ File: README.info, Node: 049, Next: 048, Prev: 05, Up: Changelog  File: README.info, Node: 048, Next: 047, Prev: 049, Up: Changelog -5.22 0.4.8 +5.23 0.4.8 ========== *Fixed* @@ -1571,7 +1581,7 @@ File: README.info, Node: 048, Next: 047, Prev: 049, Up: Changelog  File: README.info, Node: 047, Next: 046, Prev: 048, Up: Changelog -5.23 0.4.7 +5.24 0.4.7 ========== *Fixed* @@ -1584,7 +1594,7 @@ File: README.info, Node: 047, Next: 046, Prev: 048, Up: Changelog  File: README.info, Node: 046, Next: 045, Prev: 047, Up: Changelog -5.24 0.4.6 +5.25 0.4.6 ========== *Fixed* @@ -1597,7 +1607,7 @@ File: README.info, Node: 046, Next: 045, Prev: 047, Up: Changelog  File: README.info, Node: 045, Next: 044, Prev: 046, Up: Changelog -5.25 0.4.5 +5.26 0.4.5 ========== *Fixed* @@ -1609,7 +1619,7 @@ File: README.info, Node: 045, Next: 044, Prev: 046, Up: Changelog  File: README.info, Node: 044, Next: 043, Prev: 045, Up: Changelog -5.26 0.4.4 +5.27 0.4.4 ========== *Fixed* @@ -1621,7 +1631,7 @@ File: README.info, Node: 044, Next: 043, Prev: 045, Up: Changelog  File: README.info, Node: 043, Next: 042, Prev: 044, Up: Changelog -5.27 0.4.3 +5.28 0.4.3 ========== *Fixed* @@ -1631,7 +1641,7 @@ File: README.info, Node: 043, Next: 042, Prev: 044, Up: Changelog  File: README.info, Node: 042, Next: 041, Prev: 043, Up: Changelog -5.28 0.4.2 +5.29 0.4.2 ========== *Fixed* @@ -1640,7 +1650,7 @@ File: README.info, Node: 042, Next: 041, Prev: 043, Up: Changelog  File: README.info, Node: 041, Next: 04, Prev: 042, Up: Changelog -5.29 0.4.1 +5.30 0.4.1 ========== *Fixed* @@ -1650,7 +1660,7 @@ File: README.info, Node: 041, Next: 04, Prev: 042, Up: Changelog  File: README.info, Node: 04, Next: 032, Prev: 041, Up: Changelog -5.30 0.4 +5.31 0.4 ======== _Note:_ The next release, 0.5, may include changes which will require @@ -1731,7 +1741,7 @@ automatically, as they will be pushed to the ‘master’ branch when ready.  File: README.info, Node: 032, Next: 031, Prev: 04, Up: Changelog -5.31 0.3.2 +5.32 0.3.2 ========== *Fixed* @@ -1744,7 +1754,7 @@ File: README.info, Node: 032, Next: 031, Prev: 04, Up: Changelog  File: README.info, Node: 031, Next: 03, Prev: 032, Up: Changelog -5.32 0.3.1 +5.33 0.3.1 ========== *Fixed* @@ -1754,7 +1764,7 @@ File: README.info, Node: 031, Next: 03, Prev: 032, Up: Changelog  File: README.info, Node: 03, Next: 023, Prev: 031, Up: Changelog -5.33 0.3 +5.34 0.3 ======== *Added* @@ -1822,7 +1832,7 @@ File: README.info, Node: 03, Next: 023, Prev: 031, Up: Changelog  File: README.info, Node: 023, Next: 022, Prev: 03, Up: Changelog -5.34 0.2.3 +5.35 0.2.3 ========== *Fixed* @@ -1832,7 +1842,7 @@ File: README.info, Node: 023, Next: 022, Prev: 03, Up: Changelog  File: README.info, Node: 022, Next: 021, Prev: 023, Up: Changelog -5.35 0.2.2 +5.36 0.2.2 ========== *Fixed* @@ -1843,7 +1853,7 @@ File: README.info, Node: 022, Next: 021, Prev: 023, Up: Changelog  File: README.info, Node: 021, Next: 02, Prev: 022, Up: Changelog -5.36 0.2.1 +5.37 0.2.1 ========== *Fixed* @@ -1853,7 +1863,7 @@ File: README.info, Node: 021, Next: 02, Prev: 022, Up: Changelog  File: README.info, Node: 02, Next: 01, Prev: 021, Up: Changelog -5.37 0.2 +5.38 0.2 ======== *Added* @@ -1936,7 +1946,7 @@ File: README.info, Node: 02, Next: 01, Prev: 021, Up: Changelog  File: README.info, Node: 01, Prev: 02, Up: Changelog -5.38 0.1 +5.39 0.1 ======== First tagged release. @@ -1994,83 +2004,84 @@ GPLv3  Tag Table: Node: Top225 -Node: Contents1949 -Node: Screenshots2072 -Node: Installation2190 -Node: Quelpa2704 -Node: Helm support3232 -Node: Usage3635 -Node: Commands4033 -Node: org-ql-find4498 -Node: org-ql-open-link5406 -Node: org-ql-refile6261 -Node: org-ql-search6589 -Node: helm-org-ql8520 -Node: org-ql-view8898 -Node: org-ql-view-sidebar9428 -Node: org-ql-view-recent-items9808 -Node: org-ql-sparse-tree10304 -Node: Queries11104 -Node: Non-sexp query syntax12221 -Node: General predicates13980 -Node: Ancestor/descendant predicates20905 -Node: Date/time predicates22033 -Node: Functions / Macros25157 -Node: Agenda-like views25455 -Ref: Function org-ql-block25617 -Node: Listing / acting-on results26878 -Ref: Caching27086 -Ref: Function org-ql-select27999 -Ref: Function org-ql-query30425 -Ref: Macro org-ql (deprecated)32199 -Node: Custom predicates32514 -Ref: Macro org-ql-defpred32738 -Node: Dynamic block36179 -Node: Links38903 -Node: Tips39590 -Node: Changelog39914 -Node: 08740828 -Node: 08642044 -Node: 08542278 -Node: 08442934 -Node: 08343386 -Node: 08243727 -Node: 08144120 -Node: 0844541 -Node: 07447265 -Node: 07347488 -Node: 07248222 -Node: 07149143 -Node: 0749954 -Node: 06352820 -Node: 06253353 -Node: 06153660 -Node: 0654230 -Node: 05257286 -Node: 05157588 -Node: 0558013 -Node: 04959544 -Node: 04859826 -Node: 04760175 -Node: 04660584 -Node: 04560992 -Node: 04461353 -Node: 04361712 -Node: 04261915 -Node: 04162076 -Node: 0462323 -Node: 03266424 -Node: 03166827 -Node: 0367024 -Node: 02370324 -Node: 02270558 -Node: 02170838 -Node: 0271043 -Node: 0175121 -Node: Notes75222 -Node: Comparison with Org Agenda searches75384 -Node: org-sidebar76273 -Node: License76552 +Node: Contents1971 +Node: Screenshots2094 +Node: Installation2212 +Node: Quelpa2726 +Node: Helm support3254 +Node: Usage3657 +Node: Commands4055 +Node: org-ql-find4520 +Node: org-ql-open-link5428 +Node: org-ql-refile6283 +Node: org-ql-search6611 +Node: helm-org-ql8542 +Node: org-ql-view8920 +Node: org-ql-view-sidebar9450 +Node: org-ql-view-recent-items9830 +Node: org-ql-sparse-tree10326 +Node: Queries11126 +Node: Non-sexp query syntax12243 +Node: General predicates14002 +Node: Ancestor/descendant predicates20927 +Node: Date/time predicates22055 +Node: Functions / Macros25179 +Node: Agenda-like views25477 +Ref: Function org-ql-block25639 +Node: Listing / acting-on results26900 +Ref: Caching27108 +Ref: Function org-ql-select28021 +Ref: Function org-ql-query30447 +Ref: Macro org-ql (deprecated)32221 +Node: Custom predicates32536 +Ref: Macro org-ql-defpred32760 +Node: Dynamic block36201 +Node: Links38925 +Node: Tips39612 +Node: Changelog39936 +Node: 088-pre40872 +Node: 08740984 +Node: 08642216 +Node: 08542450 +Node: 08443106 +Node: 08343558 +Node: 08243899 +Node: 08144292 +Node: 0844713 +Node: 07447437 +Node: 07347662 +Node: 07248396 +Node: 07149317 +Node: 0750128 +Node: 06352994 +Node: 06253527 +Node: 06153834 +Node: 0654404 +Node: 05257460 +Node: 05157762 +Node: 0558187 +Node: 04959718 +Node: 04860000 +Node: 04760349 +Node: 04660758 +Node: 04561166 +Node: 04461527 +Node: 04361886 +Node: 04262089 +Node: 04162250 +Node: 0462497 +Node: 03266598 +Node: 03167001 +Node: 0367198 +Node: 02370498 +Node: 02270732 +Node: 02171012 +Node: 0271217 +Node: 0175295 +Node: Notes75396 +Node: Comparison with Org Agenda searches75558 +Node: org-sidebar76447 +Node: License76726  End Tag Table From 357d533b7546e599308423b072e425db7c854604 Mon Sep 17 00:00:00 2001 From: Adam Porter Date: Thu, 29 Aug 2024 14:21:50 -0500 Subject: [PATCH 42/70] Fix: (-view--format-element) Remove text properties from keywords Modes like org-indent-mode and org-modern can add text properties to to-do keywords in Org buffers, and those properties can "bleed over" when org-element copies those regions into strings. When those strings are then displayed in an org-ql-view buffer, they can affect how the keywords appear, e.g. having extra spaces prefixing them, which breaks alignment. We apply faces to the keywords ourselves, so we don't need any properties from the source buffer. Fixes #455. --- README.org | 3 +- org-ql-view.el | 3 +- org-ql.info | 90 ++++++++++++++++++++++++++------------------------ 3 files changed, 51 insertions(+), 45 deletions(-) diff --git a/README.org b/README.org index a85e227..593bec4 100644 --- a/README.org +++ b/README.org @@ -555,7 +555,8 @@ Simple links may also be written manually in either sexp or non-sexp form, like: ** 0.8.8-pre -Nothing new yet. +*Fixes* ++ Remove text properties from to-do keywords before displaying them in an ~org-ql-view~ buffer. (Such text properties could cause them to, e.g. display with extra leading spaces, depending on which other modes might be enabled in the source Org buffer.) ** 0.8.7 diff --git a/org-ql-view.el b/org-ql-view.el index 41ada72..b5c4bb7 100644 --- a/org-ql-view.el +++ b/org-ql-view.el @@ -872,7 +872,8 @@ return an empty string." (title (--> (org-ql-view--add-faces element) (org-element-property :raw-value it))) (todo-keyword (-some--> (org-element-property :todo-keyword element) - (org-ql-view--add-todo-face it))) + (org-ql-view--add-todo-face + (substring-no-properties it)))) (tag-list (if org-use-tag-inheritance ;; MAYBE: Use our own variable instead of `org-use-tag-inheritance'. (if-let ((marker (or (org-element-property :org-hd-marker element) diff --git a/org-ql.info b/org-ql.info index 2433869..acef674 100644 --- a/org-ql.info +++ b/org-ql.info @@ -1082,7 +1082,11 @@ File: README.info, Node: 088-pre, Next: 087, Up: Changelog 5.1 0.8.8-pre ============= -Nothing new yet. +*Fixes* + • Remove text properties from to-do keywords before displaying them + in an ‘org-ql-view’ buffer. (Such text properties could cause them + to, e.g. display with extra leading spaces, depending on which + other modes might be enabled in the source Org buffer.)  File: README.info, Node: 087, Next: 086, Prev: 088-pre, Up: Changelog @@ -2040,48 +2044,48 @@ Node: Links38925 Node: Tips39612 Node: Changelog39936 Node: 088-pre40872 -Node: 08740984 -Node: 08642216 -Node: 08542450 -Node: 08443106 -Node: 08343558 -Node: 08243899 -Node: 08144292 -Node: 0844713 -Node: 07447437 -Node: 07347662 -Node: 07248396 -Node: 07149317 -Node: 0750128 -Node: 06352994 -Node: 06253527 -Node: 06153834 -Node: 0654404 -Node: 05257460 -Node: 05157762 -Node: 0558187 -Node: 04959718 -Node: 04860000 -Node: 04760349 -Node: 04660758 -Node: 04561166 -Node: 04461527 -Node: 04361886 -Node: 04262089 -Node: 04162250 -Node: 0462497 -Node: 03266598 -Node: 03167001 -Node: 0367198 -Node: 02370498 -Node: 02270732 -Node: 02171012 -Node: 0271217 -Node: 0175295 -Node: Notes75396 -Node: Comparison with Org Agenda searches75558 -Node: org-sidebar76447 -Node: License76726 +Node: 08741255 +Node: 08642487 +Node: 08542721 +Node: 08443377 +Node: 08343829 +Node: 08244170 +Node: 08144563 +Node: 0844984 +Node: 07447708 +Node: 07347933 +Node: 07248667 +Node: 07149588 +Node: 0750399 +Node: 06353265 +Node: 06253798 +Node: 06154105 +Node: 0654675 +Node: 05257731 +Node: 05158033 +Node: 0558458 +Node: 04959989 +Node: 04860271 +Node: 04760620 +Node: 04661029 +Node: 04561437 +Node: 04461798 +Node: 04362157 +Node: 04262360 +Node: 04162521 +Node: 0462768 +Node: 03266869 +Node: 03167272 +Node: 0367469 +Node: 02370769 +Node: 02271003 +Node: 02171283 +Node: 0271488 +Node: 0175566 +Node: Notes75667 +Node: Comparison with Org Agenda searches75829 +Node: org-sidebar76718 +Node: License76997  End Tag Table From 3c1dd3699044c0b1a812c105743a9e574274b7aa Mon Sep 17 00:00:00 2001 From: Adam Porter Date: Thu, 29 Aug 2024 14:39:55 -0500 Subject: [PATCH 43/70] Fix: (org-ql-completing-read) Binding of completion-styles-alist Fixes #337. Thanks to Nicholas Vollmer (@progfolio), viz (@9viz), and Karthik Chikmagalur (@karthink) for reporting and suggesting fixes. --- README.org | 1 + org-ql-completing-read.el | 3 +- org-ql.info | 91 +++++++++++++++++++++------------------ 3 files changed, 52 insertions(+), 43 deletions(-) diff --git a/README.org b/README.org index 593bec4..a11f740 100644 --- a/README.org +++ b/README.org @@ -557,6 +557,7 @@ Simple links may also be written manually in either sexp or non-sexp form, like: *Fixes* + Remove text properties from to-do keywords before displaying them in an ~org-ql-view~ buffer. (Such text properties could cause them to, e.g. display with extra leading spaces, depending on which other modes might be enabled in the source Org buffer.) ++ Binding of ~completion-styles-alist~ in ~org-ql-completing-read~. (This fixes compatibility with Helm's ~helm~ completion style, as well as default Emacs completion in recursive minibuffers. [[https://github.com/alphapapa/org-ql/issues/337][#337]]. Thanks to [[https://github.com/progfolio][Nicholas Vollmer]], [[https://github.com/9viz][viz]], and [[https://github.com/karthink][Karthik Chikmagalur]] for reporting and suggesting fixes.) ** 0.8.7 diff --git a/org-ql-completing-read.el b/org-ql-completing-read.el index 4db51e6..e118e82 100644 --- a/org-ql-completing-read.el +++ b/org-ql-completing-read.el @@ -335,7 +335,8 @@ single predicate)." ;; `completing-read'. (mapc #'org-ql--ensure-buffer buffers-files) (let* ((completion-styles '(org-ql-completing-read)) - (completion-styles-alist (list (list 'org-ql-completing-read #'try #'all "Org QL Find"))) + (completion-styles-alist (cons (list 'org-ql-completing-read #'try #'all "Org QL Find") + completion-styles-alist)) (selected (minibuffer-with-setup-hook (lambda () diff --git a/org-ql.info b/org-ql.info index acef674..5ccc6a9 100644 --- a/org-ql.info +++ b/org-ql.info @@ -1087,6 +1087,13 @@ File: README.info, Node: 088-pre, Next: 087, Up: Changelog in an ‘org-ql-view’ buffer. (Such text properties could cause them to, e.g. display with extra leading spaces, depending on which other modes might be enabled in the source Org buffer.) + • Binding of ‘completion-styles-alist’ in ‘org-ql-completing-read’. + (This fixes compatibility with Helm’s ‘helm’ completion style, as + well as default Emacs completion in recursive minibuffers. #337 + (https://github.com/alphapapa/org-ql/issues/337). Thanks to + Nicholas Vollmer (https://github.com/progfolio), viz + (https://github.com/9viz), and Karthik Chikmagalur + (https://github.com/karthink) for reporting and suggesting fixes.)  File: README.info, Node: 087, Next: 086, Prev: 088-pre, Up: Changelog @@ -2044,48 +2051,48 @@ Node: Links38925 Node: Tips39612 Node: Changelog39936 Node: 088-pre40872 -Node: 08741255 -Node: 08642487 -Node: 08542721 -Node: 08443377 -Node: 08343829 -Node: 08244170 -Node: 08144563 -Node: 0844984 -Node: 07447708 -Node: 07347933 -Node: 07248667 -Node: 07149588 -Node: 0750399 -Node: 06353265 -Node: 06253798 -Node: 06154105 -Node: 0654675 -Node: 05257731 -Node: 05158033 -Node: 0558458 -Node: 04959989 -Node: 04860271 -Node: 04760620 -Node: 04661029 -Node: 04561437 -Node: 04461798 -Node: 04362157 -Node: 04262360 -Node: 04162521 -Node: 0462768 -Node: 03266869 -Node: 03167272 -Node: 0367469 -Node: 02370769 -Node: 02271003 -Node: 02171283 -Node: 0271488 -Node: 0175566 -Node: Notes75667 -Node: Comparison with Org Agenda searches75829 -Node: org-sidebar76718 -Node: License76997 +Node: 08741735 +Node: 08642967 +Node: 08543201 +Node: 08443857 +Node: 08344309 +Node: 08244650 +Node: 08145043 +Node: 0845464 +Node: 07448188 +Node: 07348413 +Node: 07249147 +Node: 07150068 +Node: 0750879 +Node: 06353745 +Node: 06254278 +Node: 06154585 +Node: 0655155 +Node: 05258211 +Node: 05158513 +Node: 0558938 +Node: 04960469 +Node: 04860751 +Node: 04761100 +Node: 04661509 +Node: 04561917 +Node: 04462278 +Node: 04362637 +Node: 04262840 +Node: 04163001 +Node: 0463248 +Node: 03267349 +Node: 03167752 +Node: 0367949 +Node: 02371249 +Node: 02271483 +Node: 02171763 +Node: 0271968 +Node: 0176046 +Node: Notes76147 +Node: Comparison with Org Agenda searches76309 +Node: org-sidebar77198 +Node: License77477  End Tag Table From 04b3bd26642ee7374371d1370ccd1ae6d9ca5b9e Mon Sep 17 00:00:00 2001 From: Adam Porter Date: Thu, 29 Aug 2024 14:59:58 -0500 Subject: [PATCH 44/70] Fix: Use of org-ql-completing-read--snippet-regexp * 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 --- README.org | 1 + org-ql-completing-read.el | 26 +++++------- org-ql.info | 87 ++++++++++++++++++++------------------- 3 files changed, 56 insertions(+), 58 deletions(-) diff --git a/README.org b/README.org index a11f740..52fda88 100644 --- a/README.org +++ b/README.org @@ -558,6 +558,7 @@ Simple links may also be written manually in either sexp or non-sexp form, like: *Fixes* + Remove text properties from to-do keywords before displaying them in an ~org-ql-view~ buffer. (Such text properties could cause them to, e.g. display with extra leading spaces, depending on which other modes might be enabled in the source Org buffer.) + Binding of ~completion-styles-alist~ in ~org-ql-completing-read~. (This fixes compatibility with Helm's ~helm~ completion style, as well as default Emacs completion in recursive minibuffers. [[https://github.com/alphapapa/org-ql/issues/337][#337]]. Thanks to [[https://github.com/progfolio][Nicholas Vollmer]], [[https://github.com/9viz][viz]], and [[https://github.com/karthink][Karthik Chikmagalur]] for reporting and suggesting fixes.) ++ Use of the context snippet function for ~org-ql-completing-read~. ([[https://github.com/alphapapa/org-ql/issues/419][#419]]. Thanks to [[https://github.com/tpeacock19][tpeacock19]] for reporting.) ** 0.8.7 diff --git a/org-ql-completing-read.el b/org-ql-completing-read.el index e118e82..b61cf9e 100644 --- a/org-ql-completing-read.el +++ b/org-ql-completing-read.el @@ -106,11 +106,13 @@ value, or nil." ;; responsive as, e.g. Helm while typing, but it seems to ;; help a little when using the org-rifle-style snippets. (org-with-point-at marker - (or (funcall org-ql-completing-read-snippet-function) + (or (funcall org-ql-completing-read-snippet-function + org-ql-completing-read-input-regexp) (org-ql-completing-read--snippet-simple)))) (`t ;; Interrupted: return nil (which can be concatted). nil) - (else else))) + (else (propertize (concat " " else) + 'face 'org-ql-completing-read-snippet)))) (defun org-ql-completing-read-path (marker) "Return formatted outline path for entry at MARKER." @@ -214,15 +216,7 @@ single predicate)." ;; Using `while-no-input' here doesn't make it as responsive as, ;; e.g. Helm while typing, but it seems to help a little when using the ;; org-rifle-style snippets. - (or (snippet (get-text-property 0 'org-marker candidate)) ""))) - (snippet (marker) - (when-let - ((snippet - (org-with-point-at marker - (or (funcall org-ql-completing-read-snippet-function org-ql-completing-read-input-regexp) - (org-ql-completing-read--snippet-simple))))) - (propertize (concat " " snippet) - 'face 'org-ql-completing-read-snippet))) + (or (funcall snippet (get-text-property 0 'org-marker candidate)) ""))) (group (candidate transform) (pcase transform (`nil (buffer-name (marker-buffer (get-text-property 0 'org-marker candidate)))) @@ -368,7 +362,7 @@ single predicate)." (car (hash-table-values table)) (user-error "No results for input")))))) -(defun org-ql-completing-read--snippet-simple () +(defun org-ql-completing-read--snippet-simple (&optional _input-regexp) "Return a snippet of the current entry. Returns up to `org-ql-completing-read-snippet-length' characters." (save-excursion @@ -382,15 +376,15 @@ Returns up to `org-ql-completing-read-snippet-length' characters." t t) 50 nil nil t)))))) -(defun org-ql-completing-read--snippet-regexp (regexp) - "Return a snippet of the current entry's matches for REGEXP." +(defun org-ql-completing-read--snippet-regexp (&optional input-regexp) + "Return a snippet of the current entry's matches for INPUT-REGEXP." ;; REGEXP may be nil if there are no qualifying tokens in the query. - (when regexp + (when input-regexp (save-excursion (org-end-of-meta-data t) (unless (org-at-heading-p) (let* ((end (org-entry-end-position)) - (snippets (cl-loop while (re-search-forward regexp end t) + (snippets (cl-loop while (re-search-forward input-regexp end t) concat (match-string 0) concat "…" do (goto-char (match-end 0))))) (unless (string-empty-p snippets) diff --git a/org-ql.info b/org-ql.info index 5ccc6a9..796716e 100644 --- a/org-ql.info +++ b/org-ql.info @@ -1094,6 +1094,9 @@ File: README.info, Node: 088-pre, Next: 087, Up: Changelog Nicholas Vollmer (https://github.com/progfolio), viz (https://github.com/9viz), and Karthik Chikmagalur (https://github.com/karthink) for reporting and suggesting fixes.) + • Use of the context snippet function for ‘org-ql-completing-read’. + (#419 (https://github.com/alphapapa/org-ql/issues/419). Thanks to + tpeacock19 (https://github.com/tpeacock19) for reporting.)  File: README.info, Node: 087, Next: 086, Prev: 088-pre, Up: Changelog @@ -2051,48 +2054,48 @@ Node: Links38925 Node: Tips39612 Node: Changelog39936 Node: 088-pre40872 -Node: 08741735 -Node: 08642967 -Node: 08543201 -Node: 08443857 -Node: 08344309 -Node: 08244650 -Node: 08145043 -Node: 0845464 -Node: 07448188 -Node: 07348413 -Node: 07249147 -Node: 07150068 -Node: 0750879 -Node: 06353745 -Node: 06254278 -Node: 06154585 -Node: 0655155 -Node: 05258211 -Node: 05158513 -Node: 0558938 -Node: 04960469 -Node: 04860751 -Node: 04761100 -Node: 04661509 -Node: 04561917 -Node: 04462278 -Node: 04362637 -Node: 04262840 -Node: 04163001 -Node: 0463248 -Node: 03267349 -Node: 03167752 -Node: 0367949 -Node: 02371249 -Node: 02271483 -Node: 02171763 -Node: 0271968 -Node: 0176046 -Node: Notes76147 -Node: Comparison with Org Agenda searches76309 -Node: org-sidebar77198 -Node: License77477 +Node: 08741948 +Node: 08643180 +Node: 08543414 +Node: 08444070 +Node: 08344522 +Node: 08244863 +Node: 08145256 +Node: 0845677 +Node: 07448401 +Node: 07348626 +Node: 07249360 +Node: 07150281 +Node: 0751092 +Node: 06353958 +Node: 06254491 +Node: 06154798 +Node: 0655368 +Node: 05258424 +Node: 05158726 +Node: 0559151 +Node: 04960682 +Node: 04860964 +Node: 04761313 +Node: 04661722 +Node: 04562130 +Node: 04462491 +Node: 04362850 +Node: 04263053 +Node: 04163214 +Node: 0463461 +Node: 03267562 +Node: 03167965 +Node: 0368162 +Node: 02371462 +Node: 02271696 +Node: 02171976 +Node: 0272181 +Node: 0176259 +Node: Notes76360 +Node: Comparison with Org Agenda searches76522 +Node: org-sidebar77411 +Node: License77690  End Tag Table From 847c066d54a5015c49b575feb3087601e0554cc2 Mon Sep 17 00:00:00 2001 From: Adam Porter Date: Thu, 29 Aug 2024 16:30:55 -0500 Subject: [PATCH 45/70] Comment: TODO --- org-ql-completing-read.el | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/org-ql-completing-read.el b/org-ql-completing-read.el index b61cf9e..c5172d8 100644 --- a/org-ql-completing-read.el +++ b/org-ql-completing-read.el @@ -47,12 +47,10 @@ :type 'boolean) (defcustom org-ql-completing-read-snippet-function #'org-ql-completing-read--snippet-simple - ;; TODO: I'd like to make the -regexp one the default, but with - ;; default Emacs completion affixation, it can sometimes be a bit - ;; slow, and I don't want that to be a user's first impression. It - ;; may be possible to further optimize the -regexp one so that it - ;; can be used by default. In the meantime, the -simple one seems - ;; fast enough for general use. + ;; TODO(v0.9): Performance of completion annotations seems to be + ;; much improved now (whether due to changes in Emacs, Vertico, or + ;; both, I don't know). It may be reasonable to make the context + ;; snippet the default now. "Function used to annotate results in `org-ql-completing-read'. Function is called at entry beginning. (When set to `org-ql-completing-read--snippet-regexp', it is called with a From fd82c83d499bfa39835a5223271b60190cf99c57 Mon Sep 17 00:00:00 2001 From: Adam Porter Date: Thu, 29 Aug 2024 16:35:57 -0500 Subject: [PATCH 46/70] Fix: (org-ql-defpred) Docstring quote escapes --- org-ql.el | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/org-ql.el b/org-ql.el index f1ad6f1..fd28dcd 100644 --- a/org-ql.el +++ b/org-ql.el @@ -1141,7 +1141,7 @@ defined in `org-ql-predicates' by calling `org-ql-defpred'." (byte-compile 'org-ql--query-preamble))) (cl-defmacro org-ql-defpred (name args docstring &key body preambles normalizers coalesce) - "Define an \\+`org-ql' selector predicate \\=`org-ql--predicate-NAME'. + "Define an Org QL selector predicate \\=`org-ql--predicate-NAME'. NAME may be a symbol or a list of symbols: if a list, the first is used as NAME and the rest are aliases. A function is only created for NAME, not for aliases, so a normalizer should be used @@ -1226,7 +1226,7 @@ Then if NORMALIZERS were: It would be expanded to: - ((\\=`(,(or 'heading 'h) . ,args) + ((\\=`(,(or \\='heading \\='h) . ,args) \\=`(heading ,@args)))" ;; FIXME: Update defpred tutorial to include :coalesce. From 20c0e5a9a76758e45c7d685f461461d99adf3dd8 Mon Sep 17 00:00:00 2001 From: Adam Porter Date: Thu, 29 Aug 2024 16:37:08 -0500 Subject: [PATCH 47/70] Release: v0.8.8 --- README.org | 2 +- org-ql.el | 2 +- org-ql.info | 168 ++++++++++++++++++++++++++-------------------------- 3 files changed, 86 insertions(+), 86 deletions(-) diff --git a/README.org b/README.org index 52fda88..226c951 100644 --- a/README.org +++ b/README.org @@ -553,7 +553,7 @@ Simple links may also be written manually in either sexp or non-sexp form, like: /Note:/ Breaking changes may be made before version 1.0, but in the event of major changes, attempts at backward compatibility will be made with obsolescence declarations, translation of arguments, etc. Users who need stability guarantees before 1.0 may choose to use tagged stable releases. -** 0.8.8-pre +** 0.8.8 *Fixes* + Remove text properties from to-do keywords before displaying them in an ~org-ql-view~ buffer. (Such text properties could cause them to, e.g. display with extra leading spaces, depending on which other modes might be enabled in the source Org buffer.) diff --git a/org-ql.el b/org-ql.el index fd28dcd..a0dc7e8 100644 --- a/org-ql.el +++ b/org-ql.el @@ -4,7 +4,7 @@ ;; Author: Adam Porter ;; Url: https://github.com/alphapapa/org-ql -;; Version: 0.8.8-pre +;; Version: 0.8.8 ;; Package-Requires: ((emacs "27.1") (compat "29.1") (dash "2.18.1") (f "0.17.2") (map "2.1") (org "9.0") (org-super-agenda "1.2") (ov "1.0.6") (peg "1.0.1") (s "1.12.0") (transient "0.1") (ts "0.2-pre")) ;; Keywords: hypermedia, outlines, Org, agenda diff --git a/org-ql.info b/org-ql.info index 796716e..8a0a0fd 100644 --- a/org-ql.info +++ b/org-ql.info @@ -72,7 +72,7 @@ Functions / Macros Changelog -* 0.8.8-pre: 088-pre. +* 0.8.8: 088. * 0.8.7: 087. * 0.8.6: 086. * 0.8.5: 085. @@ -1036,7 +1036,7 @@ releases. * Menu: -* 0.8.8-pre: 088-pre. +* 0.8.8: 088. * 0.8.7: 087. * 0.8.6: 086. * 0.8.5: 085. @@ -1077,10 +1077,10 @@ releases. * 0.1: 01.  -File: README.info, Node: 088-pre, Next: 087, Up: Changelog +File: README.info, Node: 088, Next: 087, Up: Changelog -5.1 0.8.8-pre -============= +5.1 0.8.8 +========= *Fixes* • Remove text properties from to-do keywords before displaying them @@ -1099,7 +1099,7 @@ File: README.info, Node: 088-pre, Next: 087, Up: Changelog tpeacock19 (https://github.com/tpeacock19) for reporting.)  -File: README.info, Node: 087, Next: 086, Prev: 088-pre, Up: Changelog +File: README.info, Node: 087, Next: 086, Prev: 088, Up: Changelog 5.2 0.8.7 ========= @@ -2018,84 +2018,84 @@ GPLv3  Tag Table: Node: Top225 -Node: Contents1971 -Node: Screenshots2094 -Node: Installation2212 -Node: Quelpa2726 -Node: Helm support3254 -Node: Usage3657 -Node: Commands4055 -Node: org-ql-find4520 -Node: org-ql-open-link5428 -Node: org-ql-refile6283 -Node: org-ql-search6611 -Node: helm-org-ql8542 -Node: org-ql-view8920 -Node: org-ql-view-sidebar9450 -Node: org-ql-view-recent-items9830 -Node: org-ql-sparse-tree10326 -Node: Queries11126 -Node: Non-sexp query syntax12243 -Node: General predicates14002 -Node: Ancestor/descendant predicates20927 -Node: Date/time predicates22055 -Node: Functions / Macros25179 -Node: Agenda-like views25477 -Ref: Function org-ql-block25639 -Node: Listing / acting-on results26900 -Ref: Caching27108 -Ref: Function org-ql-select28021 -Ref: Function org-ql-query30447 -Ref: Macro org-ql (deprecated)32221 -Node: Custom predicates32536 -Ref: Macro org-ql-defpred32760 -Node: Dynamic block36201 -Node: Links38925 -Node: Tips39612 -Node: Changelog39936 -Node: 088-pre40872 -Node: 08741948 -Node: 08643180 -Node: 08543414 -Node: 08444070 -Node: 08344522 -Node: 08244863 -Node: 08145256 -Node: 0845677 -Node: 07448401 -Node: 07348626 -Node: 07249360 -Node: 07150281 -Node: 0751092 -Node: 06353958 -Node: 06254491 -Node: 06154798 -Node: 0655368 -Node: 05258424 -Node: 05158726 -Node: 0559151 -Node: 04960682 -Node: 04860964 -Node: 04761313 -Node: 04661722 -Node: 04562130 -Node: 04462491 -Node: 04362850 -Node: 04263053 -Node: 04163214 -Node: 0463461 -Node: 03267562 -Node: 03167965 -Node: 0368162 -Node: 02371462 -Node: 02271696 -Node: 02171976 -Node: 0272181 -Node: 0176259 -Node: Notes76360 -Node: Comparison with Org Agenda searches76522 -Node: org-sidebar77411 -Node: License77690 +Node: Contents1963 +Node: Screenshots2086 +Node: Installation2204 +Node: Quelpa2718 +Node: Helm support3246 +Node: Usage3649 +Node: Commands4047 +Node: org-ql-find4512 +Node: org-ql-open-link5420 +Node: org-ql-refile6275 +Node: org-ql-search6603 +Node: helm-org-ql8534 +Node: org-ql-view8912 +Node: org-ql-view-sidebar9442 +Node: org-ql-view-recent-items9822 +Node: org-ql-sparse-tree10318 +Node: Queries11118 +Node: Non-sexp query syntax12235 +Node: General predicates13994 +Node: Ancestor/descendant predicates20919 +Node: Date/time predicates22047 +Node: Functions / Macros25171 +Node: Agenda-like views25469 +Ref: Function org-ql-block25631 +Node: Listing / acting-on results26892 +Ref: Caching27100 +Ref: Function org-ql-select28013 +Ref: Function org-ql-query30439 +Ref: Macro org-ql (deprecated)32213 +Node: Custom predicates32528 +Ref: Macro org-ql-defpred32752 +Node: Dynamic block36193 +Node: Links38917 +Node: Tips39604 +Node: Changelog39928 +Node: 08840856 +Node: 08741920 +Node: 08643148 +Node: 08543382 +Node: 08444038 +Node: 08344490 +Node: 08244831 +Node: 08145224 +Node: 0845645 +Node: 07448369 +Node: 07348594 +Node: 07249328 +Node: 07150249 +Node: 0751060 +Node: 06353926 +Node: 06254459 +Node: 06154766 +Node: 0655336 +Node: 05258392 +Node: 05158694 +Node: 0559119 +Node: 04960650 +Node: 04860932 +Node: 04761281 +Node: 04661690 +Node: 04562098 +Node: 04462459 +Node: 04362818 +Node: 04263021 +Node: 04163182 +Node: 0463429 +Node: 03267530 +Node: 03167933 +Node: 0368130 +Node: 02371430 +Node: 02271664 +Node: 02171944 +Node: 0272149 +Node: 0176227 +Node: Notes76328 +Node: Comparison with Org Agenda searches76490 +Node: org-sidebar77379 +Node: License77658  End Tag Table From f72feb80184749a2f39bb769081d17b0da0e0684 Mon Sep 17 00:00:00 2001 From: Adam Porter Date: Wed, 4 Sep 2024 21:40:36 -0500 Subject: [PATCH 48/70] Revert "Tests: Fix filename tests for CI" This reverts commit 611198155dbdd5c82d00475aa6587273150c5e8f. --- tests/test-org-ql.el | 40 +++++++++++++++------------------------- 1 file changed, 15 insertions(+), 25 deletions(-) diff --git a/tests/test-org-ql.el b/tests/test-org-ql.el index 7618327..7f5431c 100644 --- a/tests/test-org-ql.el +++ b/tests/test-org-ql.el @@ -2111,31 +2111,21 @@ with keyword arg NOW in PLIST." (describe "Buffers/Files" :var ((query '(and (todo "TODO") (regexp "heading"))) (one-filename (car temp-filenames))) - ;; NOTE: Inexplicably, on GitHub CI, the filenames are being - ;; abbreviated (i.e. "/home/FOO" is replaced with "~/FOO"); - ;; I can only guess it's something to do with the way the - ;; Emacs instance is built in the Nix images we use there. - ;; So we have to compare the filenames in abbreviated form. - (cl-labels ((filenames-equal-p (a b) - (seq-set-equal-p (mapcar #'abbreviate-file-name a) - (mapcar #'abbreviate-file-name b)))) - (it "One filename matches" - (should (equal (abbreviate-file-name - (var-after-bookmark-set-and-jump 'org-ql-view-buffers-files one-filename query)) - (abbreviate-file-name one-filename)))) - (it "A list of filenames matches" - (should (filenames-equal-p (var-after-bookmark-set-and-jump 'org-ql-view-buffers-files temp-filenames query) - temp-filenames))) - ;; NOTE: These actually bookmark the filenames backing the buffers. - (it "One buffer matches" - (should (equal (abbreviate-file-name - (var-after-bookmark-set-and-jump 'org-ql-view-buffers-files - (find-file-noselect (car temp-filenames)) query)) - (abbreviate-file-name one-filename)))) - (it "A list of buffers matches" - (should (filenames-equal-p (var-after-bookmark-set-and-jump 'org-ql-view-buffers-files - (mapcar #'find-file-noselect temp-filenames) query) - temp-filenames))))))) + (it "One filename matches" + (expect (var-after-bookmark-set-and-jump 'org-ql-view-buffers-files one-filename query) + :to-equal one-filename)) + (it "A list of filenames matches" + (expect (var-after-bookmark-set-and-jump 'org-ql-view-buffers-files temp-filenames query) + :to-equal temp-filenames)) + ;; NOTE: These actually bookmark the filenames backing the buffers. + (it "One buffer matches" + (expect (var-after-bookmark-set-and-jump 'org-ql-view-buffers-files + (find-file-noselect (car temp-filenames)) query) + :to-equal one-filename)) + (it "A list of buffers matches" + (expect (var-after-bookmark-set-and-jump 'org-ql-view-buffers-files + (mapcar #'find-file-noselect temp-filenames) query) + :to-equal temp-filenames))))) (describe "Dynamic blocks" (describe "warn about sexp queries" From 831a1d47367d18bc0978ca08de6c4776277fe8d0 Mon Sep 17 00:00:00 2001 From: Adam Porter Date: Wed, 4 Sep 2024 21:40:44 -0500 Subject: [PATCH 49/70] Tests: Fix filenames for CI (better) This is much simpler. --- tests/test-org-ql.el | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/test-org-ql.el b/tests/test-org-ql.el index 7f5431c..2cfb59e 100644 --- a/tests/test-org-ql.el +++ b/tests/test-org-ql.el @@ -2005,7 +2005,7 @@ with keyword arg NOW in PLIST." (describe "View saving/loading" :var* ((temp-dir (make-temp-file "test-org-ql-" 'dir)) (temp-filenames (cl-loop for file in '("test1.org" "test2.org") - collect (expand-file-name file temp-dir))) + collect (abbreviate-file-name (expand-file-name file temp-dir)))) (file-contents (with-temp-buffer (insert "#+TITLE: Test data\n\n" "* TODO Heading 1\n" From bcb77b75cc22cefcd1029a857aebe9139ba7c265 Mon Sep 17 00:00:00 2001 From: Adam Porter Date: Wed, 4 Sep 2024 21:55:10 -0500 Subject: [PATCH 50/70] Meta: v0.8.9-pre --- README.org | 4 + org-ql.el | 2 +- org-ql.info | 249 +++++++++++++++++++++++++++------------------------- 3 files changed, 135 insertions(+), 120 deletions(-) diff --git a/README.org b/README.org index 226c951..6fda2ae 100644 --- a/README.org +++ b/README.org @@ -553,6 +553,10 @@ Simple links may also be written manually in either sexp or non-sexp form, like: /Note:/ Breaking changes may be made before version 1.0, but in the event of major changes, attempts at backward compatibility will be made with obsolescence declarations, translation of arguments, etc. Users who need stability guarantees before 1.0 may choose to use tagged stable releases. +** 0.8.9-pre + +Nothing new yet. + ** 0.8.8 *Fixes* diff --git a/org-ql.el b/org-ql.el index a0dc7e8..5149c78 100644 --- a/org-ql.el +++ b/org-ql.el @@ -4,7 +4,7 @@ ;; Author: Adam Porter ;; Url: https://github.com/alphapapa/org-ql -;; Version: 0.8.8 +;; Version: 0.8.9-pre ;; Package-Requires: ((emacs "27.1") (compat "29.1") (dash "2.18.1") (f "0.17.2") (map "2.1") (org "9.0") (org-super-agenda "1.2") (ov "1.0.6") (peg "1.0.1") (s "1.12.0") (transient "0.1") (ts "0.2-pre")) ;; Keywords: hypermedia, outlines, Org, agenda diff --git a/org-ql.info b/org-ql.info index 8a0a0fd..cfe60fc 100644 --- a/org-ql.info +++ b/org-ql.info @@ -72,6 +72,7 @@ Functions / Macros Changelog +* 0.8.9-pre: 089-pre. * 0.8.8: 088. * 0.8.7: 087. * 0.8.6: 086. @@ -1036,6 +1037,7 @@ releases. * Menu: +* 0.8.9-pre: 089-pre. * 0.8.8: 088. * 0.8.7: 087. * 0.8.6: 086. @@ -1077,9 +1079,17 @@ releases. * 0.1: 01.  -File: README.info, Node: 088, Next: 087, Up: Changelog +File: README.info, Node: 089-pre, Next: 088, Up: Changelog -5.1 0.8.8 +5.1 0.8.9-pre +============= + +Nothing new yet. + + +File: README.info, Node: 088, Next: 087, Prev: 089-pre, Up: Changelog + +5.2 0.8.8 ========= *Fixes* @@ -1101,7 +1111,7 @@ File: README.info, Node: 088, Next: 087, Up: Changelog  File: README.info, Node: 087, Next: 086, Prev: 088, Up: Changelog -5.2 0.8.7 +5.3 0.8.7 ========= *Fixes* @@ -1129,7 +1139,7 @@ File: README.info, Node: 087, Next: 086, Prev: 088, Up: Changelog  File: README.info, Node: 086, Next: 085, Prev: 087, Up: Changelog -5.3 0.8.6 +5.4 0.8.6 ========= *Fixes* @@ -1139,7 +1149,7 @@ File: README.info, Node: 086, Next: 085, Prev: 087, Up: Changelog  File: README.info, Node: 085, Next: 084, Prev: 086, Up: Changelog -5.4 0.8.5 +5.5 0.8.5 ========= *Fixes* @@ -1156,7 +1166,7 @@ File: README.info, Node: 085, Next: 084, Prev: 086, Up: Changelog  File: README.info, Node: 084, Next: 083, Prev: 085, Up: Changelog -5.5 0.8.4 +5.6 0.8.4 ========= *Fixes* @@ -1170,7 +1180,7 @@ File: README.info, Node: 084, Next: 083, Prev: 085, Up: Changelog  File: README.info, Node: 083, Next: 082, Prev: 084, Up: Changelog -5.6 0.8.3 +5.7 0.8.3 ========= *Fixes* @@ -1183,7 +1193,7 @@ File: README.info, Node: 083, Next: 082, Prev: 084, Up: Changelog  File: README.info, Node: 082, Next: 081, Prev: 083, Up: Changelog -5.7 0.8.2 +5.8 0.8.2 ========= *Fixes* @@ -1197,7 +1207,7 @@ File: README.info, Node: 082, Next: 081, Prev: 083, Up: Changelog  File: README.info, Node: 081, Next: 08, Prev: 082, Up: Changelog -5.8 0.8.1 +5.9 0.8.1 ========= *Fixes* @@ -1212,8 +1222,8 @@ File: README.info, Node: 081, Next: 08, Prev: 082, Up: Changelog  File: README.info, Node: 08, Next: 074, Prev: 081, Up: Changelog -5.9 0.8 -======= +5.10 0.8 +======== *Additions* @@ -1268,7 +1278,7 @@ File: README.info, Node: 08, Next: 074, Prev: 081, Up: Changelog  File: README.info, Node: 074, Next: 073, Prev: 08, Up: Changelog -5.10 0.7.4 +5.11 0.7.4 ========== *Fixes* @@ -1278,7 +1288,7 @@ File: README.info, Node: 074, Next: 073, Prev: 08, Up: Changelog  File: README.info, Node: 073, Next: 072, Prev: 074, Up: Changelog -5.11 0.7.3 +5.12 0.7.3 ========== *Fixes* @@ -1296,7 +1306,7 @@ File: README.info, Node: 073, Next: 072, Prev: 074, Up: Changelog  File: README.info, Node: 072, Next: 071, Prev: 073, Up: Changelog -5.12 0.7.2 +5.13 0.7.2 ========== *Fixes* @@ -1317,7 +1327,7 @@ File: README.info, Node: 072, Next: 071, Prev: 073, Up: Changelog  File: README.info, Node: 071, Next: 07, Prev: 072, Up: Changelog -5.13 0.7.1 +5.14 0.7.1 ========== *Fixes* @@ -1336,7 +1346,7 @@ File: README.info, Node: 071, Next: 07, Prev: 072, Up: Changelog  File: README.info, Node: 07, Next: 063, Prev: 071, Up: Changelog -5.14 0.7 +5.15 0.7 ======== *Added* @@ -1395,7 +1405,7 @@ File: README.info, Node: 07, Next: 063, Prev: 071, Up: Changelog  File: README.info, Node: 063, Next: 062, Prev: 07, Up: Changelog -5.15 0.6.3 +5.16 0.6.3 ========== *Fixed* @@ -1411,7 +1421,7 @@ File: README.info, Node: 063, Next: 062, Prev: 07, Up: Changelog  File: README.info, Node: 062, Next: 061, Prev: 063, Up: Changelog -5.16 0.6.2 +5.17 0.6.2 ========== *Fixed* @@ -1422,7 +1432,7 @@ File: README.info, Node: 062, Next: 061, Prev: 063, Up: Changelog  File: README.info, Node: 061, Next: 06, Prev: 062, Up: Changelog -5.17 0.6.1 +5.18 0.6.1 ========== *Fixed* @@ -1440,7 +1450,7 @@ File: README.info, Node: 061, Next: 06, Prev: 062, Up: Changelog  File: README.info, Node: 06, Next: 052, Prev: 061, Up: Changelog -5.18 0.6 +5.19 0.6 ======== *Added* @@ -1507,7 +1517,7 @@ File: README.info, Node: 06, Next: 052, Prev: 061, Up: Changelog  File: README.info, Node: 052, Next: 051, Prev: 06, Up: Changelog -5.19 0.5.2 +5.20 0.5.2 ========== *Fixed* @@ -1518,7 +1528,7 @@ File: README.info, Node: 052, Next: 051, Prev: 06, Up: Changelog  File: README.info, Node: 051, Next: 05, Prev: 052, Up: Changelog -5.20 0.5.1 +5.21 0.5.1 ========== *Fixed* @@ -1531,7 +1541,7 @@ File: README.info, Node: 051, Next: 05, Prev: 052, Up: Changelog  File: README.info, Node: 05, Next: 049, Prev: 051, Up: Changelog -5.21 0.5 +5.22 0.5 ======== *Added* @@ -1572,7 +1582,7 @@ File: README.info, Node: 05, Next: 049, Prev: 051, Up: Changelog  File: README.info, Node: 049, Next: 048, Prev: 05, Up: Changelog -5.22 0.4.9 +5.23 0.4.9 ========== *Fixed* @@ -1583,7 +1593,7 @@ File: README.info, Node: 049, Next: 048, Prev: 05, Up: Changelog  File: README.info, Node: 048, Next: 047, Prev: 049, Up: Changelog -5.23 0.4.8 +5.24 0.4.8 ========== *Fixed* @@ -1595,7 +1605,7 @@ File: README.info, Node: 048, Next: 047, Prev: 049, Up: Changelog  File: README.info, Node: 047, Next: 046, Prev: 048, Up: Changelog -5.24 0.4.7 +5.25 0.4.7 ========== *Fixed* @@ -1608,7 +1618,7 @@ File: README.info, Node: 047, Next: 046, Prev: 048, Up: Changelog  File: README.info, Node: 046, Next: 045, Prev: 047, Up: Changelog -5.25 0.4.6 +5.26 0.4.6 ========== *Fixed* @@ -1621,7 +1631,7 @@ File: README.info, Node: 046, Next: 045, Prev: 047, Up: Changelog  File: README.info, Node: 045, Next: 044, Prev: 046, Up: Changelog -5.26 0.4.5 +5.27 0.4.5 ========== *Fixed* @@ -1633,7 +1643,7 @@ File: README.info, Node: 045, Next: 044, Prev: 046, Up: Changelog  File: README.info, Node: 044, Next: 043, Prev: 045, Up: Changelog -5.27 0.4.4 +5.28 0.4.4 ========== *Fixed* @@ -1645,7 +1655,7 @@ File: README.info, Node: 044, Next: 043, Prev: 045, Up: Changelog  File: README.info, Node: 043, Next: 042, Prev: 044, Up: Changelog -5.28 0.4.3 +5.29 0.4.3 ========== *Fixed* @@ -1655,7 +1665,7 @@ File: README.info, Node: 043, Next: 042, Prev: 044, Up: Changelog  File: README.info, Node: 042, Next: 041, Prev: 043, Up: Changelog -5.29 0.4.2 +5.30 0.4.2 ========== *Fixed* @@ -1664,7 +1674,7 @@ File: README.info, Node: 042, Next: 041, Prev: 043, Up: Changelog  File: README.info, Node: 041, Next: 04, Prev: 042, Up: Changelog -5.30 0.4.1 +5.31 0.4.1 ========== *Fixed* @@ -1674,7 +1684,7 @@ File: README.info, Node: 041, Next: 04, Prev: 042, Up: Changelog  File: README.info, Node: 04, Next: 032, Prev: 041, Up: Changelog -5.31 0.4 +5.32 0.4 ======== _Note:_ The next release, 0.5, may include changes which will require @@ -1755,7 +1765,7 @@ automatically, as they will be pushed to the ‘master’ branch when ready.  File: README.info, Node: 032, Next: 031, Prev: 04, Up: Changelog -5.32 0.3.2 +5.33 0.3.2 ========== *Fixed* @@ -1768,7 +1778,7 @@ File: README.info, Node: 032, Next: 031, Prev: 04, Up: Changelog  File: README.info, Node: 031, Next: 03, Prev: 032, Up: Changelog -5.33 0.3.1 +5.34 0.3.1 ========== *Fixed* @@ -1778,7 +1788,7 @@ File: README.info, Node: 031, Next: 03, Prev: 032, Up: Changelog  File: README.info, Node: 03, Next: 023, Prev: 031, Up: Changelog -5.34 0.3 +5.35 0.3 ======== *Added* @@ -1846,7 +1856,7 @@ File: README.info, Node: 03, Next: 023, Prev: 031, Up: Changelog  File: README.info, Node: 023, Next: 022, Prev: 03, Up: Changelog -5.35 0.2.3 +5.36 0.2.3 ========== *Fixed* @@ -1856,7 +1866,7 @@ File: README.info, Node: 023, Next: 022, Prev: 03, Up: Changelog  File: README.info, Node: 022, Next: 021, Prev: 023, Up: Changelog -5.36 0.2.2 +5.37 0.2.2 ========== *Fixed* @@ -1867,7 +1877,7 @@ File: README.info, Node: 022, Next: 021, Prev: 023, Up: Changelog  File: README.info, Node: 021, Next: 02, Prev: 022, Up: Changelog -5.37 0.2.1 +5.38 0.2.1 ========== *Fixed* @@ -1877,7 +1887,7 @@ File: README.info, Node: 021, Next: 02, Prev: 022, Up: Changelog  File: README.info, Node: 02, Next: 01, Prev: 021, Up: Changelog -5.38 0.2 +5.39 0.2 ======== *Added* @@ -1960,7 +1970,7 @@ File: README.info, Node: 02, Next: 01, Prev: 021, Up: Changelog  File: README.info, Node: 01, Prev: 02, Up: Changelog -5.39 0.1 +5.40 0.1 ======== First tagged release. @@ -2018,84 +2028,85 @@ GPLv3  Tag Table: Node: Top225 -Node: Contents1963 -Node: Screenshots2086 -Node: Installation2204 -Node: Quelpa2718 -Node: Helm support3246 -Node: Usage3649 -Node: Commands4047 -Node: org-ql-find4512 -Node: org-ql-open-link5420 -Node: org-ql-refile6275 -Node: org-ql-search6603 -Node: helm-org-ql8534 -Node: org-ql-view8912 -Node: org-ql-view-sidebar9442 -Node: org-ql-view-recent-items9822 -Node: org-ql-sparse-tree10318 -Node: Queries11118 -Node: Non-sexp query syntax12235 -Node: General predicates13994 -Node: Ancestor/descendant predicates20919 -Node: Date/time predicates22047 -Node: Functions / Macros25171 -Node: Agenda-like views25469 -Ref: Function org-ql-block25631 -Node: Listing / acting-on results26892 -Ref: Caching27100 -Ref: Function org-ql-select28013 -Ref: Function org-ql-query30439 -Ref: Macro org-ql (deprecated)32213 -Node: Custom predicates32528 -Ref: Macro org-ql-defpred32752 -Node: Dynamic block36193 -Node: Links38917 -Node: Tips39604 -Node: Changelog39928 -Node: 08840856 -Node: 08741920 -Node: 08643148 -Node: 08543382 -Node: 08444038 -Node: 08344490 -Node: 08244831 -Node: 08145224 -Node: 0845645 -Node: 07448369 -Node: 07348594 -Node: 07249328 -Node: 07150249 -Node: 0751060 -Node: 06353926 -Node: 06254459 -Node: 06154766 -Node: 0655336 -Node: 05258392 -Node: 05158694 -Node: 0559119 -Node: 04960650 -Node: 04860932 -Node: 04761281 -Node: 04661690 -Node: 04562098 -Node: 04462459 -Node: 04362818 -Node: 04263021 -Node: 04163182 -Node: 0463429 -Node: 03267530 -Node: 03167933 -Node: 0368130 -Node: 02371430 -Node: 02271664 -Node: 02171944 -Node: 0272149 -Node: 0176227 -Node: Notes76328 -Node: Comparison with Org Agenda searches76490 -Node: org-sidebar77379 -Node: License77658 +Node: Contents1985 +Node: Screenshots2108 +Node: Installation2226 +Node: Quelpa2740 +Node: Helm support3268 +Node: Usage3671 +Node: Commands4069 +Node: org-ql-find4534 +Node: org-ql-open-link5442 +Node: org-ql-refile6297 +Node: org-ql-search6625 +Node: helm-org-ql8556 +Node: org-ql-view8934 +Node: org-ql-view-sidebar9464 +Node: org-ql-view-recent-items9844 +Node: org-ql-sparse-tree10340 +Node: Queries11140 +Node: Non-sexp query syntax12257 +Node: General predicates14016 +Node: Ancestor/descendant predicates20941 +Node: Date/time predicates22069 +Node: Functions / Macros25193 +Node: Agenda-like views25491 +Ref: Function org-ql-block25653 +Node: Listing / acting-on results26914 +Ref: Caching27122 +Ref: Function org-ql-select28035 +Ref: Function org-ql-query30461 +Ref: Macro org-ql (deprecated)32235 +Node: Custom predicates32550 +Ref: Macro org-ql-defpred32774 +Node: Dynamic block36215 +Node: Links38939 +Node: Tips39626 +Node: Changelog39950 +Node: 089-pre40900 +Node: 08841012 +Node: 08742092 +Node: 08643320 +Node: 08543554 +Node: 08444210 +Node: 08344662 +Node: 08245003 +Node: 08145396 +Node: 0845817 +Node: 07448543 +Node: 07348768 +Node: 07249502 +Node: 07150423 +Node: 0751234 +Node: 06354100 +Node: 06254633 +Node: 06154940 +Node: 0655510 +Node: 05258566 +Node: 05158868 +Node: 0559293 +Node: 04960824 +Node: 04861106 +Node: 04761455 +Node: 04661864 +Node: 04562272 +Node: 04462633 +Node: 04362992 +Node: 04263195 +Node: 04163356 +Node: 0463603 +Node: 03267704 +Node: 03168107 +Node: 0368304 +Node: 02371604 +Node: 02271838 +Node: 02172118 +Node: 0272323 +Node: 0176401 +Node: Notes76502 +Node: Comparison with Org Agenda searches76664 +Node: org-sidebar77553 +Node: License77832  End Tag Table From a373e812d0e6c1186bf24c05072bd853035e2e97 Mon Sep 17 00:00:00 2001 From: Adam Porter Date: Wed, 4 Sep 2024 22:00:41 -0500 Subject: [PATCH 51/70] Fix: (org-ql-view--link-follow) Reading link parameters This is needed due to changes in Emacs 30, but this code was always mistaken, and it just happened to work. See . Fixes #441. Suggested-by: Ola Nilsson --- README.org | 3 +- org-ql-view.el | 8 ++--- org-ql.info | 93 ++++++++++++++++++++++++++------------------------ 3 files changed, 55 insertions(+), 49 deletions(-) diff --git a/README.org b/README.org index 6fda2ae..3ec87f8 100644 --- a/README.org +++ b/README.org @@ -555,7 +555,8 @@ Simple links may also be written manually in either sexp or non-sexp form, like: ** 0.8.9-pre -Nothing new yet. +*Fixes* ++ Reading of view settings from Org links in upcoming Emacs version. ([[https://github.com/alphapapa/org-ql/issues/461][#461]]. Thanks to [[https://github.com/snogge][Ola Nilsson]] for help debugging, and for maintaining [[https://github.com/jorgenschaefer/emacs-buttercup][Buttercup]].) ** 0.8.8 diff --git a/org-ql-view.el b/org-ql-view.el index b5c4bb7..0978a80 100644 --- a/org-ql-view.el +++ b/org-ql-view.el @@ -622,7 +622,7 @@ purposes of compatibility with changes in Org 9.4." (query (url-unhex-string query)) (params (when params (url-parse-query-string params))) ;; `url-parse-query-string' returns "improper" alists, which makes this awkward. - (sort (when-let* ((stored-string (alist-get "sort" params nil nil #'string=)) + (sort (when-let* ((stored-string (car (alist-get "sort" params nil nil #'string=))) (read-value (read stored-string))) ;; Ensure the value is either a symbol or list of symbols (which excludes lambdas). (unless (or (symbolp read-value) (cl-every #'symbolp read-value)) @@ -630,11 +630,11 @@ purposes of compatibility with changes in Org 9.4." read-value)) read-value)) (org-super-agenda-allow-unsafe-groups nil) ; Disallow unsafe group selectors. - (groups (--when-let (alist-get "super-groups" params nil nil #'string=) + (groups (--when-let (car (alist-get "super-groups" params nil nil #'string=)) (read it))) - (title (--when-let (alist-get "title" params nil nil #'string=) + (title (--when-let (car (alist-get "title" params nil nil #'string=)) (read it))) - (buffers-files (--if-let (alist-get "buffers-files" params nil nil #'string=) + (buffers-files (--if-let (car (alist-get "buffers-files" params nil nil #'string=)) (org-ql-view--expand-buffers-files (read it)) (current-buffer)))) (unless (or (bufferp buffers-files) diff --git a/org-ql.info b/org-ql.info index cfe60fc..c0a424c 100644 --- a/org-ql.info +++ b/org-ql.info @@ -1084,7 +1084,12 @@ File: README.info, Node: 089-pre, Next: 088, Up: Changelog 5.1 0.8.9-pre ============= -Nothing new yet. +*Fixes* + • Reading of view settings from Org links in upcoming Emacs version. + (#461 (https://github.com/alphapapa/org-ql/issues/461). Thanks to + Ola Nilsson (https://github.com/snogge) for help debugging, and for + maintaining Buttercup + (https://github.com/jorgenschaefer/emacs-buttercup).)  File: README.info, Node: 088, Next: 087, Prev: 089-pre, Up: Changelog @@ -2064,49 +2069,49 @@ Node: Links38939 Node: Tips39626 Node: Changelog39950 Node: 089-pre40900 -Node: 08841012 -Node: 08742092 -Node: 08643320 -Node: 08543554 -Node: 08444210 -Node: 08344662 -Node: 08245003 -Node: 08145396 -Node: 0845817 -Node: 07448543 -Node: 07348768 -Node: 07249502 -Node: 07150423 -Node: 0751234 -Node: 06354100 -Node: 06254633 -Node: 06154940 -Node: 0655510 -Node: 05258566 -Node: 05158868 -Node: 0559293 -Node: 04960824 -Node: 04861106 -Node: 04761455 -Node: 04661864 -Node: 04562272 -Node: 04462633 -Node: 04362992 -Node: 04263195 -Node: 04163356 -Node: 0463603 -Node: 03267704 -Node: 03168107 -Node: 0368304 -Node: 02371604 -Node: 02271838 -Node: 02172118 -Node: 0272323 -Node: 0176401 -Node: Notes76502 -Node: Comparison with Org Agenda searches76664 -Node: org-sidebar77553 -Node: License77832 +Node: 08841308 +Node: 08742388 +Node: 08643616 +Node: 08543850 +Node: 08444506 +Node: 08344958 +Node: 08245299 +Node: 08145692 +Node: 0846113 +Node: 07448839 +Node: 07349064 +Node: 07249798 +Node: 07150719 +Node: 0751530 +Node: 06354396 +Node: 06254929 +Node: 06155236 +Node: 0655806 +Node: 05258862 +Node: 05159164 +Node: 0559589 +Node: 04961120 +Node: 04861402 +Node: 04761751 +Node: 04662160 +Node: 04562568 +Node: 04462929 +Node: 04363288 +Node: 04263491 +Node: 04163652 +Node: 0463899 +Node: 03268000 +Node: 03168403 +Node: 0368600 +Node: 02371900 +Node: 02272134 +Node: 02172414 +Node: 0272619 +Node: 0176697 +Node: Notes76798 +Node: Comparison with Org Agenda searches76960 +Node: org-sidebar77849 +Node: License78128  End Tag Table From 86d338729f17f8830a7b7dd6164fd8d8765a6df3 Mon Sep 17 00:00:00 2001 From: Adam Porter Date: Wed, 4 Sep 2024 20:48:51 -0500 Subject: [PATCH 52/70] Fix: (property) Calling like (property PROPERTY :inherit t) Supporting this form isn't really required, since it violates the CL-style argument parsing of CL-DEFUN, but it's convenient, and probably saves some hair-pulling for users who are less familiar with Elisp. Fixes #460. Reported-by: Stewmath --- README.org | 1 + org-ql.el | 54 +++++++++++++++++++------- org-ql.info | 90 +++++++++++++++++++++++--------------------- tests/test-org-ql.el | 10 ++++- 4 files changed, 98 insertions(+), 57 deletions(-) diff --git a/README.org b/README.org index 3ec87f8..bb6c589 100644 --- a/README.org +++ b/README.org @@ -556,6 +556,7 @@ Simple links may also be written manually in either sexp or non-sexp form, like: ** 0.8.9-pre *Fixes* ++ Predicate ~property~ when called with argument form ~(property "PROPERTY-NAME" :inherit t)~. ([[https://github.com/alphapapa/org-ql/issues/460][#460]]. Thanks to [[https://github.com/Stewmath][Stewmath]] for reporting.) + Reading of view settings from Org links in upcoming Emacs version. ([[https://github.com/alphapapa/org-ql/issues/461][#461]]. Thanks to [[https://github.com/snogge][Ola Nilsson]] for help debugging, and for maintaining [[https://github.com/jorgenschaefer/emacs-buttercup][Buttercup]].) ** 0.8.8 diff --git a/org-ql.el b/org-ql.el index 5149c78..9ff8d71 100644 --- a/org-ql.el +++ b/org-ql.el @@ -1799,34 +1799,62 @@ interpreted as nil or non-nil)." ;; predicate test for whether an entry has local ;; properties when no arguments are given. (list 'property "")) - (`(,predicate-names ,property ,value . ,plist) + (`(,predicate-names ,property) ;; Convert keyword property arguments to strings. Non-sexp ;; queries result in keyword property arguments (because to do ;; otherwise would require ugly special-casing in the parsing). (when (keywordp property) (setf property (substring (symbol-name property) 1))) - (list 'property property value - :inherit (cond ((plist-member plist :inherit) (plist-get plist :inherit)) - ((listp org-use-property-inheritance) ''selective) - (t org-use-property-inheritance))))) + (list 'property property)) + (`(,predicate-names ,property . ,rest) + (pcase rest + (`(,value) + ;; Convert keyword property arguments to strings. Non-sexp + ;; queries result in keyword property arguments (because to do + ;; otherwise would require ugly special-casing in the parsing). + (when (keywordp property) + (setf property (substring (symbol-name property) 1))) + (list 'property property value)) + ((and `(,value . ,plist) + (guard (not (keywordp value)))) + ;; Convert keyword property arguments to strings. Non-sexp + ;; queries result in keyword property arguments (because to do + ;; otherwise would require ugly special-casing in the parsing). + (when (keywordp property) + (setf property (substring (symbol-name property) 1))) + (list 'property property value + :inherit (cond ((plist-member plist :inherit) (plist-get plist :inherit)) + ((listp org-use-property-inheritance) ''selective) + (t org-use-property-inheritance)))) + ((and plist (guard (keywordp (car rest)))) + ;; Convert keyword property arguments to strings. Non-sexp + ;; queries result in keyword property arguments (because to do + ;; otherwise would require ugly special-casing in the parsing). + (when (keywordp property) + (setf property (substring (symbol-name property) 1))) + (list 'property property nil + :inherit (cond ((plist-member plist :inherit) (plist-get plist :inherit)) + ((listp org-use-property-inheritance) ''selective) + (t org-use-property-inheritance))))))) ;; MAYBE: Should case folding be disabled for properties? What about values? ;; MAYBE: Support (property) without args. ;; NOTE: When inheritance is enabled, the preamble can't be used, ;; which will make the search slower. - :preambles ((`(,predicate-names ,property ,value . ,(map :inherit)) + :preambles (((and `(,predicate-names ,property ,value) + (guard (atom value))) ;; We do NOT return nil, because the predicate still needs to be tested, ;; because the regexp could match a string not inside a property drawer. - (list :regexp (unless inherit - (rx-to-string `(seq bol (0+ space) ":" ,property ":" - (1+ space) ,value (0+ space) eol))) + (list :regexp (rx-to-string `(seq bol (0+ space) ":" ,property ":" + (1+ space) ,value (0+ space) eol)) :query query)) - (`(,predicate-names ,property . ,(map :inherit)) - ;; We do NOT return nil, because the predicate still needs to be tested, + ((and `(,predicate-names ,property ,value . ,plist) + (guard (keywordp (car plist)))) + ;; WE do NOT return nil, because the predicate still needs to be tested, ;; because the regexp could match a string not inside a property drawer. ;; NOTE: The preamble only matches if there appears to be a value. ;; A line like ":ID: " without any other text does not match. - (list :regexp (unless inherit + (list :regexp (unless (plist-get plist :inherit) (rx-to-string `(seq bol (0+ space) ":" ,property ":" (1+ space) (minimal-match (1+ not-newline)) eol))) :query query))) @@ -1838,7 +1866,7 @@ interpreted as nil or non-nil)." ;; Check that PROPERTY exists (org-ql--value-at (point) (lambda () - (org-entry-get (point) property)))) + (org-entry-get (point) property inherit)))) (_ ;; Check that PROPERTY has VALUE. diff --git a/org-ql.info b/org-ql.info index c0a424c..c11c851 100644 --- a/org-ql.info +++ b/org-ql.info @@ -1085,6 +1085,10 @@ File: README.info, Node: 089-pre, Next: 088, Up: Changelog ============= *Fixes* + • Predicate ‘property’ when called with argument form ‘(property + "PROPERTY-NAME" :inherit t)’. (#460 + (https://github.com/alphapapa/org-ql/issues/460). Thanks to + Stewmath (https://github.com/Stewmath) for reporting.) • Reading of view settings from Org links in upcoming Emacs version. (#461 (https://github.com/alphapapa/org-ql/issues/461). Thanks to Ola Nilsson (https://github.com/snogge) for help debugging, and for @@ -2069,49 +2073,49 @@ Node: Links38939 Node: Tips39626 Node: Changelog39950 Node: 089-pre40900 -Node: 08841308 -Node: 08742388 -Node: 08643616 -Node: 08543850 -Node: 08444506 -Node: 08344958 -Node: 08245299 -Node: 08145692 -Node: 0846113 -Node: 07448839 -Node: 07349064 -Node: 07249798 -Node: 07150719 -Node: 0751530 -Node: 06354396 -Node: 06254929 -Node: 06155236 -Node: 0655806 -Node: 05258862 -Node: 05159164 -Node: 0559589 -Node: 04961120 -Node: 04861402 -Node: 04761751 -Node: 04662160 -Node: 04562568 -Node: 04462929 -Node: 04363288 -Node: 04263491 -Node: 04163652 -Node: 0463899 -Node: 03268000 -Node: 03168403 -Node: 0368600 -Node: 02371900 -Node: 02272134 -Node: 02172414 -Node: 0272619 -Node: 0176697 -Node: Notes76798 -Node: Comparison with Org Agenda searches76960 -Node: org-sidebar77849 -Node: License78128 +Node: 08841554 +Node: 08742634 +Node: 08643862 +Node: 08544096 +Node: 08444752 +Node: 08345204 +Node: 08245545 +Node: 08145938 +Node: 0846359 +Node: 07449085 +Node: 07349310 +Node: 07250044 +Node: 07150965 +Node: 0751776 +Node: 06354642 +Node: 06255175 +Node: 06155482 +Node: 0656052 +Node: 05259108 +Node: 05159410 +Node: 0559835 +Node: 04961366 +Node: 04861648 +Node: 04761997 +Node: 04662406 +Node: 04562814 +Node: 04463175 +Node: 04363534 +Node: 04263737 +Node: 04163898 +Node: 0464145 +Node: 03268246 +Node: 03168649 +Node: 0368846 +Node: 02372146 +Node: 02272380 +Node: 02172660 +Node: 0272865 +Node: 0176943 +Node: Notes77044 +Node: Comparison with Org Agenda searches77206 +Node: org-sidebar78095 +Node: License78374  End Tag Table diff --git a/tests/test-org-ql.el b/tests/test-org-ql.el index 6717472..444cb22 100644 --- a/tests/test-org-ql.el +++ b/tests/test-org-ql.el @@ -1337,7 +1337,15 @@ with keyword arg NOW in PLIST." (org-ql-it "with a property and a value" (org-ql-expect ('(property "agenda-group" "plans")) - '("Take over the universe" "Write a symphony")))) + '("Take over the universe" "Write a symphony"))) + + (org-ql-it "with a property and \"nil :inherit t\"" + (org-ql-expect ('(property "agenda-group" nil :inherit t)) + '("Take over the universe" "Take over the world" "Skype with president of Antarctica" "Take over Mars" "Visit Mars" "Take over the moon" "Visit the moon" "Practice leaping tall buildings in a single bound" "Renew membership in supervillain club" "Learn universal sign language" "Spaceship lease" "Recurring" "/r/emacs" "Shop for groceries" "Sunrise/sunset" "Write a symphony"))) + + (org-ql-it "with a property and \":inherit t\"" + (org-ql-expect ('(property "agenda-group" :inherit t)) + '("Take over the universe" "Take over the world" "Skype with president of Antarctica" "Take over Mars" "Visit Mars" "Take over the moon" "Visit the moon" "Practice leaping tall buildings in a single bound" "Renew membership in supervillain club" "Learn universal sign language" "Spaceship lease" "Recurring" "/r/emacs" "Shop for groceries" "Sunrise/sunset" "Write a symphony")))) (describe "(regexp)" From c77bade432dc196314a7391be2a914fdad0b9ecc Mon Sep 17 00:00:00 2001 From: Adam Porter Date: Wed, 4 Sep 2024 21:40:44 -0500 Subject: [PATCH 53/70] Tests: Fix filenames for CI (better) This is much simpler. --- tests/test-org-ql.el | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/test-org-ql.el b/tests/test-org-ql.el index 444cb22..baf79c4 100644 --- a/tests/test-org-ql.el +++ b/tests/test-org-ql.el @@ -2011,7 +2011,7 @@ with keyword arg NOW in PLIST." (describe "View saving/loading" :var* ((temp-dir (make-temp-file "test-org-ql-" 'dir)) (temp-filenames (cl-loop for file in '("test1.org" "test2.org") - collect (expand-file-name file temp-dir))) + collect (abbreviate-file-name (expand-file-name file temp-dir)))) (file-contents (with-temp-buffer (insert "#+TITLE: Test data\n\n" "* TODO Heading 1\n" From 3e7f48ad7e000d4131b94aa3a54f555d7c98f394 Mon Sep 17 00:00:00 2001 From: Adam Porter Date: Thu, 27 Jun 2024 07:02:09 -0500 Subject: [PATCH 54/70] Meta: (test.yml) Also test on Emacs 29.1-29.4 --- .github/workflows/test.yml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 4f11ce7..2de58b4 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -45,6 +45,10 @@ jobs: - 27.2 - 28.1 - 28.2 + - 29.1 + - 29.2 + - 29.3 + - 29.4 - snapshot steps: - uses: purcell/setup-emacs@master From 5ea97d22721475a920ca57532eb482b2bf545246 Mon Sep 17 00:00:00 2001 From: Adam Porter Date: Thu, 5 Sep 2024 15:49:11 -0500 Subject: [PATCH 55/70] Fix: (level) Check number argument for preamble This allows a query like this: (level <= (string-to-number (property PROPERTY))) to proceed without signaling an error from ORG-QL--QUERY-PREAMBLE. See #460. Reported-by: Stewmath --- README.org | 1 + org-ql.el | 6 ++- org-ql.info | 90 +++++++++++++++++++++++--------------------- tests/test-org-ql.el | 5 +++ 4 files changed, 57 insertions(+), 45 deletions(-) diff --git a/README.org b/README.org index bb6c589..36d8031 100644 --- a/README.org +++ b/README.org @@ -557,6 +557,7 @@ Simple links may also be written manually in either sexp or non-sexp form, like: *Fixes* + Predicate ~property~ when called with argument form ~(property "PROPERTY-NAME" :inherit t)~. ([[https://github.com/alphapapa/org-ql/issues/460][#460]]. Thanks to [[https://github.com/Stewmath][Stewmath]] for reporting.) ++ Predicate ~level~'s preamble optimizer allows expressions in place of the numeric argument. (See [[https://github.com/alphapapa/org-ql/issues/460][#460]]. Thanks to [[https://github.com/Stewmath][Stewmath]] for reporting.) + Reading of view settings from Org links in upcoming Emacs version. ([[https://github.com/alphapapa/org-ql/issues/461][#461]]. Thanks to [[https://github.com/snogge][Ola Nilsson]] for help debugging, and for maintaining [[https://github.com/jorgenschaefer/emacs-buttercup][Buttercup]].) ** 0.8.8 diff --git a/org-ql.el b/org-ql.el index 9ff8d71..40266e3 100644 --- a/org-ql.el +++ b/org-ql.el @@ -1534,7 +1534,8 @@ COMPARATOR may be `<', `<=', `>', or `>='." ;; is "h:" while the user is typing. (list :regexp (rx bol (1+ "*") " ") :case-fold t)) - (`(,predicate-names ,comparator-or-num ,num) + ((and `(,predicate-names ,comparator-or-num ,num) + (guard (numberp num))) (let ((repeat (pcase comparator-or-num ('< `(repeat 1 ,(1- num) "*")) ('<= `(repeat 1 ,num "*")) @@ -1543,7 +1544,8 @@ COMPARATOR may be `<', `<=', `>', or `>='." ((pred integerp) `(repeat ,comparator-or-num ,num "*"))))) (list :regexp (rx-to-string `(seq bol ,repeat " ") t) :case-fold t))) - (`(,predicate-names ,num) + ((and `(,predicate-names ,num) + (guard (numberp num))) (list :regexp (rx-to-string `(seq bol (repeat ,num "*") " ") t) :case-fold t))) ;; NOTE: It might be necessary to take into account `org-odd-levels'; see docstring for diff --git a/org-ql.info b/org-ql.info index c11c851..e2ab21f 100644 --- a/org-ql.info +++ b/org-ql.info @@ -1089,6 +1089,10 @@ File: README.info, Node: 089-pre, Next: 088, Up: Changelog "PROPERTY-NAME" :inherit t)’. (#460 (https://github.com/alphapapa/org-ql/issues/460). Thanks to Stewmath (https://github.com/Stewmath) for reporting.) + • Predicate ‘level’’s preamble optimizer allows expressions in place + of the numeric argument. (See #460 + (https://github.com/alphapapa/org-ql/issues/460). Thanks to + Stewmath (https://github.com/Stewmath) for reporting.) • Reading of view settings from Org links in upcoming Emacs version. (#461 (https://github.com/alphapapa/org-ql/issues/461). Thanks to Ola Nilsson (https://github.com/snogge) for help debugging, and for @@ -2073,49 +2077,49 @@ Node: Links38939 Node: Tips39626 Node: Changelog39950 Node: 089-pre40900 -Node: 08841554 -Node: 08742634 -Node: 08643862 -Node: 08544096 -Node: 08444752 -Node: 08345204 -Node: 08245545 -Node: 08145938 -Node: 0846359 -Node: 07449085 -Node: 07349310 -Node: 07250044 -Node: 07150965 -Node: 0751776 -Node: 06354642 -Node: 06255175 -Node: 06155482 -Node: 0656052 -Node: 05259108 -Node: 05159410 -Node: 0559835 -Node: 04961366 -Node: 04861648 -Node: 04761997 -Node: 04662406 -Node: 04562814 -Node: 04463175 -Node: 04363534 -Node: 04263737 -Node: 04163898 -Node: 0464145 -Node: 03268246 -Node: 03168649 -Node: 0368846 -Node: 02372146 -Node: 02272380 -Node: 02172660 -Node: 0272865 -Node: 0176943 -Node: Notes77044 -Node: Comparison with Org Agenda searches77206 -Node: org-sidebar78095 -Node: License78374 +Node: 08841801 +Node: 08742881 +Node: 08644109 +Node: 08544343 +Node: 08444999 +Node: 08345451 +Node: 08245792 +Node: 08146185 +Node: 0846606 +Node: 07449332 +Node: 07349557 +Node: 07250291 +Node: 07151212 +Node: 0752023 +Node: 06354889 +Node: 06255422 +Node: 06155729 +Node: 0656299 +Node: 05259355 +Node: 05159657 +Node: 0560082 +Node: 04961613 +Node: 04861895 +Node: 04762244 +Node: 04662653 +Node: 04563061 +Node: 04463422 +Node: 04363781 +Node: 04263984 +Node: 04164145 +Node: 0464392 +Node: 03268493 +Node: 03168896 +Node: 0369093 +Node: 02372393 +Node: 02272627 +Node: 02172907 +Node: 0273112 +Node: 0177190 +Node: Notes77291 +Node: Comparison with Org Agenda searches77453 +Node: org-sidebar78342 +Node: License78621  End Tag Table diff --git a/tests/test-org-ql.el b/tests/test-org-ql.el index baf79c4..fab9ea9 100644 --- a/tests/test-org-ql.el +++ b/tests/test-org-ql.el @@ -636,6 +636,11 @@ with keyword arg NOW in PLIST." :to-equal (list :query t :preamble (rx bol (repeat 2 4 "*") " ") :preamble-case-fold t))) + (it "with an expression in level number's place" + (expect (org-ql--query-preamble '(level <= (string-to-number (property "PROPERTY")))) + :to-equal (list :query '(level <= (string-to-number (property "PROPERTY"))) + :preamble nil + :preamble-case-fold t))) (it "<" (expect (org-ql--query-preamble '(level < 3)) :to-equal (list :query t From e241354fd60ad203db486b5450f9c4544d91b7f3 Mon Sep 17 00:00:00 2001 From: Adam Porter Date: Thu, 27 Jun 2024 09:10:47 -0500 Subject: [PATCH 56/70] Fix: (org-ql--define-query-preamble-fn) Pcase pattern for Emacs 30 Now all tests and lints pass on Emacs versions 27.1-29.4, and the current 30.0.50-ish snapshot build. Note: This change was originally applied on master, but it seems reasonable to apply it to this stable bugfix release now. Fixes #433. Reported-by: Akira Komamura Co-developed-by: Stefan Monnier --- README.org | 3 ++ org-ql.el | 5 ++- org-ql.info | 92 ++++++++++++++++++++++++++++------------------------- 3 files changed, 56 insertions(+), 44 deletions(-) diff --git a/README.org b/README.org index 36d8031..0887467 100644 --- a/README.org +++ b/README.org @@ -560,6 +560,9 @@ Simple links may also be written manually in either sexp or non-sexp form, like: + Predicate ~level~'s preamble optimizer allows expressions in place of the numeric argument. (See [[https://github.com/alphapapa/org-ql/issues/460][#460]]. Thanks to [[https://github.com/Stewmath][Stewmath]] for reporting.) + Reading of view settings from Org links in upcoming Emacs version. ([[https://github.com/alphapapa/org-ql/issues/461][#461]]. Thanks to [[https://github.com/snogge][Ola Nilsson]] for help debugging, and for maintaining [[https://github.com/jorgenschaefer/emacs-buttercup][Buttercup]].) +*Compatibility* ++ Fix compilation error on Emacs 30. ([[https://github.com/alphapapa/org-ql/issues/433][#433]]. Thanks to [[https://github.com/akirak][Akira Komamura]] and [[https://github.com/monnier][Stefan Monnier]].) + ** 0.8.8 *Fixes* diff --git a/org-ql.el b/org-ql.el index 40266e3..5a0538e 100644 --- a/org-ql.el +++ b/org-ql.el @@ -1118,7 +1118,10 @@ defined in `org-ql-predicates' by calling `org-ql-defpred'." ;; Only one preamble is allowed element) (pcase element - (`(or _) element) + (`(or ,element) + ;; A predicate with a single name: unwrap the OR. (Pcase doesn't like + ;; "one-armed ORs", giving a "Please avoid it" compilation error.) + element) ,@preamble-patterns diff --git a/org-ql.info b/org-ql.info index e2ab21f..332c847 100644 --- a/org-ql.info +++ b/org-ql.info @@ -1099,6 +1099,12 @@ File: README.info, Node: 089-pre, Next: 088, Up: Changelog maintaining Buttercup (https://github.com/jorgenschaefer/emacs-buttercup).) + *Compatibility* + • Fix compilation error on Emacs 30. (#433 + (https://github.com/alphapapa/org-ql/issues/433). Thanks to Akira + Komamura (https://github.com/akirak) and Stefan Monnier + (https://github.com/monnier).) +  File: README.info, Node: 088, Next: 087, Prev: 089-pre, Up: Changelog @@ -2077,49 +2083,49 @@ Node: Links38939 Node: Tips39626 Node: Changelog39950 Node: 089-pre40900 -Node: 08841801 -Node: 08742881 -Node: 08644109 -Node: 08544343 -Node: 08444999 -Node: 08345451 -Node: 08245792 -Node: 08146185 -Node: 0846606 -Node: 07449332 -Node: 07349557 -Node: 07250291 -Node: 07151212 -Node: 0752023 -Node: 06354889 -Node: 06255422 -Node: 06155729 -Node: 0656299 -Node: 05259355 -Node: 05159657 -Node: 0560082 -Node: 04961613 -Node: 04861895 -Node: 04762244 -Node: 04662653 -Node: 04563061 -Node: 04463422 -Node: 04363781 -Node: 04263984 -Node: 04164145 -Node: 0464392 -Node: 03268493 -Node: 03168896 -Node: 0369093 -Node: 02372393 -Node: 02272627 -Node: 02172907 -Node: 0273112 -Node: 0177190 -Node: Notes77291 -Node: Comparison with Org Agenda searches77453 -Node: org-sidebar78342 -Node: License78621 +Node: 08842039 +Node: 08743119 +Node: 08644347 +Node: 08544581 +Node: 08445237 +Node: 08345689 +Node: 08246030 +Node: 08146423 +Node: 0846844 +Node: 07449570 +Node: 07349795 +Node: 07250529 +Node: 07151450 +Node: 0752261 +Node: 06355127 +Node: 06255660 +Node: 06155967 +Node: 0656537 +Node: 05259593 +Node: 05159895 +Node: 0560320 +Node: 04961851 +Node: 04862133 +Node: 04762482 +Node: 04662891 +Node: 04563299 +Node: 04463660 +Node: 04364019 +Node: 04264222 +Node: 04164383 +Node: 0464630 +Node: 03268731 +Node: 03169134 +Node: 0369331 +Node: 02372631 +Node: 02272865 +Node: 02173145 +Node: 0273350 +Node: 0177428 +Node: Notes77529 +Node: Comparison with Org Agenda searches77691 +Node: org-sidebar78580 +Node: License78859  End Tag Table From 81281350d44a3903a0866431342299f5f3c74beb Mon Sep 17 00:00:00 2001 From: Adam Porter Date: Thu, 5 Sep 2024 18:56:47 -0500 Subject: [PATCH 57/70] Release: v0.8.9 --- README.org | 2 +- org-ql.el | 2 +- org-ql.info | 170 ++++++++++++++++++++++++++-------------------------- 3 files changed, 87 insertions(+), 87 deletions(-) diff --git a/README.org b/README.org index 0887467..461bcda 100644 --- a/README.org +++ b/README.org @@ -553,7 +553,7 @@ Simple links may also be written manually in either sexp or non-sexp form, like: /Note:/ Breaking changes may be made before version 1.0, but in the event of major changes, attempts at backward compatibility will be made with obsolescence declarations, translation of arguments, etc. Users who need stability guarantees before 1.0 may choose to use tagged stable releases. -** 0.8.9-pre +** 0.8.9 *Fixes* + Predicate ~property~ when called with argument form ~(property "PROPERTY-NAME" :inherit t)~. ([[https://github.com/alphapapa/org-ql/issues/460][#460]]. Thanks to [[https://github.com/Stewmath][Stewmath]] for reporting.) diff --git a/org-ql.el b/org-ql.el index 5a0538e..efbb3f2 100644 --- a/org-ql.el +++ b/org-ql.el @@ -4,7 +4,7 @@ ;; Author: Adam Porter ;; Url: https://github.com/alphapapa/org-ql -;; Version: 0.8.9-pre +;; Version: 0.8.9 ;; Package-Requires: ((emacs "27.1") (compat "29.1") (dash "2.18.1") (f "0.17.2") (map "2.1") (org "9.0") (org-super-agenda "1.2") (ov "1.0.6") (peg "1.0.1") (s "1.12.0") (transient "0.1") (ts "0.2-pre")) ;; Keywords: hypermedia, outlines, Org, agenda diff --git a/org-ql.info b/org-ql.info index 332c847..83817aa 100644 --- a/org-ql.info +++ b/org-ql.info @@ -72,7 +72,7 @@ Functions / Macros Changelog -* 0.8.9-pre: 089-pre. +* 0.8.9: 089. * 0.8.8: 088. * 0.8.7: 087. * 0.8.6: 086. @@ -1037,7 +1037,7 @@ releases. * Menu: -* 0.8.9-pre: 089-pre. +* 0.8.9: 089. * 0.8.8: 088. * 0.8.7: 087. * 0.8.6: 086. @@ -1079,10 +1079,10 @@ releases. * 0.1: 01.  -File: README.info, Node: 089-pre, Next: 088, Up: Changelog +File: README.info, Node: 089, Next: 088, Up: Changelog -5.1 0.8.9-pre -============= +5.1 0.8.9 +========= *Fixes* • Predicate ‘property’ when called with argument form ‘(property @@ -1106,7 +1106,7 @@ File: README.info, Node: 089-pre, Next: 088, Up: Changelog (https://github.com/monnier).)  -File: README.info, Node: 088, Next: 087, Prev: 089-pre, Up: Changelog +File: README.info, Node: 088, Next: 087, Prev: 089, Up: Changelog 5.2 0.8.8 ========= @@ -2047,85 +2047,85 @@ GPLv3  Tag Table: Node: Top225 -Node: Contents1985 -Node: Screenshots2108 -Node: Installation2226 -Node: Quelpa2740 -Node: Helm support3268 -Node: Usage3671 -Node: Commands4069 -Node: org-ql-find4534 -Node: org-ql-open-link5442 -Node: org-ql-refile6297 -Node: org-ql-search6625 -Node: helm-org-ql8556 -Node: org-ql-view8934 -Node: org-ql-view-sidebar9464 -Node: org-ql-view-recent-items9844 -Node: org-ql-sparse-tree10340 -Node: Queries11140 -Node: Non-sexp query syntax12257 -Node: General predicates14016 -Node: Ancestor/descendant predicates20941 -Node: Date/time predicates22069 -Node: Functions / Macros25193 -Node: Agenda-like views25491 -Ref: Function org-ql-block25653 -Node: Listing / acting-on results26914 -Ref: Caching27122 -Ref: Function org-ql-select28035 -Ref: Function org-ql-query30461 -Ref: Macro org-ql (deprecated)32235 -Node: Custom predicates32550 -Ref: Macro org-ql-defpred32774 -Node: Dynamic block36215 -Node: Links38939 -Node: Tips39626 -Node: Changelog39950 -Node: 089-pre40900 -Node: 08842039 -Node: 08743119 -Node: 08644347 -Node: 08544581 -Node: 08445237 -Node: 08345689 -Node: 08246030 -Node: 08146423 -Node: 0846844 -Node: 07449570 -Node: 07349795 -Node: 07250529 -Node: 07151450 -Node: 0752261 -Node: 06355127 -Node: 06255660 -Node: 06155967 -Node: 0656537 -Node: 05259593 -Node: 05159895 -Node: 0560320 -Node: 04961851 -Node: 04862133 -Node: 04762482 -Node: 04662891 -Node: 04563299 -Node: 04463660 -Node: 04364019 -Node: 04264222 -Node: 04164383 -Node: 0464630 -Node: 03268731 -Node: 03169134 -Node: 0369331 -Node: 02372631 -Node: 02272865 -Node: 02173145 -Node: 0273350 -Node: 0177428 -Node: Notes77529 -Node: Comparison with Org Agenda searches77691 -Node: org-sidebar78580 -Node: License78859 +Node: Contents1977 +Node: Screenshots2100 +Node: Installation2218 +Node: Quelpa2732 +Node: Helm support3260 +Node: Usage3663 +Node: Commands4061 +Node: org-ql-find4526 +Node: org-ql-open-link5434 +Node: org-ql-refile6289 +Node: org-ql-search6617 +Node: helm-org-ql8548 +Node: org-ql-view8926 +Node: org-ql-view-sidebar9456 +Node: org-ql-view-recent-items9836 +Node: org-ql-sparse-tree10332 +Node: Queries11132 +Node: Non-sexp query syntax12249 +Node: General predicates14008 +Node: Ancestor/descendant predicates20933 +Node: Date/time predicates22061 +Node: Functions / Macros25185 +Node: Agenda-like views25483 +Ref: Function org-ql-block25645 +Node: Listing / acting-on results26906 +Ref: Caching27114 +Ref: Function org-ql-select28027 +Ref: Function org-ql-query30453 +Ref: Macro org-ql (deprecated)32227 +Node: Custom predicates32542 +Ref: Macro org-ql-defpred32766 +Node: Dynamic block36207 +Node: Links38931 +Node: Tips39618 +Node: Changelog39942 +Node: 08940884 +Node: 08842011 +Node: 08743087 +Node: 08644315 +Node: 08544549 +Node: 08445205 +Node: 08345657 +Node: 08245998 +Node: 08146391 +Node: 0846812 +Node: 07449538 +Node: 07349763 +Node: 07250497 +Node: 07151418 +Node: 0752229 +Node: 06355095 +Node: 06255628 +Node: 06155935 +Node: 0656505 +Node: 05259561 +Node: 05159863 +Node: 0560288 +Node: 04961819 +Node: 04862101 +Node: 04762450 +Node: 04662859 +Node: 04563267 +Node: 04463628 +Node: 04363987 +Node: 04264190 +Node: 04164351 +Node: 0464598 +Node: 03268699 +Node: 03169102 +Node: 0369299 +Node: 02372599 +Node: 02272833 +Node: 02173113 +Node: 0273318 +Node: 0177396 +Node: Notes77497 +Node: Comparison with Org Agenda searches77659 +Node: org-sidebar78548 +Node: License78827  End Tag Table From 1c8c89f26407e5fc874f5ef0141768737e7897f1 Mon Sep 17 00:00:00 2001 From: Adam Porter Date: Tue, 10 Sep 2024 22:11:10 -0500 Subject: [PATCH 58/70] Add: (defface org-ql-view-title) Use in -view--header-line-format Note that we also add a safety check in ORG-QL-VIEW--LINK-FOLLOW, because the addition of a call to PROPERTIZE in ORG-QL-VIEW--HEADER-LINE-FORMAT effectively removes what was functioning as a safety check there (as CONCAT had been signaling an error for the unsafe argument, whereas PROPERTIZE, which is called to apply the new face, does not). We also change the expected error in the tests accordingly. --- README.org | 3 ++ org-ql-view.el | 9 +++- org-ql.info | 99 +++++++++++++++++++++++--------------------- tests/test-org-ql.el | 6 +-- 4 files changed, 65 insertions(+), 52 deletions(-) diff --git a/README.org b/README.org index 77cee93..404460e 100644 --- a/README.org +++ b/README.org @@ -556,6 +556,9 @@ Simple links may also be written manually in either sexp or non-sexp form, like: ** 0.9-pre +*Additions* ++ Face ~org-ql-view-title~, applied to view titles in header line. + *Changes* + Command ~org-ql-find~ respects narrowing of the current buffer by default, allowing searching within the narrowed region. (Using one ~C-u~ argument widens the current buffer, and using two ~C-u~ arguments prompts for the buffers to search.) + Function ~org-ql-completing-read~ accepts a new ~NARROWP~ argument, which is passed to ~org-ql-select~. diff --git a/org-ql-view.el b/org-ql-view.el index 1377e40..77089d5 100644 --- a/org-ql-view.el +++ b/org-ql-view.el @@ -59,6 +59,10 @@ "Face for due dates in `org-ql-view' views." :group 'org-ql) +(defface org-ql-view-title '((t :weight bold)) + "View title in header line." + :group 'org-ql-view) + ;;;; Variables (defvar org-ql-view-buffer-name-prefix "*Org QL View:" @@ -459,7 +463,8 @@ subsequent refreshing of the buffer: `org-ql-view-buffers-files', If TITLE, prepend it to the header." (let* ((title (if title (concat (propertize "View:" 'face 'transient-argument) - title " ") + (propertize title 'face 'org-ql-view-title) + " ") "")) (query-formatted (when query (org-ql-view--format-query query))) @@ -645,6 +650,8 @@ purposes of compatibility with changes in Org 9.4." (stringp buffers-files) (cl-every #'stringp buffers-files)) (error "CAUTION: Link not opened because unsafe buffers-files parameter detected: %s" buffers-files)) + (unless (or (stringp title) (null title)) + (error "CAUTION: Link not opened because unsafe title parameter detected: %S" title)) (when (or (listp query) (string-match (rx bol (0+ space) "(") query)) ;; SAFETY: Query is in sexp form: ask for confirmation, because it could contain arbitrary code. diff --git a/org-ql.info b/org-ql.info index 77e33ef..4225785 100644 --- a/org-ql.info +++ b/org-ql.info @@ -1095,7 +1095,10 @@ File: README.info, Node: 09-pre, Next: 089, Up: Changelog 5.1 0.9-pre =========== -*Changes* +*Additions* + • Face ‘org-ql-view-title’, applied to view titles in header line. + + *Changes* • Command ‘org-ql-find’ respects narrowing of the current buffer by default, allowing searching within the narrowed region. (Using one ‘C-u’ argument widens the current buffer, and using two ‘C-u’ @@ -2147,53 +2150,53 @@ Node: Links39051 Node: Tips39738 Node: Changelog40062 Node: 09-pre41029 -Node: helm-org-ql (1)41575 -Node: 08941716 -Node: 08842858 -Node: 08743934 -Node: 08645162 -Node: 08545396 -Node: 08446052 -Node: 08346504 -Node: 08246845 -Node: 08147238 -Node: 0847661 -Node: 07450387 -Node: 07350612 -Node: 07251346 -Node: 07152267 -Node: 0753078 -Node: 06355944 -Node: 06256477 -Node: 06156784 -Node: 0657354 -Node: 05260410 -Node: 05160712 -Node: 0561137 -Node: 04962668 -Node: 04862950 -Node: 04763299 -Node: 04663708 -Node: 04564116 -Node: 04464477 -Node: 04364836 -Node: 04265039 -Node: 04165200 -Node: 0465447 -Node: 03269548 -Node: 03169951 -Node: 0370148 -Node: 02373448 -Node: 02273682 -Node: 02173962 -Node: 0274167 -Node: 0178245 -Node: Development78346 -Node: Copyright assignment78579 -Node: Notes79169 -Node: Comparison with Org Agenda searches79333 -Node: org-sidebar80222 -Node: License80501 +Node: helm-org-ql (1)41667 +Node: 08941808 +Node: 08842950 +Node: 08744026 +Node: 08645254 +Node: 08545488 +Node: 08446144 +Node: 08346596 +Node: 08246937 +Node: 08147330 +Node: 0847753 +Node: 07450479 +Node: 07350704 +Node: 07251438 +Node: 07152359 +Node: 0753170 +Node: 06356036 +Node: 06256569 +Node: 06156876 +Node: 0657446 +Node: 05260502 +Node: 05160804 +Node: 0561229 +Node: 04962760 +Node: 04863042 +Node: 04763391 +Node: 04663800 +Node: 04564208 +Node: 04464569 +Node: 04364928 +Node: 04265131 +Node: 04165292 +Node: 0465539 +Node: 03269640 +Node: 03170043 +Node: 0370240 +Node: 02373540 +Node: 02273774 +Node: 02174054 +Node: 0274259 +Node: 0178337 +Node: Development78438 +Node: Copyright assignment78671 +Node: Notes79261 +Node: Comparison with Org Agenda searches79425 +Node: org-sidebar80314 +Node: License80593  End Tag Table diff --git a/tests/test-org-ql.el b/tests/test-org-ql.el index 22d173b..923ec66 100644 --- a/tests/test-org-ql.el +++ b/tests/test-org-ql.el @@ -1986,13 +1986,13 @@ with keyword arg NOW in PLIST." (expression-link "[[org-ql-search:todo:?title%3D%28error%20%22UNSAFE%22%29]]")) (it "Errors for a quoted lambda" (expect (open-link quoted-lambda-link) - :to-throw 'wrong-type-argument '(characterp lambda))) + :to-throw 'error '("CAUTION: Link not opened because unsafe title parameter detected: (lambda (_ _) (error \"UNSAFE\"))"))) (it "Errors for an unquoted lambda" (expect (open-link unquoted-lambda-link) - :to-throw 'wrong-type-argument '(characterp lambda))) + :to-throw 'error '("CAUTION: Link not opened because unsafe title parameter detected: (lambda (_ _) (error \"UNSAFE\"))"))) (it "Errors for an expression" (expect (open-link expression-link) - :to-throw 'wrong-type-argument '(characterp error)))) + :to-throw 'error '("CAUTION: Link not opened because unsafe title parameter detected: (error \"UNSAFE\")")))) (describe "sort parameter" :var ((quoted-lambda-link "[[org-ql-search:todo:?sort%3D%28lambda%20%28_%20_%29%20%28error%20%22UNSAFE%22%29%29]]") From a3c0205a68a573fd4b67f208c0121b911b6d11ff Mon Sep 17 00:00:00 2001 From: Adam Porter Date: Tue, 10 Sep 2024 22:38:19 -0500 Subject: [PATCH 59/70] Fix: (defface org-ql-view-due-date) Customization group --- README.org | 3 ++ org-ql-view.el | 2 +- org-ql.info | 97 ++++++++++++++++++++++++++------------------------ 3 files changed, 54 insertions(+), 48 deletions(-) diff --git a/README.org b/README.org index 404460e..34b5c3f 100644 --- a/README.org +++ b/README.org @@ -563,6 +563,9 @@ Simple links may also be written manually in either sexp or non-sexp form, like: + Command ~org-ql-find~ respects narrowing of the current buffer by default, allowing searching within the narrowed region. (Using one ~C-u~ argument widens the current buffer, and using two ~C-u~ arguments prompts for the buffers to search.) + Function ~org-ql-completing-read~ accepts a new ~NARROWP~ argument, which is passed to ~org-ql-select~. +*Fixes* ++ Customization group for face ~org-ql-view-due-date~. + *** helm-org-ql Tagged v0.6.2, fixing a compilation warning. diff --git a/org-ql-view.el b/org-ql-view.el index 77089d5..b0ec311 100644 --- a/org-ql-view.el +++ b/org-ql-view.el @@ -57,7 +57,7 @@ (defface org-ql-view-due-date '((t (:slant italic :weight bold))) "Face for due dates in `org-ql-view' views." - :group 'org-ql) + :group 'org-ql-view) (defface org-ql-view-title '((t :weight bold)) "View title in header line." diff --git a/org-ql.info b/org-ql.info index 4225785..df1dc2f 100644 --- a/org-ql.info +++ b/org-ql.info @@ -1106,6 +1106,9 @@ File: README.info, Node: 09-pre, Next: 089, Up: Changelog • Function ‘org-ql-completing-read’ accepts a new ‘NARROWP’ argument, which is passed to ‘org-ql-select’. + *Fixes* + • Customization group for face ‘org-ql-view-due-date’. + * Menu: * helm-org-ql: helm-org-ql (1). @@ -2150,53 +2153,53 @@ Node: Links39051 Node: Tips39738 Node: Changelog40062 Node: 09-pre41029 -Node: helm-org-ql (1)41667 -Node: 08941808 -Node: 08842950 -Node: 08744026 -Node: 08645254 -Node: 08545488 -Node: 08446144 -Node: 08346596 -Node: 08246937 -Node: 08147330 -Node: 0847753 -Node: 07450479 -Node: 07350704 -Node: 07251438 -Node: 07152359 -Node: 0753170 -Node: 06356036 -Node: 06256569 -Node: 06156876 -Node: 0657446 -Node: 05260502 -Node: 05160804 -Node: 0561229 -Node: 04962760 -Node: 04863042 -Node: 04763391 -Node: 04663800 -Node: 04564208 -Node: 04464569 -Node: 04364928 -Node: 04265131 -Node: 04165292 -Node: 0465539 -Node: 03269640 -Node: 03170043 -Node: 0370240 -Node: 02373540 -Node: 02273774 -Node: 02174054 -Node: 0274259 -Node: 0178337 -Node: Development78438 -Node: Copyright assignment78671 -Node: Notes79261 -Node: Comparison with Org Agenda searches79425 -Node: org-sidebar80314 -Node: License80593 +Node: helm-org-ql (1)41743 +Node: 08941884 +Node: 08843026 +Node: 08744102 +Node: 08645330 +Node: 08545564 +Node: 08446220 +Node: 08346672 +Node: 08247013 +Node: 08147406 +Node: 0847829 +Node: 07450555 +Node: 07350780 +Node: 07251514 +Node: 07152435 +Node: 0753246 +Node: 06356112 +Node: 06256645 +Node: 06156952 +Node: 0657522 +Node: 05260578 +Node: 05160880 +Node: 0561305 +Node: 04962836 +Node: 04863118 +Node: 04763467 +Node: 04663876 +Node: 04564284 +Node: 04464645 +Node: 04365004 +Node: 04265207 +Node: 04165368 +Node: 0465615 +Node: 03269716 +Node: 03170119 +Node: 0370316 +Node: 02373616 +Node: 02273850 +Node: 02174130 +Node: 0274335 +Node: 0178413 +Node: Development78514 +Node: Copyright assignment78747 +Node: Notes79337 +Node: Comparison with Org Agenda searches79501 +Node: org-sidebar80390 +Node: License80669  End Tag Table From 82f762e31c37aa5775cbfabf3f7e8756fd481e9a Mon Sep 17 00:00:00 2001 From: Adam Porter Date: Wed, 11 Sep 2024 01:01:30 -0500 Subject: [PATCH 60/70] Add: (org-ql-view-relative-deadline-prefix) --- README.org | 1 + org-ql-view.el | 10 +++++- org-ql.info | 95 +++++++++++++++++++++++++------------------------- 3 files changed, 58 insertions(+), 48 deletions(-) diff --git a/README.org b/README.org index 34b5c3f..99fb8fb 100644 --- a/README.org +++ b/README.org @@ -558,6 +558,7 @@ Simple links may also be written manually in either sexp or non-sexp form, like: *Additions* + Face ~org-ql-view-title~, applied to view titles in header line. ++ Option ~org-ql-view-relative-deadline-prefix~. *Changes* + Command ~org-ql-find~ respects narrowing of the current buffer by default, allowing searching within the narrowed region. (Using one ~C-u~ argument widens the current buffer, and using two ~C-u~ arguments prompts for the buffers to search.) diff --git a/org-ql-view.el b/org-ql-view.el index b0ec311..90d0521 100644 --- a/org-ql-view.el +++ b/org-ql-view.el @@ -242,6 +242,12 @@ See info node `(elisp)Cyclic Window Ordering'." (sexp :tag "org-super-agenda grouping expression") (variable :tag "Variable holding org-super-agenda grouping expression")))))))) +(defcustom org-ql-view-relative-deadline-prefix "due " + ;; TODO(v0.9): Add one for scheduled, too. + "Prefix for relative deadlines. +Relative deadlines are, e.g. \"in 5d\", \"5d ago\"." + :type 'string) + ;;;; Commands ;;;###autoload @@ -1021,7 +1027,9 @@ property." (deadline-day-number (org-time-string-to-absolute (org-element-timestamp-interpreter deadline-date 'ignore))) (difference-days (- today-day-number deadline-day-number)) - (relative-due-date (org-add-props (org-ql-view--format-relative-date difference-days) nil + (relative-due-date (org-add-props + (concat org-ql-view-relative-deadline-prefix + (org-ql-view--format-relative-date difference-days)) nil 'help-echo (org-element-property :raw-value deadline-date))) ;; FIXME: Unused for now: (todo-keyword (org-element-property :todo-keyword element)) ;; FIXME: Unused for now: (done-p (member todo-keyword org-done-keywords)) diff --git a/org-ql.info b/org-ql.info index df1dc2f..9fc615c 100644 --- a/org-ql.info +++ b/org-ql.info @@ -1097,6 +1097,7 @@ File: README.info, Node: 09-pre, Next: 089, Up: Changelog *Additions* • Face ‘org-ql-view-title’, applied to view titles in header line. + • Option ‘org-ql-view-relative-deadline-prefix’. *Changes* • Command ‘org-ql-find’ respects narrowing of the current buffer by @@ -2153,53 +2154,53 @@ Node: Links39051 Node: Tips39738 Node: Changelog40062 Node: 09-pre41029 -Node: helm-org-ql (1)41743 -Node: 08941884 -Node: 08843026 -Node: 08744102 -Node: 08645330 -Node: 08545564 -Node: 08446220 -Node: 08346672 -Node: 08247013 -Node: 08147406 -Node: 0847829 -Node: 07450555 -Node: 07350780 -Node: 07251514 -Node: 07152435 -Node: 0753246 -Node: 06356112 -Node: 06256645 -Node: 06156952 -Node: 0657522 -Node: 05260578 -Node: 05160880 -Node: 0561305 -Node: 04962836 -Node: 04863118 -Node: 04763467 -Node: 04663876 -Node: 04564284 -Node: 04464645 -Node: 04365004 -Node: 04265207 -Node: 04165368 -Node: 0465615 -Node: 03269716 -Node: 03170119 -Node: 0370316 -Node: 02373616 -Node: 02273850 -Node: 02174130 -Node: 0274335 -Node: 0178413 -Node: Development78514 -Node: Copyright assignment78747 -Node: Notes79337 -Node: Comparison with Org Agenda searches79501 -Node: org-sidebar80390 -Node: License80669 +Node: helm-org-ql (1)41801 +Node: 08941942 +Node: 08843084 +Node: 08744160 +Node: 08645388 +Node: 08545622 +Node: 08446278 +Node: 08346730 +Node: 08247071 +Node: 08147464 +Node: 0847887 +Node: 07450613 +Node: 07350838 +Node: 07251572 +Node: 07152493 +Node: 0753304 +Node: 06356170 +Node: 06256703 +Node: 06157010 +Node: 0657580 +Node: 05260636 +Node: 05160938 +Node: 0561363 +Node: 04962894 +Node: 04863176 +Node: 04763525 +Node: 04663934 +Node: 04564342 +Node: 04464703 +Node: 04365062 +Node: 04265265 +Node: 04165426 +Node: 0465673 +Node: 03269774 +Node: 03170177 +Node: 0370374 +Node: 02373674 +Node: 02273908 +Node: 02174188 +Node: 0274393 +Node: 0178471 +Node: Development78572 +Node: Copyright assignment78805 +Node: Notes79395 +Node: Comparison with Org Agenda searches79559 +Node: org-sidebar80448 +Node: License80727  End Tag Table From d574b6055103f81780ff9c52d411a44f87f1dcfa Mon Sep 17 00:00:00 2001 From: Adam Porter Date: Wed, 11 Sep 2024 01:50:16 -0500 Subject: [PATCH 61/70] Add: (defface org-ql-view-query) --- README.org | 1 + org-ql-view.el | 8 +++++ org-ql.info | 95 +++++++++++++++++++++++++------------------------- 3 files changed, 57 insertions(+), 47 deletions(-) diff --git a/README.org b/README.org index 99fb8fb..943b159 100644 --- a/README.org +++ b/README.org @@ -557,6 +557,7 @@ Simple links may also be written manually in either sexp or non-sexp form, like: ** 0.9-pre *Additions* ++ Face ~org-ql-view-query~, applied to view queries in header line. + Face ~org-ql-view-title~, applied to view titles in header line. + Option ~org-ql-view-relative-deadline-prefix~. diff --git a/org-ql-view.el b/org-ql-view.el index 90d0521..1165bef 100644 --- a/org-ql-view.el +++ b/org-ql-view.el @@ -59,6 +59,13 @@ "Face for due dates in `org-ql-view' views." :group 'org-ql-view) +(defface org-ql-view-query nil + "View query in header line. +This face is added to the formatted query after font-lock faces +are applied to it. It may be used, e.g. to reduce the height so +more of it is visible." + :group 'org-ql-view) + (defface org-ql-view-title '((t :weight bold)) "View title in header line." :group 'org-ql-view) @@ -489,6 +496,7 @@ If TITLE, prepend it to the header." (org-ql-view--font-lock-string 'emacs-lisp-mode) (s-truncate available-width)) 'help-echo buffers-files-formatted)))) + (add-face-text-property 0 (length query-propertized) 'org-ql-view-query 'append query-propertized) (concat title (when query (propertize "Query:" 'face 'transient-argument)) (when query query-propertized) diff --git a/org-ql.info b/org-ql.info index 9fc615c..d5c5a07 100644 --- a/org-ql.info +++ b/org-ql.info @@ -1096,6 +1096,7 @@ File: README.info, Node: 09-pre, Next: 089, Up: Changelog =========== *Additions* + • Face ‘org-ql-view-query’, applied to view queries in header line. • Face ‘org-ql-view-title’, applied to view titles in header line. • Option ‘org-ql-view-relative-deadline-prefix’. @@ -2154,53 +2155,53 @@ Node: Links39051 Node: Tips39738 Node: Changelog40062 Node: 09-pre41029 -Node: helm-org-ql (1)41801 -Node: 08941942 -Node: 08843084 -Node: 08744160 -Node: 08645388 -Node: 08545622 -Node: 08446278 -Node: 08346730 -Node: 08247071 -Node: 08147464 -Node: 0847887 -Node: 07450613 -Node: 07350838 -Node: 07251572 -Node: 07152493 -Node: 0753304 -Node: 06356170 -Node: 06256703 -Node: 06157010 -Node: 0657580 -Node: 05260636 -Node: 05160938 -Node: 0561363 -Node: 04962894 -Node: 04863176 -Node: 04763525 -Node: 04663934 -Node: 04564342 -Node: 04464703 -Node: 04365062 -Node: 04265265 -Node: 04165426 -Node: 0465673 -Node: 03269774 -Node: 03170177 -Node: 0370374 -Node: 02373674 -Node: 02273908 -Node: 02174188 -Node: 0274393 -Node: 0178471 -Node: Development78572 -Node: Copyright assignment78805 -Node: Notes79395 -Node: Comparison with Org Agenda searches79559 -Node: org-sidebar80448 -Node: License80727 +Node: helm-org-ql (1)41878 +Node: 08942019 +Node: 08843161 +Node: 08744237 +Node: 08645465 +Node: 08545699 +Node: 08446355 +Node: 08346807 +Node: 08247148 +Node: 08147541 +Node: 0847964 +Node: 07450690 +Node: 07350915 +Node: 07251649 +Node: 07152570 +Node: 0753381 +Node: 06356247 +Node: 06256780 +Node: 06157087 +Node: 0657657 +Node: 05260713 +Node: 05161015 +Node: 0561440 +Node: 04962971 +Node: 04863253 +Node: 04763602 +Node: 04664011 +Node: 04564419 +Node: 04464780 +Node: 04365139 +Node: 04265342 +Node: 04165503 +Node: 0465750 +Node: 03269851 +Node: 03170254 +Node: 0370451 +Node: 02373751 +Node: 02273985 +Node: 02174265 +Node: 0274470 +Node: 0178548 +Node: Development78649 +Node: Copyright assignment78882 +Node: Notes79472 +Node: Comparison with Org Agenda searches79636 +Node: org-sidebar80525 +Node: License80804  End Tag Table From fff110acded7f7746b086079204fb37c005d7763 Mon Sep 17 00:00:00 2001 From: Adam Porter Date: Mon, 16 Sep 2024 13:42:17 -0500 Subject: [PATCH 62/70] Fix: (org-ql-refile) Use base buffer Should probably release this in a v0.8.10. See #466. --- README.org | 1 + org-ql-find.el | 26 +++++++------- org-ql.info | 96 ++++++++++++++++++++++++++------------------------ 3 files changed, 64 insertions(+), 59 deletions(-) diff --git a/README.org b/README.org index 943b159..4610596 100644 --- a/README.org +++ b/README.org @@ -567,6 +567,7 @@ Simple links may also be written manually in either sexp or non-sexp form, like: *Fixes* + Customization group for face ~org-ql-view-due-date~. ++ Command ~org-ql-refile~ uses the base buffer when refiling to an indirect buffer. *** helm-org-ql diff --git a/org-ql-find.el b/org-ql-find.el index ed6d21d..e6c4795 100644 --- a/org-ql-find.el +++ b/org-ql-find.el @@ -122,18 +122,20 @@ which see (but only the files are used)." ((and (pred listp) files) files))) (list files-spec))))))) (list (org-ql-completing-read buffers-files :prompt "Refile to: ")))) - (org-refile nil nil - ;; The RFLOC argument: - (list - ;; Name - (org-with-point-at marker - (nth 4 (org-heading-components))) - ;; File - (buffer-file-name (marker-buffer marker)) - ;; nil - nil - ;; Position - marker))) + (let ((buffer (or (buffer-base-buffer (marker-buffer marker)) + (marker-buffer marker)))) + (org-refile nil nil + ;; The RFLOC argument: + (list + ;; Name + (org-with-point-at marker + (nth 4 (org-heading-components))) + ;; File + (buffer-file-name buffer) + ;; nil + nil + ;; Position + marker)))) ;;;###autoload (defun org-ql-find-in-agenda () diff --git a/org-ql.info b/org-ql.info index d5c5a07..d0b34a2 100644 --- a/org-ql.info +++ b/org-ql.info @@ -1110,6 +1110,8 @@ File: README.info, Node: 09-pre, Next: 089, Up: Changelog *Fixes* • Customization group for face ‘org-ql-view-due-date’. + • Command ‘org-ql-refile’ uses the base buffer when refiling to an + indirect buffer. * Menu: @@ -2155,53 +2157,53 @@ Node: Links39051 Node: Tips39738 Node: Changelog40062 Node: 09-pre41029 -Node: helm-org-ql (1)41878 -Node: 08942019 -Node: 08843161 -Node: 08744237 -Node: 08645465 -Node: 08545699 -Node: 08446355 -Node: 08346807 -Node: 08247148 -Node: 08147541 -Node: 0847964 -Node: 07450690 -Node: 07350915 -Node: 07251649 -Node: 07152570 -Node: 0753381 -Node: 06356247 -Node: 06256780 -Node: 06157087 -Node: 0657657 -Node: 05260713 -Node: 05161015 -Node: 0561440 -Node: 04962971 -Node: 04863253 -Node: 04763602 -Node: 04664011 -Node: 04564419 -Node: 04464780 -Node: 04365139 -Node: 04265342 -Node: 04165503 -Node: 0465750 -Node: 03269851 -Node: 03170254 -Node: 0370451 -Node: 02373751 -Node: 02273985 -Node: 02174265 -Node: 0274470 -Node: 0178548 -Node: Development78649 -Node: Copyright assignment78882 -Node: Notes79472 -Node: Comparison with Org Agenda searches79636 -Node: org-sidebar80525 -Node: License80804 +Node: helm-org-ql (1)41976 +Node: 08942117 +Node: 08843259 +Node: 08744335 +Node: 08645563 +Node: 08545797 +Node: 08446453 +Node: 08346905 +Node: 08247246 +Node: 08147639 +Node: 0848062 +Node: 07450788 +Node: 07351013 +Node: 07251747 +Node: 07152668 +Node: 0753479 +Node: 06356345 +Node: 06256878 +Node: 06157185 +Node: 0657755 +Node: 05260811 +Node: 05161113 +Node: 0561538 +Node: 04963069 +Node: 04863351 +Node: 04763700 +Node: 04664109 +Node: 04564517 +Node: 04464878 +Node: 04365237 +Node: 04265440 +Node: 04165601 +Node: 0465848 +Node: 03269949 +Node: 03170352 +Node: 0370549 +Node: 02373849 +Node: 02274083 +Node: 02174363 +Node: 0274568 +Node: 0178646 +Node: Development78747 +Node: Copyright assignment78980 +Node: Notes79570 +Node: Comparison with Org Agenda searches79734 +Node: org-sidebar80623 +Node: License80902  End Tag Table From b6f8a315e966123fbfd1ac240d35da5c2b48d6ac Mon Sep 17 00:00:00 2001 From: Adam Porter Date: Mon, 16 Sep 2024 18:25:02 -0500 Subject: [PATCH 63/70] Fix: (org-ql-view--format-element) Font-lock Org syntax Not sure why I overlooked this for so long (links already worked, which is probably why). --- README.org | 1 + org-ql-view.el | 21 +++++++++++ org-ql.info | 95 +++++++++++++++++++++++++------------------------- 3 files changed, 70 insertions(+), 47 deletions(-) diff --git a/README.org b/README.org index 4610596..0f20c2c 100644 --- a/README.org +++ b/README.org @@ -568,6 +568,7 @@ Simple links may also be written manually in either sexp or non-sexp form, like: *Fixes* + Customization group for face ~org-ql-view-due-date~. + Command ~org-ql-refile~ uses the base buffer when refiling to an indirect buffer. ++ Apply Org syntax font-locking to items in ~org-ql-view~ buffers. *** helm-org-ql diff --git a/org-ql-view.el b/org-ql-view.el index 1165bef..8d65582 100644 --- a/org-ql-view.el +++ b/org-ql-view.el @@ -528,6 +528,22 @@ with human-readable strings." (font-lock-ensure) (buffer-string)))) +(defun org-ql-view--font-lock-as-org (s) + "Return string S font-locked as in `org-mode'." + ;; This works like `org-fontify-like-in-org-mode', but uses a single + ;; buffer instead of a new one every time. + ;; TODO(C): Submit these improvements upstream. + (let ((buffer (or (get-buffer " *org-ql-view--font-lock-as-org*") + (with-current-buffer (get-buffer-create " *org-ql-view--font-lock-as-org*") + (buffer-disable-undo) + (org-mode) + (current-buffer))))) + (with-current-buffer buffer + (insert s) + (font-lock-ensure) + (prog1 (buffer-string) + (erase-buffer))))) + (defun org-ql-view--buffer (&optional name) "Return `org-ql-view' buffer, creating it if necessary. If NAME is non-nil, return buffer by that name instead of using @@ -898,6 +914,11 @@ return an empty string." ;; (which would also make it easier to do it independently of faces, etc). (title (--> (org-ql-view--add-faces element) (org-element-property :raw-value it))) + ;; TODO(B): Needs refactoring. A function like `org-ql-view--add-faces' + ;; should return a list of faces to be added. + (title-faces (get-text-property 0 'face title)) + (title (org-ql-view--font-lock-as-org title)) + (_ (add-face-text-property 0 (length title) title-faces t title)) (todo-keyword (-some--> (org-element-property :todo-keyword element) (org-ql-view--add-todo-face (substring-no-properties it)))) diff --git a/org-ql.info b/org-ql.info index d0b34a2..ea2444f 100644 --- a/org-ql.info +++ b/org-ql.info @@ -1112,6 +1112,7 @@ File: README.info, Node: 09-pre, Next: 089, Up: Changelog • Customization group for face ‘org-ql-view-due-date’. • Command ‘org-ql-refile’ uses the base buffer when refiling to an indirect buffer. + • Apply Org syntax font-locking to items in ‘org-ql-view’ buffers. * Menu: @@ -2157,53 +2158,53 @@ Node: Links39051 Node: Tips39738 Node: Changelog40062 Node: 09-pre41029 -Node: helm-org-ql (1)41976 -Node: 08942117 -Node: 08843259 -Node: 08744335 -Node: 08645563 -Node: 08545797 -Node: 08446453 -Node: 08346905 -Node: 08247246 -Node: 08147639 -Node: 0848062 -Node: 07450788 -Node: 07351013 -Node: 07251747 -Node: 07152668 -Node: 0753479 -Node: 06356345 -Node: 06256878 -Node: 06157185 -Node: 0657755 -Node: 05260811 -Node: 05161113 -Node: 0561538 -Node: 04963069 -Node: 04863351 -Node: 04763700 -Node: 04664109 -Node: 04564517 -Node: 04464878 -Node: 04365237 -Node: 04265440 -Node: 04165601 -Node: 0465848 -Node: 03269949 -Node: 03170352 -Node: 0370549 -Node: 02373849 -Node: 02274083 -Node: 02174363 -Node: 0274568 -Node: 0178646 -Node: Development78747 -Node: Copyright assignment78980 -Node: Notes79570 -Node: Comparison with Org Agenda searches79734 -Node: org-sidebar80623 -Node: License80902 +Node: helm-org-ql (1)42052 +Node: 08942193 +Node: 08843335 +Node: 08744411 +Node: 08645639 +Node: 08545873 +Node: 08446529 +Node: 08346981 +Node: 08247322 +Node: 08147715 +Node: 0848138 +Node: 07450864 +Node: 07351089 +Node: 07251823 +Node: 07152744 +Node: 0753555 +Node: 06356421 +Node: 06256954 +Node: 06157261 +Node: 0657831 +Node: 05260887 +Node: 05161189 +Node: 0561614 +Node: 04963145 +Node: 04863427 +Node: 04763776 +Node: 04664185 +Node: 04564593 +Node: 04464954 +Node: 04365313 +Node: 04265516 +Node: 04165677 +Node: 0465924 +Node: 03270025 +Node: 03170428 +Node: 0370625 +Node: 02373925 +Node: 02274159 +Node: 02174439 +Node: 0274644 +Node: 0178722 +Node: Development78823 +Node: Copyright assignment79056 +Node: Notes79646 +Node: Comparison with Org Agenda searches79810 +Node: org-sidebar80699 +Node: License80978  End Tag Table From 3cfc77d2ff62e39de182ceaef1913ce2d38db299 Mon Sep 17 00:00:00 2001 From: Adam Porter Date: Wed, 6 Nov 2024 21:18:37 -0600 Subject: [PATCH 64/70] Meta: v0.8.10-pre --- README.org | 4 + org-ql.el | 2 +- org-ql.info | 253 +++++++++++++++++++++++++++------------------------- 3 files changed, 137 insertions(+), 122 deletions(-) diff --git a/README.org b/README.org index 461bcda..a0f3334 100644 --- a/README.org +++ b/README.org @@ -553,6 +553,10 @@ Simple links may also be written manually in either sexp or non-sexp form, like: /Note:/ Breaking changes may be made before version 1.0, but in the event of major changes, attempts at backward compatibility will be made with obsolescence declarations, translation of arguments, etc. Users who need stability guarantees before 1.0 may choose to use tagged stable releases. +** 0.8.10-pre + +Nothing new yet. + ** 0.8.9 *Fixes* diff --git a/org-ql.el b/org-ql.el index efbb3f2..3353a58 100644 --- a/org-ql.el +++ b/org-ql.el @@ -4,7 +4,7 @@ ;; Author: Adam Porter ;; Url: https://github.com/alphapapa/org-ql -;; Version: 0.8.9 +;; Version: 0.8.10-pre ;; Package-Requires: ((emacs "27.1") (compat "29.1") (dash "2.18.1") (f "0.17.2") (map "2.1") (org "9.0") (org-super-agenda "1.2") (ov "1.0.6") (peg "1.0.1") (s "1.12.0") (transient "0.1") (ts "0.2-pre")) ;; Keywords: hypermedia, outlines, Org, agenda diff --git a/org-ql.info b/org-ql.info index 83817aa..20971d4 100644 --- a/org-ql.info +++ b/org-ql.info @@ -72,6 +72,7 @@ Functions / Macros Changelog +* 0.8.10-pre: 0810-pre. * 0.8.9: 089. * 0.8.8: 088. * 0.8.7: 087. @@ -1037,6 +1038,7 @@ releases. * Menu: +* 0.8.10-pre: 0810-pre. * 0.8.9: 089. * 0.8.8: 088. * 0.8.7: 087. @@ -1079,9 +1081,17 @@ releases. * 0.1: 01.  -File: README.info, Node: 089, Next: 088, Up: Changelog +File: README.info, Node: 0810-pre, Next: 089, Up: Changelog -5.1 0.8.9 +5.1 0.8.10-pre +============== + +Nothing new yet. + + +File: README.info, Node: 089, Next: 088, Prev: 0810-pre, Up: Changelog + +5.2 0.8.9 ========= *Fixes* @@ -1108,7 +1118,7 @@ File: README.info, Node: 089, Next: 088, Up: Changelog  File: README.info, Node: 088, Next: 087, Prev: 089, Up: Changelog -5.2 0.8.8 +5.3 0.8.8 ========= *Fixes* @@ -1130,7 +1140,7 @@ File: README.info, Node: 088, Next: 087, Prev: 089, Up: Changelog  File: README.info, Node: 087, Next: 086, Prev: 088, Up: Changelog -5.3 0.8.7 +5.4 0.8.7 ========= *Fixes* @@ -1158,7 +1168,7 @@ File: README.info, Node: 087, Next: 086, Prev: 088, Up: Changelog  File: README.info, Node: 086, Next: 085, Prev: 087, Up: Changelog -5.4 0.8.6 +5.5 0.8.6 ========= *Fixes* @@ -1168,7 +1178,7 @@ File: README.info, Node: 086, Next: 085, Prev: 087, Up: Changelog  File: README.info, Node: 085, Next: 084, Prev: 086, Up: Changelog -5.5 0.8.5 +5.6 0.8.5 ========= *Fixes* @@ -1185,7 +1195,7 @@ File: README.info, Node: 085, Next: 084, Prev: 086, Up: Changelog  File: README.info, Node: 084, Next: 083, Prev: 085, Up: Changelog -5.6 0.8.4 +5.7 0.8.4 ========= *Fixes* @@ -1199,7 +1209,7 @@ File: README.info, Node: 084, Next: 083, Prev: 085, Up: Changelog  File: README.info, Node: 083, Next: 082, Prev: 084, Up: Changelog -5.7 0.8.3 +5.8 0.8.3 ========= *Fixes* @@ -1212,7 +1222,7 @@ File: README.info, Node: 083, Next: 082, Prev: 084, Up: Changelog  File: README.info, Node: 082, Next: 081, Prev: 083, Up: Changelog -5.8 0.8.2 +5.9 0.8.2 ========= *Fixes* @@ -1226,8 +1236,8 @@ File: README.info, Node: 082, Next: 081, Prev: 083, Up: Changelog  File: README.info, Node: 081, Next: 08, Prev: 082, Up: Changelog -5.9 0.8.1 -========= +5.10 0.8.1 +========== *Fixes* @@ -1241,7 +1251,7 @@ File: README.info, Node: 081, Next: 08, Prev: 082, Up: Changelog  File: README.info, Node: 08, Next: 074, Prev: 081, Up: Changelog -5.10 0.8 +5.11 0.8 ======== *Additions* @@ -1297,7 +1307,7 @@ File: README.info, Node: 08, Next: 074, Prev: 081, Up: Changelog  File: README.info, Node: 074, Next: 073, Prev: 08, Up: Changelog -5.11 0.7.4 +5.12 0.7.4 ========== *Fixes* @@ -1307,7 +1317,7 @@ File: README.info, Node: 074, Next: 073, Prev: 08, Up: Changelog  File: README.info, Node: 073, Next: 072, Prev: 074, Up: Changelog -5.12 0.7.3 +5.13 0.7.3 ========== *Fixes* @@ -1325,7 +1335,7 @@ File: README.info, Node: 073, Next: 072, Prev: 074, Up: Changelog  File: README.info, Node: 072, Next: 071, Prev: 073, Up: Changelog -5.13 0.7.2 +5.14 0.7.2 ========== *Fixes* @@ -1346,7 +1356,7 @@ File: README.info, Node: 072, Next: 071, Prev: 073, Up: Changelog  File: README.info, Node: 071, Next: 07, Prev: 072, Up: Changelog -5.14 0.7.1 +5.15 0.7.1 ========== *Fixes* @@ -1365,7 +1375,7 @@ File: README.info, Node: 071, Next: 07, Prev: 072, Up: Changelog  File: README.info, Node: 07, Next: 063, Prev: 071, Up: Changelog -5.15 0.7 +5.16 0.7 ======== *Added* @@ -1424,7 +1434,7 @@ File: README.info, Node: 07, Next: 063, Prev: 071, Up: Changelog  File: README.info, Node: 063, Next: 062, Prev: 07, Up: Changelog -5.16 0.6.3 +5.17 0.6.3 ========== *Fixed* @@ -1440,7 +1450,7 @@ File: README.info, Node: 063, Next: 062, Prev: 07, Up: Changelog  File: README.info, Node: 062, Next: 061, Prev: 063, Up: Changelog -5.17 0.6.2 +5.18 0.6.2 ========== *Fixed* @@ -1451,7 +1461,7 @@ File: README.info, Node: 062, Next: 061, Prev: 063, Up: Changelog  File: README.info, Node: 061, Next: 06, Prev: 062, Up: Changelog -5.18 0.6.1 +5.19 0.6.1 ========== *Fixed* @@ -1469,7 +1479,7 @@ File: README.info, Node: 061, Next: 06, Prev: 062, Up: Changelog  File: README.info, Node: 06, Next: 052, Prev: 061, Up: Changelog -5.19 0.6 +5.20 0.6 ======== *Added* @@ -1536,7 +1546,7 @@ File: README.info, Node: 06, Next: 052, Prev: 061, Up: Changelog  File: README.info, Node: 052, Next: 051, Prev: 06, Up: Changelog -5.20 0.5.2 +5.21 0.5.2 ========== *Fixed* @@ -1547,7 +1557,7 @@ File: README.info, Node: 052, Next: 051, Prev: 06, Up: Changelog  File: README.info, Node: 051, Next: 05, Prev: 052, Up: Changelog -5.21 0.5.1 +5.22 0.5.1 ========== *Fixed* @@ -1560,7 +1570,7 @@ File: README.info, Node: 051, Next: 05, Prev: 052, Up: Changelog  File: README.info, Node: 05, Next: 049, Prev: 051, Up: Changelog -5.22 0.5 +5.23 0.5 ======== *Added* @@ -1601,7 +1611,7 @@ File: README.info, Node: 05, Next: 049, Prev: 051, Up: Changelog  File: README.info, Node: 049, Next: 048, Prev: 05, Up: Changelog -5.23 0.4.9 +5.24 0.4.9 ========== *Fixed* @@ -1612,7 +1622,7 @@ File: README.info, Node: 049, Next: 048, Prev: 05, Up: Changelog  File: README.info, Node: 048, Next: 047, Prev: 049, Up: Changelog -5.24 0.4.8 +5.25 0.4.8 ========== *Fixed* @@ -1624,7 +1634,7 @@ File: README.info, Node: 048, Next: 047, Prev: 049, Up: Changelog  File: README.info, Node: 047, Next: 046, Prev: 048, Up: Changelog -5.25 0.4.7 +5.26 0.4.7 ========== *Fixed* @@ -1637,7 +1647,7 @@ File: README.info, Node: 047, Next: 046, Prev: 048, Up: Changelog  File: README.info, Node: 046, Next: 045, Prev: 047, Up: Changelog -5.26 0.4.6 +5.27 0.4.6 ========== *Fixed* @@ -1650,7 +1660,7 @@ File: README.info, Node: 046, Next: 045, Prev: 047, Up: Changelog  File: README.info, Node: 045, Next: 044, Prev: 046, Up: Changelog -5.27 0.4.5 +5.28 0.4.5 ========== *Fixed* @@ -1662,7 +1672,7 @@ File: README.info, Node: 045, Next: 044, Prev: 046, Up: Changelog  File: README.info, Node: 044, Next: 043, Prev: 045, Up: Changelog -5.28 0.4.4 +5.29 0.4.4 ========== *Fixed* @@ -1674,7 +1684,7 @@ File: README.info, Node: 044, Next: 043, Prev: 045, Up: Changelog  File: README.info, Node: 043, Next: 042, Prev: 044, Up: Changelog -5.29 0.4.3 +5.30 0.4.3 ========== *Fixed* @@ -1684,7 +1694,7 @@ File: README.info, Node: 043, Next: 042, Prev: 044, Up: Changelog  File: README.info, Node: 042, Next: 041, Prev: 043, Up: Changelog -5.30 0.4.2 +5.31 0.4.2 ========== *Fixed* @@ -1693,7 +1703,7 @@ File: README.info, Node: 042, Next: 041, Prev: 043, Up: Changelog  File: README.info, Node: 041, Next: 04, Prev: 042, Up: Changelog -5.31 0.4.1 +5.32 0.4.1 ========== *Fixed* @@ -1703,7 +1713,7 @@ File: README.info, Node: 041, Next: 04, Prev: 042, Up: Changelog  File: README.info, Node: 04, Next: 032, Prev: 041, Up: Changelog -5.32 0.4 +5.33 0.4 ======== _Note:_ The next release, 0.5, may include changes which will require @@ -1784,7 +1794,7 @@ automatically, as they will be pushed to the ‘master’ branch when ready.  File: README.info, Node: 032, Next: 031, Prev: 04, Up: Changelog -5.33 0.3.2 +5.34 0.3.2 ========== *Fixed* @@ -1797,7 +1807,7 @@ File: README.info, Node: 032, Next: 031, Prev: 04, Up: Changelog  File: README.info, Node: 031, Next: 03, Prev: 032, Up: Changelog -5.34 0.3.1 +5.35 0.3.1 ========== *Fixed* @@ -1807,7 +1817,7 @@ File: README.info, Node: 031, Next: 03, Prev: 032, Up: Changelog  File: README.info, Node: 03, Next: 023, Prev: 031, Up: Changelog -5.35 0.3 +5.36 0.3 ======== *Added* @@ -1875,7 +1885,7 @@ File: README.info, Node: 03, Next: 023, Prev: 031, Up: Changelog  File: README.info, Node: 023, Next: 022, Prev: 03, Up: Changelog -5.36 0.2.3 +5.37 0.2.3 ========== *Fixed* @@ -1885,7 +1895,7 @@ File: README.info, Node: 023, Next: 022, Prev: 03, Up: Changelog  File: README.info, Node: 022, Next: 021, Prev: 023, Up: Changelog -5.37 0.2.2 +5.38 0.2.2 ========== *Fixed* @@ -1896,7 +1906,7 @@ File: README.info, Node: 022, Next: 021, Prev: 023, Up: Changelog  File: README.info, Node: 021, Next: 02, Prev: 022, Up: Changelog -5.38 0.2.1 +5.39 0.2.1 ========== *Fixed* @@ -1906,7 +1916,7 @@ File: README.info, Node: 021, Next: 02, Prev: 022, Up: Changelog  File: README.info, Node: 02, Next: 01, Prev: 021, Up: Changelog -5.39 0.2 +5.40 0.2 ======== *Added* @@ -1989,7 +1999,7 @@ File: README.info, Node: 02, Next: 01, Prev: 021, Up: Changelog  File: README.info, Node: 01, Prev: 02, Up: Changelog -5.40 0.1 +5.41 0.1 ======== First tagged release. @@ -2047,85 +2057,86 @@ GPLv3  Tag Table: Node: Top225 -Node: Contents1977 -Node: Screenshots2100 -Node: Installation2218 -Node: Quelpa2732 -Node: Helm support3260 -Node: Usage3663 -Node: Commands4061 -Node: org-ql-find4526 -Node: org-ql-open-link5434 -Node: org-ql-refile6289 -Node: org-ql-search6617 -Node: helm-org-ql8548 -Node: org-ql-view8926 -Node: org-ql-view-sidebar9456 -Node: org-ql-view-recent-items9836 -Node: org-ql-sparse-tree10332 -Node: Queries11132 -Node: Non-sexp query syntax12249 -Node: General predicates14008 -Node: Ancestor/descendant predicates20933 -Node: Date/time predicates22061 -Node: Functions / Macros25185 -Node: Agenda-like views25483 -Ref: Function org-ql-block25645 -Node: Listing / acting-on results26906 -Ref: Caching27114 -Ref: Function org-ql-select28027 -Ref: Function org-ql-query30453 -Ref: Macro org-ql (deprecated)32227 -Node: Custom predicates32542 -Ref: Macro org-ql-defpred32766 -Node: Dynamic block36207 -Node: Links38931 -Node: Tips39618 -Node: Changelog39942 -Node: 08940884 -Node: 08842011 -Node: 08743087 -Node: 08644315 -Node: 08544549 -Node: 08445205 -Node: 08345657 -Node: 08245998 -Node: 08146391 -Node: 0846812 -Node: 07449538 -Node: 07349763 -Node: 07250497 -Node: 07151418 -Node: 0752229 -Node: 06355095 -Node: 06255628 -Node: 06155935 -Node: 0656505 -Node: 05259561 -Node: 05159863 -Node: 0560288 -Node: 04961819 -Node: 04862101 -Node: 04762450 -Node: 04662859 -Node: 04563267 -Node: 04463628 -Node: 04363987 -Node: 04264190 -Node: 04164351 -Node: 0464598 -Node: 03268699 -Node: 03169102 -Node: 0369299 -Node: 02372599 -Node: 02272833 -Node: 02173113 -Node: 0273318 -Node: 0177396 -Node: Notes77497 -Node: Comparison with Org Agenda searches77659 -Node: org-sidebar78548 -Node: License78827 +Node: Contents2001 +Node: Screenshots2124 +Node: Installation2242 +Node: Quelpa2756 +Node: Helm support3284 +Node: Usage3687 +Node: Commands4085 +Node: org-ql-find4550 +Node: org-ql-open-link5458 +Node: org-ql-refile6313 +Node: org-ql-search6641 +Node: helm-org-ql8572 +Node: org-ql-view8950 +Node: org-ql-view-sidebar9480 +Node: org-ql-view-recent-items9860 +Node: org-ql-sparse-tree10356 +Node: Queries11156 +Node: Non-sexp query syntax12273 +Node: General predicates14032 +Node: Ancestor/descendant predicates20957 +Node: Date/time predicates22085 +Node: Functions / Macros25209 +Node: Agenda-like views25507 +Ref: Function org-ql-block25669 +Node: Listing / acting-on results26930 +Ref: Caching27138 +Ref: Function org-ql-select28051 +Ref: Function org-ql-query30477 +Ref: Macro org-ql (deprecated)32251 +Node: Custom predicates32566 +Ref: Macro org-ql-defpred32790 +Node: Dynamic block36231 +Node: Links38955 +Node: Tips39642 +Node: Changelog39966 +Node: 0810-pre40932 +Node: 08941047 +Node: 08842191 +Node: 08743267 +Node: 08644495 +Node: 08544729 +Node: 08445385 +Node: 08345837 +Node: 08246178 +Node: 08146571 +Node: 0846994 +Node: 07449720 +Node: 07349945 +Node: 07250679 +Node: 07151600 +Node: 0752411 +Node: 06355277 +Node: 06255810 +Node: 06156117 +Node: 0656687 +Node: 05259743 +Node: 05160045 +Node: 0560470 +Node: 04962001 +Node: 04862283 +Node: 04762632 +Node: 04663041 +Node: 04563449 +Node: 04463810 +Node: 04364169 +Node: 04264372 +Node: 04164533 +Node: 0464780 +Node: 03268881 +Node: 03169284 +Node: 0369481 +Node: 02372781 +Node: 02273015 +Node: 02173295 +Node: 0273500 +Node: 0177578 +Node: Notes77679 +Node: Comparison with Org Agenda searches77841 +Node: org-sidebar78730 +Node: License79009  End Tag Table From 0e68cc9facba048d16f4cfdba0b269b7db66fe4b Mon Sep 17 00:00:00 2001 From: Adam Porter Date: Wed, 6 Nov 2024 21:20:30 -0600 Subject: [PATCH 65/70] Fix: (link) Don't match against null groups e.g. in a source block containing Bash shell code like: [[ -z $data ]] The matched groups could be null, since it's not actually an Org link, so calling STRING-MATCH-P on them would signal an error. Reported-by: John Wiegley --- README.org | 3 +- org-ql.el | 14 +++++--- org-ql.info | 94 ++++++++++++++++++++++++++++------------------------- 3 files changed, 60 insertions(+), 51 deletions(-) diff --git a/README.org b/README.org index a0f3334..6d68ee7 100644 --- a/README.org +++ b/README.org @@ -555,7 +555,8 @@ Simple links may also be written manually in either sexp or non-sexp form, like: ** 0.8.10-pre -Nothing new yet. +*Fixes* ++ Predicate ~link~ could signal an error when searching text that is mistakenly recognized as an Org link (e.g. Bash double-bracket constructs in a source block). (Thanks to [[https://github.com/jwiegley][John Wiegley]] for reporting.) ** 0.8.9 diff --git a/org-ql.el b/org-ql.el index 3353a58..5858899 100644 --- a/org-ql.el +++ b/org-ql.el @@ -1626,11 +1626,15 @@ any link is found." (or (null description) (string-match-p description (match-string org-ql-link-description-group))))) (_ (if (and description target) - (and (string-match-p target (match-string 1)) - (string-match-p description (match-string org-ql-link-description-group))) - (or (string-match-p description-or-target (match-string 1)) - (string-match-p description-or-target - (match-string org-ql-link-description-group))))))))) + (and (and (match-string 1) + (string-match-p target (match-string 1))) + (and (match-string org-ql-link-description-group) + (string-match-p description (match-string org-ql-link-description-group)))) + (or (and (match-string 1) + (string-match-p description-or-target (match-string 1))) + (and (match-string org-ql-link-description-group) + (string-match-p description-or-target + (match-string org-ql-link-description-group)))))))))) (org-ql-defpred (rifle smart) (&rest strings) "Return non-nil if each of strings is found in the entry or its outline path. diff --git a/org-ql.info b/org-ql.info index 20971d4..028fc00 100644 --- a/org-ql.info +++ b/org-ql.info @@ -1086,7 +1086,11 @@ File: README.info, Node: 0810-pre, Next: 089, Up: Changelog 5.1 0.8.10-pre ============== -Nothing new yet. +*Fixes* + • Predicate ‘link’ could signal an error when searching text that is + mistakenly recognized as an Org link (e.g. Bash double-bracket + constructs in a source block). (Thanks to John Wiegley + (https://github.com/jwiegley) for reporting.)  File: README.info, Node: 089, Next: 088, Prev: 0810-pre, Up: Changelog @@ -2093,50 +2097,50 @@ Node: Links38955 Node: Tips39642 Node: Changelog39966 Node: 0810-pre40932 -Node: 08941047 -Node: 08842191 -Node: 08743267 -Node: 08644495 -Node: 08544729 -Node: 08445385 -Node: 08345837 -Node: 08246178 -Node: 08146571 -Node: 0846994 -Node: 07449720 -Node: 07349945 -Node: 07250679 -Node: 07151600 -Node: 0752411 -Node: 06355277 -Node: 06255810 -Node: 06156117 -Node: 0656687 -Node: 05259743 -Node: 05160045 -Node: 0560470 -Node: 04962001 -Node: 04862283 -Node: 04762632 -Node: 04663041 -Node: 04563449 -Node: 04463810 -Node: 04364169 -Node: 04264372 -Node: 04164533 -Node: 0464780 -Node: 03268881 -Node: 03169284 -Node: 0369481 -Node: 02372781 -Node: 02273015 -Node: 02173295 -Node: 0273500 -Node: 0177578 -Node: Notes77679 -Node: Comparison with Org Agenda searches77841 -Node: org-sidebar78730 -Node: License79009 +Node: 08941297 +Node: 08842441 +Node: 08743517 +Node: 08644745 +Node: 08544979 +Node: 08445635 +Node: 08346087 +Node: 08246428 +Node: 08146821 +Node: 0847244 +Node: 07449970 +Node: 07350195 +Node: 07250929 +Node: 07151850 +Node: 0752661 +Node: 06355527 +Node: 06256060 +Node: 06156367 +Node: 0656937 +Node: 05259993 +Node: 05160295 +Node: 0560720 +Node: 04962251 +Node: 04862533 +Node: 04762882 +Node: 04663291 +Node: 04563699 +Node: 04464060 +Node: 04364419 +Node: 04264622 +Node: 04164783 +Node: 0465030 +Node: 03269131 +Node: 03169534 +Node: 0369731 +Node: 02373031 +Node: 02273265 +Node: 02173545 +Node: 0273750 +Node: 0177828 +Node: Notes77929 +Node: Comparison with Org Agenda searches78091 +Node: org-sidebar78980 +Node: License79259  End Tag Table From c95bb8a3efbd634c0a1826e6618f8f39020958b5 Mon Sep 17 00:00:00 2001 From: Adam Porter Date: Mon, 16 Sep 2024 13:42:17 -0500 Subject: [PATCH 66/70] Fix: (org-ql-refile) Use base buffer See #466. --- README.org | 1 + org-ql-find.el | 26 ++++++++------- org-ql.info | 91 ++++++++++++++++++++++++++------------------------ 3 files changed, 62 insertions(+), 56 deletions(-) diff --git a/README.org b/README.org index 6d68ee7..30720ac 100644 --- a/README.org +++ b/README.org @@ -556,6 +556,7 @@ Simple links may also be written manually in either sexp or non-sexp form, like: ** 0.8.10-pre *Fixes* ++ Command ~org-ql-refile~ uses the base buffer when refiling to an indirect buffer. ([[https://github.com/alphapapa/org-ql/issues/466][#466]].) + Predicate ~link~ could signal an error when searching text that is mistakenly recognized as an Org link (e.g. Bash double-bracket constructs in a source block). (Thanks to [[https://github.com/jwiegley][John Wiegley]] for reporting.) ** 0.8.9 diff --git a/org-ql-find.el b/org-ql-find.el index f6f2b9c..b1a9137 100644 --- a/org-ql-find.el +++ b/org-ql-find.el @@ -110,18 +110,20 @@ which see (but only the files are used)." ((and (pred listp) files) files))) (list files-spec))))))) (list (org-ql-completing-read buffers-files :prompt "Refile to: ")))) - (org-refile nil nil - ;; The RFLOC argument: - (list - ;; Name - (org-with-point-at marker - (nth 4 (org-heading-components))) - ;; File - (buffer-file-name (marker-buffer marker)) - ;; nil - nil - ;; Position - marker))) + (let ((buffer (or (buffer-base-buffer (marker-buffer marker)) + (marker-buffer marker)))) + (org-refile nil nil + ;; The RFLOC argument: + (list + ;; Name + (org-with-point-at marker + (nth 4 (org-heading-components))) + ;; File + (buffer-file-name buffer) + ;; nil + nil + ;; Position + marker)))) ;;;###autoload (defun org-ql-find-in-agenda () diff --git a/org-ql.info b/org-ql.info index 028fc00..2703fc7 100644 --- a/org-ql.info +++ b/org-ql.info @@ -1087,6 +1087,9 @@ File: README.info, Node: 0810-pre, Next: 089, Up: Changelog ============== *Fixes* + • Command ‘org-ql-refile’ uses the base buffer when refiling to an + indirect buffer. (#466 + (https://github.com/alphapapa/org-ql/issues/466).) • Predicate ‘link’ could signal an error when searching text that is mistakenly recognized as an Org link (e.g. Bash double-bracket constructs in a source block). (Thanks to John Wiegley @@ -2097,50 +2100,50 @@ Node: Links38955 Node: Tips39642 Node: Changelog39966 Node: 0810-pre40932 -Node: 08941297 -Node: 08842441 -Node: 08743517 -Node: 08644745 -Node: 08544979 -Node: 08445635 -Node: 08346087 -Node: 08246428 -Node: 08146821 -Node: 0847244 -Node: 07449970 -Node: 07350195 -Node: 07250929 -Node: 07151850 -Node: 0752661 -Node: 06355527 -Node: 06256060 -Node: 06156367 -Node: 0656937 -Node: 05259993 -Node: 05160295 -Node: 0560720 -Node: 04962251 -Node: 04862533 -Node: 04762882 -Node: 04663291 -Node: 04563699 -Node: 04464060 -Node: 04364419 -Node: 04264622 -Node: 04164783 -Node: 0465030 -Node: 03269131 -Node: 03169534 -Node: 0369731 -Node: 02373031 -Node: 02273265 -Node: 02173545 -Node: 0273750 -Node: 0177828 -Node: Notes77929 -Node: Comparison with Org Agenda searches78091 -Node: org-sidebar78980 -Node: License79259 +Node: 08941458 +Node: 08842602 +Node: 08743678 +Node: 08644906 +Node: 08545140 +Node: 08445796 +Node: 08346248 +Node: 08246589 +Node: 08146982 +Node: 0847405 +Node: 07450131 +Node: 07350356 +Node: 07251090 +Node: 07152011 +Node: 0752822 +Node: 06355688 +Node: 06256221 +Node: 06156528 +Node: 0657098 +Node: 05260154 +Node: 05160456 +Node: 0560881 +Node: 04962412 +Node: 04862694 +Node: 04763043 +Node: 04663452 +Node: 04563860 +Node: 04464221 +Node: 04364580 +Node: 04264783 +Node: 04164944 +Node: 0465191 +Node: 03269292 +Node: 03169695 +Node: 0369892 +Node: 02373192 +Node: 02273426 +Node: 02173706 +Node: 0273911 +Node: 0177989 +Node: Notes78090 +Node: Comparison with Org Agenda searches78252 +Node: org-sidebar79141 +Node: License79420  End Tag Table From 9c53c1bddfcbda3475ffd8810f012be6de07d963 Mon Sep 17 00:00:00 2001 From: Adam Porter Date: Wed, 6 Nov 2024 21:43:13 -0600 Subject: [PATCH 67/70] Release: v0.8.10 --- README.org | 2 +- org-ql.el | 2 +- org-ql.info | 172 ++++++++++++++++++++++++++-------------------------- 3 files changed, 88 insertions(+), 88 deletions(-) diff --git a/README.org b/README.org index 30720ac..a9ba6f6 100644 --- a/README.org +++ b/README.org @@ -553,7 +553,7 @@ Simple links may also be written manually in either sexp or non-sexp form, like: /Note:/ Breaking changes may be made before version 1.0, but in the event of major changes, attempts at backward compatibility will be made with obsolescence declarations, translation of arguments, etc. Users who need stability guarantees before 1.0 may choose to use tagged stable releases. -** 0.8.10-pre +** 0.8.10 *Fixes* + Command ~org-ql-refile~ uses the base buffer when refiling to an indirect buffer. ([[https://github.com/alphapapa/org-ql/issues/466][#466]].) diff --git a/org-ql.el b/org-ql.el index 5858899..78ae0a1 100644 --- a/org-ql.el +++ b/org-ql.el @@ -4,7 +4,7 @@ ;; Author: Adam Porter ;; Url: https://github.com/alphapapa/org-ql -;; Version: 0.8.10-pre +;; Version: 0.8.10 ;; Package-Requires: ((emacs "27.1") (compat "29.1") (dash "2.18.1") (f "0.17.2") (map "2.1") (org "9.0") (org-super-agenda "1.2") (ov "1.0.6") (peg "1.0.1") (s "1.12.0") (transient "0.1") (ts "0.2-pre")) ;; Keywords: hypermedia, outlines, Org, agenda diff --git a/org-ql.info b/org-ql.info index 2703fc7..eb66655 100644 --- a/org-ql.info +++ b/org-ql.info @@ -72,7 +72,7 @@ Functions / Macros Changelog -* 0.8.10-pre: 0810-pre. +* 0.8.10: 0810. * 0.8.9: 089. * 0.8.8: 088. * 0.8.7: 087. @@ -1038,7 +1038,7 @@ releases. * Menu: -* 0.8.10-pre: 0810-pre. +* 0.8.10: 0810. * 0.8.9: 089. * 0.8.8: 088. * 0.8.7: 087. @@ -1081,10 +1081,10 @@ releases. * 0.1: 01.  -File: README.info, Node: 0810-pre, Next: 089, Up: Changelog +File: README.info, Node: 0810, Next: 089, Up: Changelog -5.1 0.8.10-pre -============== +5.1 0.8.10 +========== *Fixes* • Command ‘org-ql-refile’ uses the base buffer when refiling to an @@ -1096,7 +1096,7 @@ File: README.info, Node: 0810-pre, Next: 089, Up: Changelog (https://github.com/jwiegley) for reporting.)  -File: README.info, Node: 089, Next: 088, Prev: 0810-pre, Up: Changelog +File: README.info, Node: 089, Next: 088, Prev: 0810, Up: Changelog 5.2 0.8.9 ========= @@ -2064,86 +2064,86 @@ GPLv3  Tag Table: Node: Top225 -Node: Contents2001 -Node: Screenshots2124 -Node: Installation2242 -Node: Quelpa2756 -Node: Helm support3284 -Node: Usage3687 -Node: Commands4085 -Node: org-ql-find4550 -Node: org-ql-open-link5458 -Node: org-ql-refile6313 -Node: org-ql-search6641 -Node: helm-org-ql8572 -Node: org-ql-view8950 -Node: org-ql-view-sidebar9480 -Node: org-ql-view-recent-items9860 -Node: org-ql-sparse-tree10356 -Node: Queries11156 -Node: Non-sexp query syntax12273 -Node: General predicates14032 -Node: Ancestor/descendant predicates20957 -Node: Date/time predicates22085 -Node: Functions / Macros25209 -Node: Agenda-like views25507 -Ref: Function org-ql-block25669 -Node: Listing / acting-on results26930 -Ref: Caching27138 -Ref: Function org-ql-select28051 -Ref: Function org-ql-query30477 -Ref: Macro org-ql (deprecated)32251 -Node: Custom predicates32566 -Ref: Macro org-ql-defpred32790 -Node: Dynamic block36231 -Node: Links38955 -Node: Tips39642 -Node: Changelog39966 -Node: 0810-pre40932 -Node: 08941458 -Node: 08842602 -Node: 08743678 -Node: 08644906 -Node: 08545140 -Node: 08445796 -Node: 08346248 -Node: 08246589 -Node: 08146982 -Node: 0847405 -Node: 07450131 -Node: 07350356 -Node: 07251090 -Node: 07152011 -Node: 0752822 -Node: 06355688 -Node: 06256221 -Node: 06156528 -Node: 0657098 -Node: 05260154 -Node: 05160456 -Node: 0560881 -Node: 04962412 -Node: 04862694 -Node: 04763043 -Node: 04663452 -Node: 04563860 -Node: 04464221 -Node: 04364580 -Node: 04264783 -Node: 04164944 -Node: 0465191 -Node: 03269292 -Node: 03169695 -Node: 0369892 -Node: 02373192 -Node: 02273426 -Node: 02173706 -Node: 0273911 -Node: 0177989 -Node: Notes78090 -Node: Comparison with Org Agenda searches78252 -Node: org-sidebar79141 -Node: License79420 +Node: Contents1993 +Node: Screenshots2116 +Node: Installation2234 +Node: Quelpa2748 +Node: Helm support3276 +Node: Usage3679 +Node: Commands4077 +Node: org-ql-find4542 +Node: org-ql-open-link5450 +Node: org-ql-refile6305 +Node: org-ql-search6633 +Node: helm-org-ql8564 +Node: org-ql-view8942 +Node: org-ql-view-sidebar9472 +Node: org-ql-view-recent-items9852 +Node: org-ql-sparse-tree10348 +Node: Queries11148 +Node: Non-sexp query syntax12265 +Node: General predicates14024 +Node: Ancestor/descendant predicates20949 +Node: Date/time predicates22077 +Node: Functions / Macros25201 +Node: Agenda-like views25499 +Ref: Function org-ql-block25661 +Node: Listing / acting-on results26922 +Ref: Caching27130 +Ref: Function org-ql-select28043 +Ref: Function org-ql-query30469 +Ref: Macro org-ql (deprecated)32243 +Node: Custom predicates32558 +Ref: Macro org-ql-defpred32782 +Node: Dynamic block36223 +Node: Links38947 +Node: Tips39634 +Node: Changelog39958 +Node: 081040916 +Node: 08941430 +Node: 08842570 +Node: 08743646 +Node: 08644874 +Node: 08545108 +Node: 08445764 +Node: 08346216 +Node: 08246557 +Node: 08146950 +Node: 0847373 +Node: 07450099 +Node: 07350324 +Node: 07251058 +Node: 07151979 +Node: 0752790 +Node: 06355656 +Node: 06256189 +Node: 06156496 +Node: 0657066 +Node: 05260122 +Node: 05160424 +Node: 0560849 +Node: 04962380 +Node: 04862662 +Node: 04763011 +Node: 04663420 +Node: 04563828 +Node: 04464189 +Node: 04364548 +Node: 04264751 +Node: 04164912 +Node: 0465159 +Node: 03269260 +Node: 03169663 +Node: 0369860 +Node: 02373160 +Node: 02273394 +Node: 02173674 +Node: 0273879 +Node: 0177957 +Node: Notes78058 +Node: Comparison with Org Agenda searches78220 +Node: org-sidebar79109 +Node: License79388  End Tag Table From 98c62ab0a6c084ae4132110e24d9fe1ace91d363 Mon Sep 17 00:00:00 2001 From: Adam Porter Date: Mon, 25 Nov 2024 17:49:54 -0600 Subject: [PATCH 68/70] Docs: Fix some predicate arguments Reported-by: Trevoke --- README.org | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/README.org b/README.org index 93139ab..457dedd 100644 --- a/README.org +++ b/README.org @@ -233,7 +233,7 @@ Note that the =effort=, =level=, and =priority= predicates do not support compar Arguments are listed next to predicate names, where applicable. + =blocked= :: Return non-nil if current heading is blocked. Calls ~org-entry-blocked-p~, which see. -+ =category (&optional categories)= :: Return non-nil if current heading is in one or more of ~CATEGORIES~ (a list of strings). ++ =category (&rest categories)= :: Return non-nil if current heading is in one or more of ~CATEGORIES~ (a list of strings). + =done= :: Return non-nil if entry's ~TODO~ keyword is in ~org-done-keywords~. + =effort (&optional effort-or-comparator effort)= :: Return non-nil if current heading's effort property matches arguments. The following forms are accepted: ~(effort DURATION)~: Matches if effort is ~DURATION~. ~(effort DURATION DURATION)~: Matches if effort is between DURATIONs, inclusive. ~(effort COMPARATOR DURATION)~: Matches if effort compares to ~DURATION~ with ~COMPARATOR~. ~COMPARATOR~ may be ~<~, ~<=~, ~>~, or ~>=~. ~DURATION~ should be an Org effort string, like =5= or =0:05=. + =habit= :: Return non-nil if entry is a habit. @@ -256,16 +256,16 @@ Arguments are listed next to predicate names, where applicable. - Aliases: ~smart~. - *Note:* By default, this is the default predicate used for plain-string query tokens (i.e. given without a specified predicate). This can be customized with the option ~org-ql-default-predicate~. + ~src (&key lang regexps)~ :: Return non-nil if current entry contains an Org Babel source block. If ~LANG~ is non-nil, match blocks of that language. If ~REGEXPS~ is non-nil, require that block's contents match all regexps. Matching is done case-insensitively. -+ =tags (&optional tags)= :: Return non-nil if current heading has one or more of ~TAGS~ (a list of strings). Tests both inherited and local tags. -+ =tags-inherited (&optional tags)= :: Return non-nil if current heading's inherited tags include one or more of ~TAGS~ (a list of strings). If ~TAGS~ is nil, return non-nil if heading has any inherited tags. ++ =tags (&rest tags)= :: Return non-nil if current heading has one or more of ~TAGS~ (a list of strings). Tests both inherited and local tags. ++ =tags-inherited (&rest tags)= :: Return non-nil if current heading's inherited tags include one or more of ~TAGS~ (a list of strings). If ~TAGS~ is nil, return non-nil if heading has any inherited tags. - Aliases: ~inherited-tags~, ~tags-i~, ~itags~. -+ =tags-local (&optional tags)= :: Return non-nil if current heading's local tags include one or more of ~TAGS~ (a list of strings). If ~TAGS~ is nil, return non-nil if heading has any local tags. ++ =tags-local (&rest tags)= :: Return non-nil if current heading's local tags include one or more of ~TAGS~ (a list of strings). If ~TAGS~ is nil, return non-nil if heading has any local tags. - Aliases: ~local-tags~, ~tags-l~, ~ltags~. -+ =tags-all (tags)= :: Return non-nil if current heading includes all of ~TAGS~. Tests both inherited and local tags. ++ =tags-all (&rest tags)= :: Return non-nil if current heading includes all of ~TAGS~. Tests both inherited and local tags. - Aliases: ~tags&~. + =tags-regexp (&rest regexps)= :: Return non-nil if current heading has tags matching one or more of ~REGEXPS~. Tests both inherited and local tags. - Aliases: ~tags*~. -+ =todo (&optional keywords)= :: Return non-nil if current heading is a ~TODO~ item. With ~KEYWORDS~, return non-nil if its keyword is one of ~KEYWORDS~ (a list of strings). When called without arguments, only matches non-done tasks (i.e. does not match keywords in ~org-done-keywords~). ++ =todo (&rest keywords)= :: Return non-nil if current heading is a ~TODO~ item. With ~KEYWORDS~, return non-nil if its keyword is one of ~KEYWORDS~ (a list of strings). When called without arguments, only matches non-done tasks (i.e. does not match keywords in ~org-done-keywords~). *** Ancestor/descendant predicates From 9946299beccccf0675ed0bc2c87fdf0650d76614 Mon Sep 17 00:00:00 2001 From: Musa Al-hassy Date: Sun, 20 Apr 2025 07:50:43 -0400 Subject: [PATCH 69/70] =?UTF-8?q?Docs:=20Remove=20grammatical=20typo=20fro?= =?UTF-8?q?m=20=E2=80=9Corg-ql-search-block=E2=80=9D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- org-ql-search.el | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/org-ql-search.el b/org-ql-search.el index 9c0aa86..dc7c130 100644 --- a/org-ql-search.el +++ b/org-ql-search.el @@ -235,7 +235,7 @@ Like other agenda block commands, it searches files returned by function `org-agenda-files'. Inserts a newline after the block. If `org-ql-block-header' is non-nil, it is used as the header -string for the block, otherwise a the header is formed +string for the block, otherwise the header is formed automatically from the query." (let (narrow-p old-beg old-end) (when-let* ((from (pcase org-agenda-restrict From ed23480e4b141b53a6c2503d786b8dd7ba22f3e0 Mon Sep 17 00:00:00 2001 From: Jiri Jakes Date: Mon, 17 Aug 2026 19:55:50 +0800 Subject: [PATCH 70/70] Apply #459 --- org-ql-search.el | 41 ++++++++++++++++++++++++++++------------- 1 file changed, 28 insertions(+), 13 deletions(-) diff --git a/org-ql-search.el b/org-ql-search.el index dc7c130..6fe0e55 100644 --- a/org-ql-search.el +++ b/org-ql-search.el @@ -225,11 +225,16 @@ necessary." (org-ql-view--display :buffer buffer :header header :strings strings)))) ;;;###autoload -(defun org-ql-search-block (query) - "Insert items for QUERY into current buffer. -QUERY should be an `org-ql' query form. Intended to be used as a -user-defined function in `org-agenda-custom-commands'. QUERY -corresponds to the `match' item in the custom command form. +(defun org-ql-search-block (args) + "Insert items for ARGS into current buffer. +Intended to be used as a user-defined function in +`org-agenda-custom-commands'. ARGS corresponds to the `match' +item in the custom command form. It should be a list of +arguments which may be applied to `org-ql-select', which see, but +not including its BUFFERS-FILES argument (which is supplied +through the Agenda). An additional `:header' keyword argument +may be supplied as a string, like that supplied to +`org-ql-view--display'. Like other agenda block commands, it searches files returned by function `org-agenda-files'. Inserts a newline after the block. @@ -237,7 +242,8 @@ function `org-agenda-files'. Inserts a newline after the block. If `org-ql-block-header' is non-nil, it is used as the header string for the block, otherwise the header is formed automatically from the query." - (let (narrow-p old-beg old-end) + (pcase-let ((`(,query . ,(map :header :sort)) args) + (narrow-p) (old-beg) (old-end)) (when-let* ((from (pcase org-agenda-restrict ('nil (org-agenda-files nil 'ifmode)) (_ (prog1 org-agenda-restrict @@ -248,7 +254,7 @@ automatically from the query." (narrow-to-region org-agenda-restrict-begin org-agenda-restrict-end)))))) (items (org-ql-select from query :action 'element-with-markers - :narrow narrow-p))) + :narrow narrow-p :sort sort))) (when narrow-p ;; Restore buffer's previous restrictions. (with-current-buffer from @@ -258,16 +264,25 @@ automatically from the query." ;; FIXME: `org-agenda--insert-overriding-header' is from an Org version newer than ;; I'm using. Should probably declare it as a minimum Org version after upgrading. ;; (org-agenda--insert-overriding-header (or org-ql-block-header (org-ql-agenda--header-line-format from query))) - (insert (org-add-props (or org-ql-block-header (org-ql-view--header-line-format - :buffers-files from :query query)) + ;; FIXME: Should we really use `org-ql-block-header' AND `header', or just one of them? + (insert (org-add-props (or org-ql-block-header header + (org-ql-view--header-line-format + :buffers-files from :query query)) nil 'face 'org-agenda-structure) "\n") ;; Calling `org-agenda-finalize' should be unnecessary, because in a "series" agenda, ;; `org-agenda-multi' is bound non-nil, in which case `org-agenda-finalize' does nothing. ;; But we do call `org-agenda-finalize-entries', which allows `org-super-agenda' to work. - (->> items - (-map #'org-ql-view--format-element) - org-agenda-finalize-entries - insert) + ;; However, `org-agenda-finalize-entries' sorts entries with `org-entries-lessp', which + ;; overrides the sorting `org-ql' has already done, so we rebind `org-entries-lessp' to + ;; prevent it from affecting sort order. (Ideally we would let `org-entries-lessp' + ;; handle sorting, but that's not possible, because we can't add the `type' text property + ;; it uses to sort entries, because the design of org-ql and org-agenda is fundamentally + ;; different. So we have to do the sorting ourselves.) + (cl-letf (((symbol-function 'org-entries-lessp) #'ignore)) + (->> items + (-map #'org-ql-view--format-element) + org-agenda-finalize-entries + insert)) (insert "\n")))) ;;;###autoload