From b6704c28144693fa60f8f95a5b2dfdfa535e507d Mon Sep 17 00:00:00 2001 From: Adam Porter Date: Thu, 29 Aug 2024 14:19:10 -0500 Subject: [PATCH 1/7] 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 2/7] 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 3/7] 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 4/7] 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 5/7] 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 6/7] 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 7/7] 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