Fix: (link) :regexp-p argument

See #220.  Thanks to Akira Komamura (@akirak).
This commit is contained in:
Adam Porter 2021-06-16 17:38:07 -05:00
parent e05de210c7
commit 0cc4c5b549

View file

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