summaryrefslogtreecommitdiff
path: root/lisp
diff options
context:
space:
mode:
authorKyle Meyer <kyle@kyleam.com>2014-05-04 18:58:27 -0400
committerKyle Meyer <kyle@kyleam.com>2014-05-04 19:01:54 -0400
commitb15ba9f8250c433b621da023f7607cbf29c25581 (patch)
tree173b0a194830037e8a031f1656edab9ef89e2107 /lisp
parent04563ae6705809702a1ed2ce860851b00da50801 (diff)
downloademacs.d-b15ba9f8250c433b621da023f7607cbf29c25581.tar.gz
Restrict org-refile-targets to current file
I don't typically refile headings from a non-agenda file to a target in an agenda file, so setting this for all Org files isn't too useful. Instead, `org-refile-targets' now set in a .dir-locals.el for the agenda files to allow refiling between different agenda files.
Diffstat (limited to 'lisp')
-rw-r--r--lisp/init-org.el11
1 files changed, 7 insertions, 4 deletions
diff --git a/lisp/init-org.el b/lisp/init-org.el
index 4c696c8..9ad29a0 100644
--- a/lisp/init-org.el
+++ b/lisp/init-org.el
@@ -208,10 +208,13 @@ be restored properly."
"Exclude DONE state from refile targets."
(not (member (nth 2 (org-heading-components)) org-done-keywords)))
-(setq org-refile-targets `((nil :maxlevel . 3)
- (,(append org-agenda-files
- org-agenda-text-search-extra-files)
- :maxlevel . 2)))
+(setq org-refile-targets '((nil :maxlevel . 2)))
+
+(add-to-list 'safe-local-variable-values
+ '(org-refile-targets
+ (nil :maxlevel . 3)
+ (org-agenda-files :maxlevel . 2)
+ (org-agenda-text-search-extra-files :maxlevel . 2)))
(setq org-refile-target-verify-function 'km/verify-refile-target)