From: Bruno Cardoso <cardoso.bc@gmail.com>
To: emacs-orgmode@gnu.org
Subject: [BUG] org-capture: %\N template expansion
Date: Wed, 22 May 2024 22:06:28 -0300 [thread overview]
Message-ID: <87o78xz697.fsf@gmail.com> (raw)
Hi all,
I'm having trouble expanding the '%\N' template in org-capture.
For example, with the following template:
(add-to-list 'org-capture-templates
'("t" "TEST" entry
(file+headline "~/org/test.org" "TEST")
"** TODO %?
:PROPERTIES:
:TITLE: %^{TITLE}
:AUTHOR: %^{AUTHOR}p
:END:
%\1 %\2"))
The properties are read correctly, but "%\1 %\2" expands to "%^A %^B".
Either escaping the backslashes ("%\\1 %\\2") or reading the template above from a file throws an error:
: org-capture: Capture abort: Wrong type argument: stringp, nil
Org mode version 9.7-pre (release_9.6.29-1474-g1c5492)
Best,
Bruno.
next reply other threads:[~2024-05-23 1:07 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-05-23 1:06 Bruno Cardoso [this message]
2024-05-23 11:13 ` [BUG] org-capture: %\N template expansion Ihor Radchenko
2024-05-23 12:37 ` Bruno Cardoso
2024-06-05 11:29 ` Ihor Radchenko
2024-06-05 22:58 ` Bruno Cardoso
2024-06-06 15:24 ` Ihor Radchenko
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=87o78xz697.fsf@gmail.com \
--to=cardoso.bc@gmail.com \
--cc=emacs-orgmode@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.
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).