Преглед изворни кода

Fix bug with message and headlines containing `%'

Report by Bernt Hansen
Carsten Dominik пре 15 година
родитељ
комит
7668306fca
3 измењених фајлова са 10 додато и 3 уклоњено
  1. 6 0
      lisp/ChangeLog
  2. 2 2
      lisp/org-agenda.el
  3. 2 1
      lisp/org.el

+ 6 - 0
lisp/ChangeLog

@@ -1,8 +1,14 @@
 2009-11-20  Carsten Dominik  <carsten.dominik@gmail.com>
 
+	* org.el (org-display-outline-path): Use a format specifier for
+	message, to avoid problems with heading containing `%'.
+
 	* org-agenda.el (org-agenda-hide-tags-regexp): New option.
 	(org-format-agenda-item): Call `org-agenda-fix-displayed-tags'.
 	(org-agenda-fix-displayed-tags): New function.
+	(org-agenda-do-context-action): Just call
+	`org-display-outline-path', without piping the result through
+	`message'.
 
 	* org-latex.el (org-export-latex-preprocess): Protect secondary
 	footnote references.

+ 2 - 2
lisp/org-agenda.el

@@ -5715,8 +5715,8 @@ When called with a prefix argument, include all archive files as well."
     (if (and org-agenda-follow-mode m)
 	(org-agenda-show))
     (if (and m org-agenda-show-outline-path)
-	(message (org-with-point-at m
-		   (org-display-outline-path t))))))
+	(org-with-point-at m
+	  (org-display-outline-path t)))))
 
 (defun org-agenda-show-priority ()
   "Show the priority of the current item.

+ 2 - 1
lisp/org.el

@@ -9082,7 +9082,8 @@ such as the file name."
 				     (org-back-to-heading t)
 				     (if (looking-at org-complex-heading-regexp)
 					 (list (match-string 4)))))))
-    (message (org-format-outline-path
+    (message "%s"
+	     (org-format-outline-path
 	      path
 	      (1- (frame-width))
 	      (and file bfn (concat (file-name-nondirectory bfn) "/"))))))