emacs-orgmode
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [O] Capture template using variable


From: Kaushal Modi
Subject: Re: [O] Capture template using variable
Date: Thu, 05 May 2016 20:45:00 +0000

Try

(setq my-capture-template-next "* NEXT %?\n:PROPERTIES:\n:CREATED: %U\n:END:\n\n")

(setq org-capture-templates
      `(  ; Note the backquote here!!
        ("1" "first version with string" entry (file+headline "~/share/all/org-mode/misc.org" "shorts")
         "* NEXT %?\n:PROPERTIES:\n:CREATED: %U\n:END:\n\n" :empty-lines 1)
        ("2" "second version with variable" entry (file+headline "~/share/all/org-mode/misc.org" "shorts")
         ,my-capture-template-next :empty-lines 1) ; and comma before my-capture-..
        ))

My guess is you need to evaluate my-capture-template-next before putting it in org-capture-templates and the backquote/comma above do that.
--

--
Kaushal Modi


reply via email to

[Prev in Thread] Current Thread [Next in Thread]