Browse Source

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>
Nicolas Goaziou 1 month ago
parent
commit
ce1681b597
1 changed files with 2 additions and 2 deletions
  1. 2 2
      lisp/org.el

+ 2 - 2
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*"))