[Org] Exclude refiling targets with DONE states

Copied from http://doc.norang.ca/org-mode.html#Refiling
This commit is contained in:
Daniel - 2018-02-14 22:06:42 +01:00
parent 2943a7a4b9
commit c14f45d186
Signed by: dbo
GPG Key ID: 4F63DB96D45AA9C6
1 changed files with 7 additions and 0 deletions

View File

@ -710,6 +710,13 @@ _y_: ?y? year _q_: quit _L__l__c_: ?l?
(setq org-indirect-buffer-display 'current-window)
(setq org-outline-path-complete-in-steps nil)
; Exclude DONE state tasks from refile targets (from bh)
(defun db/verify-refile-target ()
"Exclude todo keywords with a done state from refile targets"
(not (member (nth 2 (org-heading-components)) org-done-keywords)))
(setq org-refile-target-verify-function 'db/verify-refile-target)
;;; Babel