Browse Source

lisp/org-agenda.el: Fix bug in `org-agenda-highlight-todo'

* lisp/org-agenda.el (org-agenda-highlight-todo): Skip formatting
the to-do keyword when `org-agenda-todo-keyword-format' is the
empty string.

TINYCHANGE
Samim Pezeshki 4 years ago
parent
commit
06c064e97c
1 changed files with 7 additions and 6 deletions
  1. 7 6
      lisp/org-agenda.el

+ 7 - 6
lisp/org-agenda.el

@@ -7063,12 +7063,13 @@ The optional argument TYPE tells the agenda type."
 	    (setq x
 		  (concat
 		   (substring x 0 (match-end 1))
-		   (format org-agenda-todo-keyword-format
-			   (match-string 2 x))
-		   ;; Remove `display' property as the icon could leak
-		   ;; on the white space.
-		   (org-add-props " " (org-plist-delete (text-properties-at 0 x)
-							'display))
+                   (unless (string-empty-p org-agenda-todo-keyword-format)
+		     (format org-agenda-todo-keyword-format
+			     (match-string 2 x))
+		     ;; Remove `display' property as the icon could leak
+		     ;; on the white space.
+		     (org-add-props " " (org-plist-delete (text-properties-at 0 x)
+			 				  'display)))
 		   (substring x (match-end 3)))))))
       x)))