summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNicolas Goaziou <mail@nicolasgoaziou.fr>2019-03-16 18:05:50 +0100
committerNicolas Goaziou <mail@nicolasgoaziou.fr>2019-03-16 18:05:50 +0100
commitce1681b5970065d5c4f62b2a24b22f370cbbe4d5 (patch)
treee01d2a6a0b23152c1cd70c1be7041d7f5fb6827f
parenta70ab164f4dcfddb7a8c403d7b06c5e62b6bc830 (diff)
downloadorg-mode-ce1681b5970065d5c4f62b2a24b22f370cbbe4d5.tar.gz
Fix `org-offer-links-in-entry'
* lisp/org.el (org-offer-links-in-entry): Fix match groups. Reported-by: Bernt Hansen <bernt@norang.ca> <http://lists.gnu.org/r/emacs-orgmode/2019-03/msg00192.html>
-rw-r--r--lisp/org.el4
1 files changed, 2 insertions, 2 deletions
diff --git a/lisp/org.el b/lisp/org.el
index e588927..4b7830b 100644
--- a/lisp/org.el
+++ b/lisp/org.el
@@ -8730,9 +8730,9 @@ there is one, return it."
((not (string-match org-link-bracket-re l))
(princ (format "[%c] %s\n" (cl-incf cnt)
(org-unbracket-string "<" ">" l))))
- ((match-end 3)
+ ((match-end 2)
(princ (format "[%c] %s (%s)\n" (cl-incf cnt)
- (match-string 3 l) (match-string 1 l))))
+ (match-string 2 l) (match-string 1 l))))
(t (princ (format "[%c] %s\n" (cl-incf cnt)
(match-string 1 l)))))))
(org-fit-window-to-buffer (get-buffer-window "*Select Link*"))