diff --git a/README.org b/README.org index c6e4daa2..61fe3bdb 100644 --- a/README.org +++ b/README.org @@ -526,6 +526,11 @@ Simple links may also be written manually in either sexp or non-sexp form, like: Nothing new yet. +** 0.6.2 + +*Fixed* ++ ~link~ predicate when used in an ~or~'ed query. ([[https://github.com/alphapapa/org-ql/issues/279][#279]]. Thanks to [[https://github.com/telenieko][Marc Fargas]] for reporting.) + ** 0.6.1 *Fixed* diff --git a/org-ql.el b/org-ql.el index ffed5609..0e6965b6 100644 --- a/org-ql.el +++ b/org-ql.el @@ -1461,7 +1461,8 @@ any link is found." (setf description (regexp-quote description))) (when target (setf target (regexp-quote target)))) - (when (re-search-forward org-ql-link-regexp (org-entry-end-position) t) + (when (save-excursion + (re-search-forward org-ql-link-regexp (org-entry-end-position) t)) (pcase description-or-target ('nil (and (or (null target) (string-match-p target (match-string 1)))