From ce1681b5970065d5c4f62b2a24b22f370cbbe4d5 Mon Sep 17 00:00:00 2001 From: Nicolas Goaziou Date: Sat, 16 Mar 2019 18:05:50 +0100 Subject: [PATCH] Fix `org-offer-links-in-entry' * lisp/org.el (org-offer-links-in-entry): Fix match groups. Reported-by: Bernt Hansen --- lisp/org.el | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lisp/org.el b/lisp/org.el index e588927fb..4b7830b1f 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*"))