Fix: (org-ql-completing-read) Format links before display

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.
This commit is contained in:
Adam Porter 2023-05-05 17:23:50 -05:00
parent 1d98c7d07c
commit 2c098540ca
3 changed files with 124 additions and 121 deletions

View file

@ -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).