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: Karl Voit
Subject: Re: [O] Capture template using variable
Date: Thu, 5 May 2016 23:27:28 +0200
User-agent: slrn/pre1.0.0-18 (Linux)

* Karl Voit <address@hidden> wrote:
> Hi Kaushal!
>
> * Kaushal Modi <address@hidden> wrote:
>>
>> 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.
>
> Unfortunately, adding the comma did not make the "Invalid capture
> template" go away :-( This does not seem to be my (only) issue here...

I missed, that you replaced the single quote with a back quote. With
it, it works like charm.

Thank you for your help!

-- 
mail|git|SVN|photos|postings|SMS|phonecalls|RSS|CSV|XML to Org-mode:
       > get Memacs from https://github.com/novoid/Memacs <

https://github.com/novoid/extract_pdf_annotations_to_orgmode + more on github




reply via email to

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