Browse Source

Fix a bug in org-link-display-format.

It would break if there was a '\' in the link description.
James TD Smith 15 years ago
parent
commit
de588512d3
2 changed files with 9 additions and 4 deletions
  1. 4 0
      lisp/ChangeLog
  2. 5 4
      lisp/org.el

+ 4 - 0
lisp/ChangeLog

@@ -72,6 +72,10 @@
 	* org-docbook.el (org-export-as-docbook): Protect targets in
 	verbatim emphasis.
 
+2009-11-07  James TD Smith  <ahktenzero@mohorovi.cc>
+
+	* org.el (org-link-display-format): Should be literal replacement.
+
 2009-11-06  Carsten Dominik  <carsten.dominik@gmail.com>
 
 	* org-clock.el (org-show-notification): Handle messages that

+ 5 - 4
lisp/org.el

@@ -17575,10 +17575,11 @@ Show the heading too, if it is currently invisible."
 if no description is present"
   (save-match-data
     (if (string-match org-bracket-link-analytic-regexp link)
-	(replace-match (or (match-string 5 link)
-			   (concat (match-string 1 link)
-				   (match-string 3 link)))
-		       nil nil link)
+	    (replace-match (if (match-end 5)
+			       (match-string 5 link)
+			     (concat (match-string 1 link)
+				     (match-string 3 link)))
+			   nil t link)
       link)))
 
 ;; Speedbar support