Erik Iverson wrote: >I tried to debug, and it looks like that variable is not getting >evaluated for some reason. I'm sure it's obvious to someone, >but is there a way around this?
>Hardcoding the path is actually problematic, since my org >files are passed around various machines using git/Dropbox, >and therefore the path is different depending on where I >am located. >Below is the simplest example I could come up with, just >create a ~/test.org file and try it out. > ;; a path to some org-files > (setq org-test-path "/tmp") > ;; a specific org-file > (setq org-test-file (concat org-test-path "/test.org")) > (setq org-capture-templates > '(("t" "Todo" entry (file+headline org-test-file "Tasks") > "* TODO %?\n %i\n %a") > ("b" "Buy" item (file+olp org-test-file "Stuff to Buy" "House") > ""))) The symbol `org-test-file' is indeed not evaluated because the entire template list is quoted. You can use backquotes (Elisp manual, 13.5) to tell Emacs to evaluate parts of the lisp: ,---- | (setq org-capture-templates | `(("t" "Todo" entry (file+headline ,org-test-file "Tasks") | "* TODO %?\n %i\n %a") | ("b" "Buy" item (file+olp ,org-test-file "Stuff to Buy" "House") | ""))) `---- The lisp starts with the backtick (`) and all expressions that are prefix by comma (,) are evaluated. HTH, -- David -- OpenPGP... 0x99ADB83B5A4478E6 Jabber.... dmj...@jabber.org Email..... dm...@ictsoc.de
pgpo0K9GJMnle.pgp
Description: PGP signature
_______________________________________________ Emacs-orgmode mailing list Please use `Reply All' to send replies to the list. Emacs-orgmode@gnu.org http://lists.gnu.org/mailman/listinfo/emacs-orgmode