Fix: (link) :regexp-p argument
See #220. Thanks to Akira Komamura (@akirak).
This commit is contained in:
parent
e05de210c7
commit
0cc4c5b549
1 changed files with 11 additions and 4 deletions
15
org-ql.el
15
org-ql.el
|
|
@ -810,19 +810,26 @@ replace the clause with a preamble."
|
||||||
;; have to use `plist-get' here for now. Maybe when we drop
|
;; have to use `plist-get' here for now. Maybe when we drop
|
||||||
;; support for Emacs <28...
|
;; support for Emacs <28...
|
||||||
(`(link ,(and description-or-target
|
(`(link ,(and description-or-target
|
||||||
(guard (not (keywordp description-or-target)))))
|
(guard (not (keywordp description-or-target))))
|
||||||
|
. ,plist)
|
||||||
(setq org-ql-preamble
|
(setq org-ql-preamble
|
||||||
(org-ql--link-regexp :description-or-target
|
(org-ql--link-regexp :description-or-target
|
||||||
(regexp-quote description-or-target)))
|
(if (plist-get plist :regexp-p)
|
||||||
|
description-or-target
|
||||||
|
(regexp-quote description-or-target))))
|
||||||
nil)
|
nil)
|
||||||
(`(link . ,plist)
|
(`(link . ,plist)
|
||||||
(setq org-ql-preamble
|
(setq org-ql-preamble
|
||||||
(org-ql--link-regexp
|
(org-ql--link-regexp
|
||||||
:description
|
:description
|
||||||
(when (plist-get plist :description)
|
(when (plist-get plist :description)
|
||||||
(regexp-quote (plist-get plist :description)))
|
(if (plist-get plist :regexp-p)
|
||||||
|
(plist-get plist :description)
|
||||||
|
(regexp-quote (plist-get plist :description))))
|
||||||
:target (when (plist-get plist :target)
|
:target (when (plist-get plist :target)
|
||||||
(regexp-quote (plist-get plist :target)))))
|
(if (plist-get plist :regexp-p)
|
||||||
|
(plist-get plist :target)
|
||||||
|
(regexp-quote (plist-get plist :target))))))
|
||||||
nil)
|
nil)
|
||||||
|
|
||||||
;; Planning lines.
|
;; Planning lines.
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue