Merge: v0.8.8

This commit is contained in:
Adam Porter 2024-08-29 16:38:58 -05:00
commit fcb4e3ee62
5 changed files with 173 additions and 147 deletions

View file

@ -567,6 +567,13 @@ Simple links may also be written manually in either sexp or non-sexp form, like:
Tagged v0.6.2, fixing a compilation warning.
** 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.)
+ 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
*Fixes*

View file

@ -50,12 +50,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
@ -109,11 +107,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."
@ -219,15 +219,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))))
@ -341,7 +333,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 ()
@ -373,7 +366,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
@ -387,15 +380,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)

View file

@ -878,7 +878,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)

View file

@ -1144,7 +1144,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

View file

@ -74,6 +74,7 @@ Functions / Macros
Changelog
* 0.9-pre: 09-pre.
* 0.8.8: 088.
* 0.8.7: 087.
* 0.8.6: 086.
* 0.8.5: 085.
@ -1046,6 +1047,7 @@ releases.
* Menu:
* 0.9-pre: 09-pre.
* 0.8.8: 088.
* 0.8.7: 087.
* 0.8.6: 086.
* 0.8.5: 085.
@ -1086,7 +1088,7 @@ releases.
* 0.1: 01.

File: README.info, Node: 09-pre, Next: 087, Up: Changelog
File: README.info, Node: 09-pre, Next: 088, Up: Changelog
5.1 0.9-pre
===========
@ -1118,9 +1120,31 @@ File: README.info, Node: helm-org-ql (1), Up: 09-pre
Tagged v0.6.2, fixing a compilation warning.

File: README.info, Node: 087, Next: 086, Prev: 09-pre, Up: Changelog
File: README.info, Node: 088, Next: 087, Prev: 09-pre, Up: Changelog
5.2 0.8.7
5.2 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.)
• Binding of completion-styles-alist in org-ql-completing-read.
(This fixes compatibility with Helms 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.)
• 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, Up: Changelog
5.3 0.8.7
=========
*Fixes*
@ -1148,7 +1172,7 @@ File: README.info, Node: 087, Next: 086, Prev: 09-pre, Up: Changelog

File: README.info, Node: 086, Next: 085, Prev: 087, Up: Changelog
5.3 0.8.6
5.4 0.8.6
=========
*Fixes*
@ -1158,7 +1182,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*
@ -1175,7 +1199,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*
@ -1189,7 +1213,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*
@ -1202,7 +1226,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*
@ -1216,7 +1240,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*
@ -1231,8 +1255,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*
@ -1287,7 +1311,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*
@ -1297,7 +1321,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*
@ -1315,7 +1339,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*
@ -1336,7 +1360,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*
@ -1355,7 +1379,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*
@ -1414,7 +1438,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*
@ -1430,7 +1454,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*
@ -1441,7 +1465,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*
@ -1459,7 +1483,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*
@ -1526,7 +1550,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*
@ -1537,7 +1561,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*
@ -1550,7 +1574,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*
@ -1591,7 +1615,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*
@ -1602,7 +1626,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*
@ -1614,7 +1638,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*
@ -1627,7 +1651,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*
@ -1640,7 +1664,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*
@ -1652,7 +1676,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*
@ -1664,7 +1688,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*
@ -1674,7 +1698,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*
@ -1683,7 +1707,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*
@ -1693,7 +1717,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
@ -1774,7 +1798,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*
@ -1787,7 +1811,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*
@ -1797,7 +1821,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*
@ -1865,7 +1889,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*
@ -1875,7 +1899,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*
@ -1886,7 +1910,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*
@ -1896,7 +1920,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*
@ -1979,7 +2003,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.
@ -2064,87 +2088,88 @@ GPLv3

Tag Table:
Node: Top225
Node: Contents2065
Node: Screenshots2192
Node: Installation2310
Node: Quelpa2824
Node: Helm support3352
Node: Usage3755
Node: Commands4153
Node: org-ql-find4618
Node: org-ql-open-link5526
Node: org-ql-refile6381
Node: org-ql-search6709
Node: helm-org-ql8640
Node: org-ql-view9018
Node: org-ql-view-sidebar9548
Node: org-ql-view-recent-items9928
Node: org-ql-sparse-tree10424
Node: Queries11224
Node: Non-sexp query syntax12341
Node: General predicates14100
Node: Ancestor/descendant predicates21025
Node: Date/time predicates22153
Node: Functions / Macros25277
Node: Agenda-like views25575
Ref: Function org-ql-block25737
Node: Listing / acting-on results26998
Ref: Caching27206
Ref: Function org-ql-select28119
Ref: Function org-ql-query30545
Ref: Macro org-ql (deprecated)32319
Node: Custom predicates32634
Ref: Macro org-ql-defpred32858
Node: Dynamic block36299
Node: Links39023
Node: Tips39710
Node: Changelog40034
Node: 09-pre40973
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
Node: Contents2079
Node: Screenshots2206
Node: Installation2324
Node: Quelpa2838
Node: Helm support3366
Node: Usage3769
Node: Commands4167
Node: org-ql-find4632
Node: org-ql-open-link5540
Node: org-ql-refile6395
Node: org-ql-search6723
Node: helm-org-ql8654
Node: org-ql-view9032
Node: org-ql-view-sidebar9562
Node: org-ql-view-recent-items9942
Node: org-ql-sparse-tree10438
Node: Queries11238
Node: Non-sexp query syntax12355
Node: General predicates14114
Node: Ancestor/descendant predicates21039
Node: Date/time predicates22167
Node: Functions / Macros25291
Node: Agenda-like views25589
Ref: Function org-ql-block25751
Node: Listing / acting-on results27012
Ref: Caching27220
Ref: Function org-ql-select28133
Ref: Function org-ql-query30559
Ref: Macro org-ql (deprecated)32333
Node: Custom predicates32648
Ref: Macro org-ql-defpred32872
Node: Dynamic block36313
Node: Links39037
Node: Tips39724
Node: Changelog40048
Node: 09-pre41001
Node: helm-org-ql (1)41785
Node: 08841926
Node: 08743005
Node: 08644233
Node: 08544467
Node: 08445123
Node: 08345575
Node: 08245916
Node: 08146309
Node: 0846730
Node: 07449456
Node: 07349681
Node: 07250415
Node: 07151336
Node: 0752147
Node: 06355013
Node: 06255546
Node: 06155853
Node: 0656423
Node: 05259479
Node: 05159781
Node: 0560206
Node: 04961737
Node: 04862019
Node: 04762368
Node: 04662777
Node: 04563185
Node: 04463546
Node: 04363905
Node: 04264108
Node: 04164269
Node: 0464516
Node: 03268617
Node: 03169020
Node: 0369217
Node: 02372517
Node: 02272751
Node: 02173031
Node: 0273236
Node: 0177314
Node: Development77415
Node: Copyright assignment77648
Node: Notes78238
Node: Comparison with Org Agenda searches78402
Node: org-sidebar79291
Node: License79570

End Tag Table