From 2de9aaf651c493482084c882d55783b6c71570e9 Mon Sep 17 00:00:00 2001 From: Kyle Meyer Date: Fri, 7 Nov 2014 01:22:31 -0500 Subject: 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. --- lisp/init-org.el | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'lisp') 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) -- cgit v1.2.3