Browse Source

Handle notifications with percent characters

`message' accepts a printf format string, and that can go wrong if you
want to show a string, but the string contains a percent character!
Carsten Dominik 15 years ago
parent
commit
471c244866
2 changed files with 4 additions and 1 deletions
  1. 3 0
      lisp/ChangeLog
  2. 1 1
      lisp/org-clock.el

+ 3 - 0
lisp/ChangeLog

@@ -1,5 +1,8 @@
 2009-11-06  Carsten Dominik  <carsten.dominik@gmail.com>
 
+	* org-clock.el (org-show-notification): Handle messages that
+	contain a percent character.
+
 	* org-remember.el (org-remember-apply-template): Turn of partial
 	completion.
 

+ 1 - 1
lisp/org-clock.el

@@ -491,7 +491,7 @@ use libnotify if available, or fall back on a message."
 			"notify-send" notification))
 	;; Maybe the handler will send a message, so only use message as
 	;; a fall back option
-	(t (message notification))))
+	(t (message "%s" notification))))
 
 (defun org-clock-play-sound ()
   "Play sound as configured by `org-clock-sound'.