emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Karl Voit <devnull@Karl-Voit.at>
To: emacs-orgmode@gnu.org
Subject: Re: Capture template using variable
Date: Thu, 5 May 2016 23:27:28 +0200	[thread overview]
Message-ID: <2016-05-05T23-26-42@devnull.Karl-Voit.at> (raw)
In-Reply-To: 2016-05-05T23-08-04@devnull.Karl-Voit.at

* Karl Voit <devnull@Karl-Voit.at> wrote:
> Hi Kaushal!
>
> * Kaushal Modi <kaushal.modi@gmail.com> 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	other threads:[~2016-05-05 21:28 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-05-05 20:36 Capture template using variable Karl Voit
2016-05-05 20:45 ` Kaushal Modi
2016-05-05 21:11   ` Karl Voit
2016-05-05 21:27     ` Karl Voit [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.orgmode.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=2016-05-05T23-26-42@devnull.Karl-Voit.at \
    --to=devnull@karl-voit.at \
    --cc=emacs-orgmode@gnu.org \
    --cc=news1142@Karl-Voit.at \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).