Browse Source

Ensure functioning of Org Clock hydra even if no task is clocked

It happens sometimes that the clock is not active, in which case hydra tried to
replace strings in `org-clock-current-task`, then a nil value.  Fixed this.
master
Daniel Borchmann 4 months ago
parent
commit
9d7e88df0e
No known key found for this signature in database
GPG Key ID: 1C7071A75BB72D64
  1. 2
      site-lisp/db-org.el

2
site-lisp/db-org.el

@ -445,7 +445,7 @@ forces clocking in of the default task."
(defhydra hydra-org-clock (:color blue)
;; Quote %, as otherwise they would be misinterpreted as format characters
"\nCurrent Task: %s(replace-regexp-in-string \"%\" \"%%\" org-clock-current-task); "
"\nCurrent Task: %s(replace-regexp-in-string \"%\" \"%%\" (or org-clock-current-task \"\")); "
("w" (db/org-clock-in-work-task) "work")
("h" (db/org-clock-in-home-task) "home")
("b" (db/org-clock-in-break-task) "break")

Loading…
Cancel
Save