summaryrefslogtreecommitdiff
path: root/lisp
diff options
context:
space:
mode:
authorKyle Meyer <kyle@kyleam.com>2014-11-07 01:22:31 -0500
committerKyle Meyer <kyle@kyleam.com>2014-11-07 01:22:31 -0500
commit2de9aaf651c493482084c882d55783b6c71570e9 (patch)
tree9e1004a99d51b332de1cde59cf0ff53489650e6e /lisp
parent6f856ffefc6ff56daf95c5a3845b735811442d9e (diff)
downloademacs.d-2de9aaf651c493482084c882d55783b6c71570e9.tar.gz
Change default-directory for Org agenda
The main motivation for this is to set org-refile-targets to the value specified in ~/notes/.dir-locals.el.
Diffstat (limited to 'lisp')
-rw-r--r--lisp/init-org.el6
1 files changed, 6 insertions, 0 deletions
diff --git a/lisp/init-org.el b/lisp/init-org.el
index a37f330..66dc1e7 100644
--- a/lisp/init-org.el
+++ b/lisp/init-org.el
@@ -277,6 +277,12 @@ be restored properly."
ad-do-it
(delete-other-windows)))
+(defun km/org-agenda-cd-and-read-dir-locals ()
+ (setq default-directory "~/notes/")
+ (hack-local-variables))
+
+(add-hook 'org-agenda-mode-hook 'km/org-agenda-cd-and-read-dir-locals)
+
(setq org-agenda-restore-windows-after-quit t
org-agenda-sticky nil)