Re: [O] capture templates and ^{prompt}
Hello, Jean-Christophe Helarywrites: > Sorry to send this question again: > >> Are there cases where %\1 ... %\N would be used *outside* of a string >>in a template? I don't think so. Regards, -- Nicolas Goaziou
Re: [O] capture templates and ^{prompt}
Sorry to send this question again: > Are there cases where %\1 ... %\N would be used *outside* of a string in a > template? Jean-Christophe > On Jun 30, 2017, at 20:04, Jean-Christophe Helary >wrote: > >> >> On Jun 30, 2017, at 18:47, Nicolas Goaziou wrote: >> >> Jean-Christophe Helary writes: >> >>> * TODO %^{prompt} [/]\n** TODO %\1 %^{prompt} %^t\n >>> >>> gives >>> >>> * TODO stuff [/] >>> >>> ** TODO %^A stuff >>> >>> Why is that ? >> >> In a string, backslash needs to be escaped: %\\1 > > That's certainly something to add to the documentation: > > %\1 ... %\N Insert the text entered at the Nth %^{prompt}, where N is a > number, starting from 1. > > Are there cases where %\1 ... %\N would be used *outside* of a string in a > template? > > Jean-Christophe
Re: [O] capture templates and ^{prompt}
> On Jun 30, 2017, at 18:47, Nicolas Goaziouwrote: > > Jean-Christophe Helary writes: > >> * TODO %^{prompt} [/]\n** TODO %\1 %^{prompt} %^t\n >> >> gives >> >> * TODO stuff [/] >> >> ** TODO %^A stuff >> >> Why is that ? > > In a string, backslash needs to be escaped: %\\1 That's certainly something to add to the documentation: %\1 ... %\N Insert the text entered at the Nth %^{prompt}, where N is a number, starting from 1. Are there cases where %\1 ... %\N would be used *outside* of a string in a template? Jean-Christophe
Re: [O] capture templates and ^{prompt}
Jean-Christophe Helarywrites: > * TODO %^{prompt} [/]\n** TODO %\1 %^{prompt} %^t\n > > gives > > * TODO stuff [/] > > ** TODO %^A stuff > > Why is that ? In a string, backslash needs to be escaped: %\\1 Regards,
Re: [O] capture templates and ^{prompt}
* TODO %^{prompt} [/]\n** TODO %\1 %^{prompt} %^t\n gives * TODO stuff [/] ** TODO %^A stuff Why is that ? Jean-Christophe > On Jun 30, 2017, at 18:21, Jean-Christophe Helary >wrote: > > Ooops, yes, that was totally under my nose :) > Thank you very much. > > Jean-Christophe > >> On Jun 30, 2017, at 18:18, numbch...@gmail.com wrote: >> >> Check out the docstring of variable `org-capture-templates`. >> There is a doc like this: >> ``` >> %\1 ... %\N Insert the text entered at the nth %^{prompt}, where N >> is a number, starting from 1.
Re: [O] capture templates and ^{prompt}
Ooops, yes, that was totally under my nose :) Thank you very much. Jean-Christophe > On Jun 30, 2017, at 18:18, numbch...@gmail.com wrote: > > Check out the docstring of variable `org-capture-templates`. > There is a doc like this: > ``` > %\1 ... %\N Insert the text entered at the nth %^{prompt}, where N > is a number, starting from 1.
Re: [O] capture templates and ^{prompt}
Check out the docstring of variable `org-capture-templates`. There is a doc like this: ``` %\1 ... %\N Insert the text entered at the nth %^{prompt}, where N is a number, starting from 1. ``` Maybe this is what you want? [stardiviner] GPG key ID: 47C32433 IRC(freeenode): stardiviner Twitter: @numbchild Key fingerprint = 9BAA 92BC CDDD B9EF 3B36 CB99 B8C4 B8E5 47C3 2433 Blog: http://stardiviner.github.io/ On Fri, Jun 30, 2017 at 5:14 PM, Jean-Christophe Helary < jean.christophe.hel...@gmail.com> wrote: > I'm looking for a way to use the string acquired by prompt in a second > location in the template, like: > > * TODO %^{prompt} [/] :sometag:\n** TODO (value of ^{prompt} comes here) > :someothertag:\n > > What's the best way to get that "value of ^{prompt}" ? > > Jean-Christophe >