Commit 64ab43445494
Changed files (1)
dots
config
emacs
dots/config/emacs/init.el
@@ -1969,6 +1969,17 @@ Works with any org link type. Creates a new tab, then opens the link."
(dolist (tag tags)
(org-toggle-tag (substring tag 1) (if (string-prefix-p "+" tag) 'on 'off))))))
+ (defun vde/org-todo-subtree (state)
+ "Set TODO entries in the current subtree to STATE.
+By default, only changes entries with an active TODO keyword,
+skipping plain headings and already-done items.
+With prefix argument (C-u), force ALL entries to STATE regardless
+of their current state."
+ (interactive
+ (list (completing-read "State: " org-todo-keywords-1 nil t)))
+ (let ((match (if current-prefix-arg nil "/!")))
+ (org-map-entries (lambda () (org-todo state)) match 'tree)))
+
(use-package org-appear
:hook (org-mode . org-appear-mode))