unofficial mirror of help-gnu-emacs@gnu.org
 help / color / mirror / Atom feed
From: Jean Louis <bugs@gnu.support>
To: daniela-spit@gmx.it
Cc: Help Gnu Emacs <help-gnu-emacs@gnu.org>
Subject: Re: Org Capture Template
Date: Fri, 27 Nov 2020 08:53:18 +0300	[thread overview]
Message-ID: <X8CUTsaEO1NPxHn5@protected.rcdrun.com> (raw)
In-Reply-To: <trinity-7cba92ef-5793-44f2-94f4-e7baf03094a6-1606452411149@3c-app-mailcom-bs02>

* daniela-spit@gmx.it <daniela-spit@gmx.it> [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/rcl.org")
>          (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/rcl.org")
          (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"




  parent reply	other threads:[~2020-11-27  5:53 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-11-27  4:46 Org Capture Template daniela-spit
2020-11-27  5:34 ` Arthur Miller
2020-11-27  5:51   ` .Re: " daniela-spit
2020-11-27  6:51     ` Arthur Miller
2020-11-27  7:07       ` daniela-spit
2020-11-27  7:27         ` Arthur Miller
2020-11-27  7:48           ` daniela-spit
2020-11-27  8:55             ` Arthur Miller
2020-11-27  9:31               ` daniela-spit
2020-11-27 10:32                 ` daniela-spit
2020-11-27 16:49                   ` Arthur Miller
2020-11-27 17:46                     ` daniela-spit
2020-11-27 19:52                     ` daniela-spit
2020-11-27 21:03                       ` Arthur Miller
2020-11-27  5:53 ` Jean Louis [this message]
2020-11-27  6:13   ` daniela-spit
2020-11-27  6:30     ` Jean Louis
2020-11-27  6:43       ` daniela-spit
2020-11-27 21:03     ` Michael Heerdegen

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.gnu.org/software/emacs/

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

  git send-email \
    --in-reply-to=X8CUTsaEO1NPxHn5@protected.rcdrun.com \
    --to=bugs@gnu.support \
    --cc=daniela-spit@gmx.it \
    --cc=help-gnu-emacs@gnu.org \
    /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.
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).