[oni-org] Hide the body of the task marked as done
This commit is contained in:
parent
62dec39756
commit
8ff956b3a2
1 changed files with 7 additions and 0 deletions
|
@ -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-heading book-name chapter-name notes-file))
|
||||||
(oni-org-create-chapter-section 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
|
(setq org-todo-keywords
|
||||||
'((sequence "TODO(t)" "WIP" "BLOCKED(b@)" "|" "DONE(d!)")
|
'((sequence "TODO(t)" "WIP" "BLOCKED(b@)" "|" "DONE(d!)")
|
||||||
(sequence "READ(r)" "READING(!)" "|" "FINISHED(!)" "STOPPED(@)")
|
(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 "LISTEN(l)" "LISTENING" "|" "DONE(d!)")
|
||||||
(sequence "|" "CANCELLED(c@)")))
|
(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)
|
(setf (alist-get 'file org-link-frame-setup) 'find-file)
|
||||||
|
|
||||||
(add-to-list 'org-modules 'org-habit)
|
(add-to-list 'org-modules 'org-habit)
|
||||||
|
|
Loading…
Reference in a new issue