Skip to content

Commit 115500c

Browse files
committed
Fix: (link) Save excursion around regexp search
Fixes #279. Thanks to Marc Fargas (@telenieko) for reporting. Released as 0.6.2.
1 parent f666fe1 commit 115500c

File tree

3 files changed

+272
-252
lines changed

3 files changed

+272
-252
lines changed

README.org

+5
Original file line numberDiff line numberDiff line change
@@ -522,6 +522,11 @@ Simple links may also be written manually in either sexp or non-sexp form, like:
522522

523523
/Note:/ Breaking changes may be made before version 1.0, but in the event of major changes, attempts at backward compatibility will be made with obsolescence declarations, translation of arguments, etc. Users who need stability guarantees before 1.0 may choose to use tagged stable releases.
524524

525+
** 0.6.2
526+
527+
*Fixed*
528+
+ ~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.)
529+
525530
** 0.6.1
526531

527532
*Fixed*

org-ql.el

+3-2
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
;; Author: Adam Porter <[email protected]>
44
;; Url: https://github.com/alphapapa/org-ql
5-
;; Version: 0.6.1
5+
;; Version: 0.6.2
66
;; Package-Requires: ((emacs "26.1") (dash "2.18.1") (f "0.17.2") (map "2.1") (org "9.0") (org-super-agenda "1.2") (ov "1.0.6") (peg "1.0") (s "1.12.0") (transient "0.1") (ts "0.2-pre"))
77
;; Keywords: hypermedia, outlines, Org, agenda
88

@@ -1461,7 +1461,8 @@ any link is found."
14611461
(setf description (regexp-quote description)))
14621462
(when target
14631463
(setf target (regexp-quote target))))
1464-
(when (re-search-forward org-ql-link-regexp (org-entry-end-position) t)
1464+
(when (save-excursion
1465+
(re-search-forward org-ql-link-regexp (org-entry-end-position) t))
14651466
(pcase description-or-target
14661467
('nil (and (or (null target)
14671468
(string-match-p target (match-string 1)))

0 commit comments

Comments
 (0)