1
0
Fork 0

[oni-org] Hide the body of the task marked as done

This commit is contained in:
Tom Willemse 2022-03-15 23:09:46 -07:00
parent 62dec39756
commit 8ff956b3a2

View file

@ -466,6 +466,11 @@ also move point to the start of the heading."
(oni-org-create-chapter-heading book-name chapter-name notes-file))
(oni-org-create-chapter-section chapter-name notes-file))))
(defun oni-org-todo-maybe-hide-body ()
"Hide the current outline body if org-state is a DONE state."
(when (member org-state org-done-keywords)
(outline-hide-body)))
(setq org-todo-keywords
'((sequence "TODO(t)" "WIP" "BLOCKED(b@)" "|" "DONE(d!)")
(sequence "READ(r)" "READING(!)" "|" "FINISHED(!)" "STOPPED(@)")
@ -473,6 +478,8 @@ also move point to the start of the heading."
(sequence "LISTEN(l)" "LISTENING" "|" "DONE(d!)")
(sequence "|" "CANCELLED(c@)")))
(add-hook 'org-after-todo-state-change-hook 'oni-org-todo-maybe-hide-body)
(setf (alist-get 'file org-link-frame-setup) 'find-file)
(add-to-list 'org-modules 'org-habit)