[Top][All Lists]

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

Re: Org Capture Template

From: Jean Louis
Subject: Re: Org Capture Template
Date: Fri, 27 Nov 2020 08:53:18 +0300
User-agent: Mutt/2.0 (3d08634) (2020-11-07)

* <> [2020-11-27 07:47]:
> I am writing an Org Capture Template.  But I want to use concat
> to keep indentation.  But it is giving me "Invalid capture template".
> (setq org-capture-templates
>    '( ("t" "Todo" entry
>          (file "~/02history/")
>          (concat "* TODO %^{Heading}\n  Brief: %^{Brief}\n"
>                  "Detail: %?\n"
>                  "Entered: %T\n  Link: %a\n") ))

Probably because anything after quoted list is not evaluated.

This '((+ 2 2)) will not be evaluated to '(4)

To have `concat' evaluted you would need:

(list  (list "t" "Todo" 'entry
          '(file "~/02history/")
          (concat "* TODO %^{Heading}\n  Brief: %^{Brief}\n"
                  "Detail: %?\n"
                  "Entered: %T\n  Link: %a\n") ))

As you see I would need to quote entry and list beginning with `file'
not to get such evaluated to make concat work.

And there is also no ensurance that program using customized variable
will take it as list to be evaluated. It is better you do with with
hand by using:

"* TODO %^{Heading}\n  Brief: %^{Brief}\n"Detail: %?\nEntered: %T\nLink: %a\n"

reply via email to

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