Prevent accidental refiling to HOLD headings

Headings with inherited tag HOLD are not shown on any agenda and thus risk being overlooked.  Try to
prevent this by disallowing any heading tagged with HOLD (local or inherited) as refile target.
This commit is contained in:
Daniel Borchmann 2025-06-27 16:49:32 +02:00
parent 9354941ca1
commit 1ec3748fc4
No known key found for this signature in database
GPG Key ID: 50EA937BF472ADD1

View File

@ -472,7 +472,10 @@ Via %%(with-temp-buffer (db/org-add-link-to-current-clock) (string-trim (buffer-
(and (and
;; Exclude DONE state tasks from refile targets (from bh) ;; Exclude DONE state tasks from refile targets (from bh)
(not (member (nth 2 (org-heading-components)) (not (member (nth 2 (org-heading-components))
org-done-keywords)))) org-done-keywords))
;; Exclude HOLD items to prevent accidental refiling to such headings (they will not appear on
;; any agenda when a super-item is tagged with :HOLD:.
(not (member "HOLD" (org-get-tags (point))))))
;;; Helper Functions for Clocking ;;; Helper Functions for Clocking