Skip to content

Commit

Permalink
Fix: (org-ql-completing-read) Format links before display
Browse files Browse the repository at this point in the history
Also use org-entry-get to get the heading, which should avoid issues
with different Org versions having different optional arguments to
org-get-heading.
  • Loading branch information
alphapapa committed May 5, 2023
1 parent 1d98c7d commit 2c09854
Show file tree
Hide file tree
Showing 3 changed files with 124 additions and 121 deletions.
1 change: 1 addition & 0 deletions README.org
Original file line number Diff line number Diff line change
Expand Up @@ -547,6 +547,7 @@ Simple links may also be written manually in either sexp or non-sexp form, like:

*Fixes*
+ Function ~org-ql-completing-read~ is more compatible with default Emacs completion. (See [[https://github.com/alphapapa/org-ql/issues/338][#338]]. Thanks to [[https://github.com/arozbiz][arozbiz]] for reporting.)
+ In ~org-ql-completing-read~, format links for display, and use ~org-entry-get~ internally rather than ~org-get-heading~.

** 0.7

Expand Down
2 changes: 1 addition & 1 deletion org-ql-completing-read.el
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,7 @@ single predicate)."
;; without properties, so we have to use `org-get-heading', which added additional
;; optional arguments in a certain Org version, so in those versions, it will
;; return priority cookies and comment strings.
(let ((heading (org-get-heading t t)))
(let ((heading (org-link-display-format (org-entry-get (point) "ITEM"))))
(when (gethash heading table)
;; Disambiguate heading (even adding the path isn't enough, because that could
;; also be duplicated).
Expand Down
242 changes: 122 additions & 120 deletions org-ql.info
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
This is README.info, produced by makeinfo version 5.2 from README.texi.
This is README.info, produced by makeinfo version 6.7 from README.texi.

INFO-DIR-SECTION Emacs
START-INFO-DIR-ENTRY
Expand Down Expand Up @@ -71,33 +71,33 @@ Functions / Macros

Changelog

* 0.7.1-pre: 071-pre.
* 0.7: 07.
* 0.6.3: 063.
* 0.6.2: 062.
* 0.6.1: 061.
* 0.6: 06.
* 0.5.2: 052.
* 0.5.1: 051.
* 0.5: 05.
* 0.4.9: 049.
* 0.4.8: 048.
* 0.4.7: 047.
* 0.4.6: 046.
* 0.4.5: 045.
* 0.4.4: 044.
* 0.4.3: 043.
* 0.4.2: 042.
* 0.4.1: 041.
* 0.4: 04.
* 0.3.2: 032.
* 0.3.1: 031.
* 0.3: 03.
* 0.2.3: 023.
* 0.2.2: 022.
* 0.2.1: 021.
* 0.2: 02.
* 0.1: 01.
* 0.7.1-pre: 071-pre.
* 0.7: 07.
* 0.6.3: 063.
* 0.6.2: 062.
* 0.6.1: 061.
* 0.6: 06.
* 0.5.2: 052.
* 0.5.1: 051.
* 0.5: 05.
* 0.4.9: 049.
* 0.4.8: 048.
* 0.4.7: 047.
* 0.4.6: 046.
* 0.4.5: 045.
* 0.4.4: 044.
* 0.4.3: 043.
* 0.4.2: 042.
* 0.4.1: 041.
* 0.4: 04.
* 0.3.2: 032.
* 0.3.1: 031.
* 0.3: 03.
* 0.2.3: 023.
* 0.2.2: 022.
* 0.2.1: 021.
* 0.2: 02.
* 0.1: 01.

Notes

Expand Down Expand Up @@ -991,33 +991,33 @@ releases.

* Menu:

* 0.7.1-pre: 071-pre.
* 0.7: 07.
* 0.6.3: 063.
* 0.6.2: 062.
* 0.6.1: 061.
* 0.6: 06.
* 0.5.2: 052.
* 0.5.1: 051.
* 0.5: 05.
* 0.4.9: 049.
* 0.4.8: 048.
* 0.4.7: 047.
* 0.4.6: 046.
* 0.4.5: 045.
* 0.4.4: 044.
* 0.4.3: 043.
* 0.4.2: 042.
* 0.4.1: 041.
* 0.4: 04.
* 0.3.2: 032.
* 0.3.1: 031.
* 0.3: 03.
* 0.2.3: 023.
* 0.2.2: 022.
* 0.2.1: 021.
* 0.2: 02.
* 0.1: 01.
* 0.7.1-pre: 071-pre.
* 0.7: 07.
* 0.6.3: 063.
* 0.6.2: 062.
* 0.6.1: 061.
* 0.6: 06.
* 0.5.2: 052.
* 0.5.1: 051.
* 0.5: 05.
* 0.4.9: 049.
* 0.4.8: 048.
* 0.4.7: 047.
* 0.4.6: 046.
* 0.4.5: 045.
* 0.4.4: 044.
* 0.4.3: 043.
* 0.4.2: 042.
* 0.4.1: 041.
* 0.4: 04.
* 0.3.2: 032.
* 0.3.1: 031.
* 0.3: 03.
* 0.2.3: 023.
* 0.2.2: 022.
* 0.2.1: 021.
* 0.2: 02.
* 0.1: 01.


File: README.info, Node: 071-pre, Next: 07, Up: Changelog
Expand All @@ -1030,6 +1030,8 @@ File: README.info, Node: 071-pre, Next: 07, Up: Changelog
Emacs completion. (See #338
(https://github.com/alphapapa/org-ql/issues/338). Thanks to
arozbiz (https://github.com/arozbiz) for reporting.)
• In ‘org-ql-completing-read’, format links for display, and use
‘org-entry-get’ internally rather than ‘org-get-heading’.


File: README.info, Node: 07, Next: 063, Prev: 071-pre, Up: Changelog
Expand Down Expand Up @@ -1717,71 +1719,71 @@ GPLv3

Tag Table:
Node: Top225
Node: Contents1812
Node: Screenshots1935
Node: Installation2053
Node: Quelpa2567
Node: Helm support3095
Node: Usage3498
Node: Commands3896
Node: org-ql-find4340
Node: org-ql-refile4806
Node: org-ql-search5129
Node: helm-org-ql6825
Node: org-ql-view7203
Node: org-ql-view-sidebar7733
Node: org-ql-view-recent-items8113
Node: org-ql-sparse-tree8609
Node: Queries9409
Node: Non-sexp query syntax10526
Node: General predicates12285
Node: Ancestor/descendant predicates19272
Node: Date/time predicates20400
Node: Functions / Macros23524
Node: Agenda-like views23822
Ref: Function org-ql-block’23984
Node: Listing / acting-on results25245
Ref: Caching25453
Ref: Function org-ql-select’26366
Ref: Function org-ql-query’28792
Ref: Macro org-ql (deprecated)30566
Node: Custom predicates30881
Ref: Macro org-ql-defpred’31105
Node: Dynamic block34546
Node: Links37270
Node: Tips37957
Node: Changelog38281
Node: 071-pre39079
Node: 0739416
Node: 06342344
Node: 06242875
Node: 06143180
Node: 0643748
Node: 05246802
Node: 05147102
Node: 0547525
Node: 04949054
Node: 04849336
Node: 04749685
Node: 04650094
Node: 04550502
Node: 04450863
Node: 04351222
Node: 04251425
Node: 04151586
Node: 0451833
Node: 03255934
Node: 03156337
Node: 0356534
Node: 02359834
Node: 02260068
Node: 02160348
Node: 0260553
Node: 0164631
Node: Notes64732
Node: Comparison with Org Agenda searches64894
Node: org-sidebar65783
Node: License66062
Node: Contents1785
Node: Screenshots1908
Node: Installation2026
Node: Quelpa2540
Node: Helm support3068
Node: Usage3471
Node: Commands3869
Node: org-ql-find4313
Node: org-ql-refile4779
Node: org-ql-search5102
Node: helm-org-ql6798
Node: org-ql-view7176
Node: org-ql-view-sidebar7706
Node: org-ql-view-recent-items8086
Node: org-ql-sparse-tree8582
Node: Queries9382
Node: Non-sexp query syntax10499
Node: General predicates12258
Node: Ancestor/descendant predicates19245
Node: Date/time predicates20373
Node: Functions / Macros23497
Node: Agenda-like views23795
Ref: Function org-ql-block23957
Node: Listing / acting-on results25218
Ref: Caching25426
Ref: Function org-ql-select26339
Ref: Function org-ql-query28765
Ref: Macro org-ql (deprecated)30539
Node: Custom predicates30854
Ref: Macro org-ql-defpred31078
Node: Dynamic block34519
Node: Links37243
Node: Tips37930
Node: Changelog38254
Node: 071-pre39025
Node: 0739507
Node: 06342435
Node: 06242966
Node: 06143271
Node: 0643839
Node: 05246893
Node: 05147193
Node: 0547616
Node: 04949145
Node: 04849427
Node: 04749776
Node: 04650185
Node: 04550593
Node: 04450954
Node: 04351313
Node: 04251516
Node: 04151677
Node: 0451924
Node: 03256025
Node: 03156428
Node: 0356625
Node: 02359925
Node: 02260159
Node: 02160439
Node: 0260644
Node: 0164722
Node: Notes64823
Node: Comparison with Org Agenda searches64985
Node: org-sidebar65874
Node: License66153

End Tag Table

Expand Down

0 comments on commit 2c09854

Please sign in to comment.