FIX habit tracker now ignores CANC keyword
This commit is contained in:
parent
3854989c08
commit
22526e5b58
10
etc/conf.org
10
etc/conf.org
|
@ -1814,6 +1814,16 @@ Aesthetically, I like all my keywords to have bold colors.
|
||||||
("HOLD" :foreground "violet" :weight bold)
|
("HOLD" :foreground "violet" :weight bold)
|
||||||
("CANC" :foreground "deep sky blue" :weight bold)))
|
("CANC" :foreground "deep sky blue" :weight bold)))
|
||||||
#+END_SRC
|
#+END_SRC
|
||||||
|
**** habits
|
||||||
|
Habits consider any "done" todo keyword as "complete." I have =CANC= as a done keyword, which I don't want to be displayed as "complete" in the habit tracker. Override this hardcoded behavior with advice.
|
||||||
|
#+BEGIN_SRC emacs-lisp
|
||||||
|
(defun nd/org-habit-parse-todo-advice (orig-fn &rest args)
|
||||||
|
"Advice to make the habit tracker only mark DONE habits as complete."
|
||||||
|
(let ((org-done-keywords '("DONE")))
|
||||||
|
(unwind-protect (apply orig-fn args))))
|
||||||
|
|
||||||
|
(advice-add #'org-habit-parse-todo :around #'nd/org-habit-parse-todo-advice)
|
||||||
|
#+END_SRC
|
||||||
*** links and IDs
|
*** links and IDs
|
||||||
:PROPERTIES:
|
:PROPERTIES:
|
||||||
:ID: 9131356e-b290-402e-86cf-15242082c622
|
:ID: 9131356e-b290-402e-86cf-15242082c622
|
||||||
|
|
Loading…
Reference in New Issue