From: Nicolas Goaziou <mail@nicolasgoaziou.fr>
To: Karl Eichwalder <ke@gnu.franken.de>
Cc: emacs-orgmode@gnu.org
Subject: Re: 9.1.3.2 Template expansion: documentation issue
Date: Sun, 22 Jan 2017 14:56:32 +0100 [thread overview]
Message-ID: <874m0rb3lb.fsf@nicolasgoaziou.fr> (raw)
In-Reply-To: <54129f99a63355eb324a3191e4001d1d@mail-n.franken.de> (Karl Eichwalder's message of "Mon, 16 Jan 2017 19:20:11 +0100")
Hello,
Karl Eichwalder <ke@gnu.franken.de> writes:
> In 9.1.3.2 Template expansion, you say:
>
> %\n Insert the text entered at the nth %^{PROMPT}, where
> ‘n’ is
>
> but in my 25.1.1, you must use "%\\n".
No, you mustn't. The placeholder really is "%\n", but Elisp require
backslash characters to be escaped in strings. So, when you write your
template as a string, you use "%\\n" because it is the only way to have
"%\n".
> Maybe, it is also worth noting that
>
> %^{PROP}p Prompt the user for a value for property PROP.
>
> will get inserted at the end of a list of properties, but white-space
> will stay
> in place:
>
> :PROP_A: a
> %^{PROP}p
> :PROP_Z: z
>
> ==>
>
> :PROP_A: a
>
> :PROP_Z: z
> :PROP: foo
>
> To avoid white-space issues and an unexpected sorting order, you must
> write (and you lose the preset values):
>
> :PROPERTIES:%^{PROP_A}p%^{PROP}p%^{PROP_Z}p
You are mis-using %^{prop}p. Granted, `org-capture-templates' docstring
is not particularly clear on this point.
Unlike other placeholders %^{prop}p can be used anywhere in the
template, since it delegates its job to `org-entry-put'. As
a consequence, you shouldn't put it where you expect the property to be
inserted.
Besides, there is no order in properties drawers, so there is no
guarantee that `org-entry-put' will preserve yours.
Would you want to suggest a better wording to explain this in
`org-capture-templates' docstring (and in the related part of the
manual)?
Regards,
--
Nicolas Goaziou
prev parent reply other threads:[~2017-01-22 13:56 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-01-16 18:20 9.1.3.2 Template expansion: documentation issue Karl Eichwalder
2017-01-22 13:56 ` Nicolas Goaziou [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=874m0rb3lb.fsf@nicolasgoaziou.fr \
--to=mail@nicolasgoaziou.fr \
--cc=emacs-orgmode@gnu.org \
--cc=ke@gnu.franken.de \
/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).