all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* [BUG] org-capture: %\N template expansion
@ 2024-05-23  1:06 Bruno Cardoso
  2024-05-23 11:13 ` Ihor Radchenko
  0 siblings, 1 reply; 6+ messages in thread
From: Bruno Cardoso @ 2024-05-23  1:06 UTC (permalink / raw)
  To: emacs-orgmode


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.


^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2024-06-06 15:23 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-05-23  1:06 [BUG] org-capture: %\N template expansion Bruno Cardoso
2024-05-23 11:13 ` 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

Code repositories for project(s) associated with this external index

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

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.