In emacs.el I am using the following construct to set up an org-remember template:

(setq org-remember-templates
    '(("Todo" ?t "* TODO %^{Brief Description} %^g\n%?\nAdded: %U" "~/GTD/newgtd.org" "Tasks")

That works OK, but now I'd like to introduce parameters into this template definition. Specifically, I'd like to use a variable (or a constant) in place of "~/GTD/newgtd.org"

Let's say I have this definition earlier in the emacs.el:

(setq todo-file (concat org-directory "todo.org"))

How can I use thid variable todo-file in the setq org-remember-templates definition?

I have tried 'todo-file, "todo-file and simply todo-file in place of "~/GTD/newgtd.org" with no luck. What is the secret to reference a variable value here?


1 Answer 1


Like this:

(setq org-remember-templates
         "* TODO %^{Brief Description} %^g\n%?\nAdded: %U"
         ,todo-file "Tasks")))

It's called backquote.

  • That's working, but could you provide a reference to emacs docs please to learn this feature in depth? Thanks! Commented May 7, 2015 at 17:11

Not the answer you're looking for? Browse other questions tagged or ask your own question.