From ba9ee84a3dec7bb6c559f0e772968300fdf3c533 Mon Sep 17 00:00:00 2001 From: Laurens Miers Date: Sun, 29 Sep 2024 21:04:37 +0200 Subject: [PATCH 1/2] ORG-TODO: Mark parent task done if child tasks are done --- config.org | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/config.org b/config.org index 69ce512..d0b4439 100644 --- a/config.org +++ b/config.org @@ -894,6 +894,19 @@ Preserve indentation in SRC blocks (setq org-src-preserve-indentation t) #+END_SRC +** Org-todo + +When all children are done, automatically change the TODO parent entry to DONE. + +#+BEGIN_SRC emacs-lisp +(defun org-summary-todo (n-done n-not-done) + "Switch entry to DONE when all subentries are done, to TODO otherwise." + (let (org-log-done org-todo-log-states) ; turn off logging + (org-todo (if (= n-not-done 0) "DONE" "TODO")))) + +(add-hook 'org-after-todo-statistics-hook #'org-summary-todo) +#+END_SRC + ** Org bullets #+BEGIN_SRC emacs-lisp From 0e9ab8911744b1df84d2e240c864e2b75e402b4f Mon Sep 17 00:00:00 2001 From: Laurens Miers Date: Sun, 29 Sep 2024 21:50:21 +0200 Subject: [PATCH 2/2] ADD filetags snippet --- snippets/org-mode/filetags | 6 ++++++ 1 file changed, 6 insertions(+) create mode 100644 snippets/org-mode/filetags diff --git a/snippets/org-mode/filetags b/snippets/org-mode/filetags new file mode 100644 index 0000000..b3f283d --- /dev/null +++ b/snippets/org-mode/filetags @@ -0,0 +1,6 @@ +# -*- mode: snippet -*- +# name: Filetags +# key: ft +# -- + +#+FILETAGS: :$1: