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.
This commit is contained in:
Daniel Borchmann 2022-02-26 10:16:13 +01:00
parent c35956c2dd
commit 9d7e88df0e
No known key found for this signature in database
GPG Key ID: 1C7071A75BB72D64
1 changed files with 1 additions and 1 deletions

View File

@ -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")