org-capture-templates: Document %^{prompt}X %-escape syntax

* lisp/org-capture.el (org-capture-templates):
* doc/org-manual.org (Template expansion): Document the supported
custom prompt syntax.

Link: https://old.reddit.com/r/orgmode/comments/1bfgzsz/format_timestamp_after_capture_by_prompt/
This commit is contained in:
Ihor Radchenko 2024-03-16 12:18:17 +03:00
parent acf6fa6209
commit 9f4064e68e
No known key found for this signature in database
GPG Key ID: 6470762A7DA11D8B
2 changed files with 10 additions and 0 deletions

View File

@ -8281,6 +8281,12 @@ given here:
Prompt the user for a value for property {{{var(PROP)}}}. You may Prompt the user for a value for property {{{var(PROP)}}}. You may
specify a default value with =%^{PROP|default}=. specify a default value with =%^{PROP|default}=.
- =%^{PROMPT}X=, X is one of g,G,t,T,u,U,C,L ::
Prompt the user as in =%^X=, but use the custom prompt string. You
may specify a default value and completions with
=%^{PROMPT|default|completion1|completion2|completion3...}X=.
- =%^{PROMPT}= :: - =%^{PROMPT}= ::
Prompt the user for a string and replace this sequence with it. You Prompt the user for a string and replace this sequence with it. You

View File

@ -371,6 +371,10 @@ be replaced with content and expanded:
%^{prompt} Prompt the user for a string and replace this sequence with it. %^{prompt} Prompt the user for a string and replace this sequence with it.
A default value and a completion table can be specified like this: A default value and a completion table can be specified like this:
%^{prompt|default|completion2|completion3|...}. %^{prompt|default|completion2|completion3|...}.
%^{prompt}X where X is one of g, G, t, T, u, U, C, or L.
Same as %^X (see above), but also supply custom
prompt/completions. Default value and completions as in
%^{prompt|default|...}X are allowed.
%? After completing the template, position cursor here. %? After completing the template, position cursor here.
%\\1 ... %\\N Insert the text entered at the nth %^{prompt}, where N %\\1 ... %\\N Insert the text entered at the nth %^{prompt}, where N
is a number, starting from 1. is a number, starting from 1.