emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Michael Baum <maabaum@gmail.com>
To: emacs-orgmode@gnu.org
Subject: Capture template -- Global replacement of prompt string in buffer?
Date: Fri, 2 Nov 2012 14:13:34 -0400	[thread overview]
Message-ID: <CA+G3xFh9SSHLaHn_A_BTFxswfaq=OyOY3hnaXagQK1TC=uABSA@mail.gmail.com> (raw)

[-- Attachment #1: Type: text/plain, Size: 1082 bytes --]

I'm not sure (because I didn't understand what was going on) if this is the
same question that Sebastian Fischmeister  asked earlier ("Custom escapes &
the evaluation order in fill-template"), but is it possible to construct a
capture template using something like the %{prompt} that replaces _all_
occurrences of the prompt string throughout the capture buffer,  rather
than just at the insertion point of the escape expression?

I want to do something like this:
-----------8<--------------------------------
("p" "phone log" entry (file+datetree org-phone-log)
"* %^{Organization} - %^{First Name} %^{Last Name}
:PROPERTIES:
:FIRST_NAME: {First Name}
:LAST_NAME: {Last Name}
:ORG: {Organization}
:END:

usw.
-----------8<--------------------------------

where the value entered in response to {First Name} gets globally
substituted in two or more places in the template.

Can this be done?

tnx,
maab

-- 
====================================
Michael Baum <maabaum@gmail.com>

You should never have your best trousers on when you go out
 to fight for freedom and truth. - Ibsen

[-- Attachment #2: Type: text/html, Size: 1274 bytes --]

             reply	other threads:[~2012-11-02 18:13 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-11-02 18:13 Michael Baum [this message]
2012-11-26  0:33 ` Capture template -- Global replacement of prompt string in buffer? Bernt Hansen

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='CA+G3xFh9SSHLaHn_A_BTFxswfaq=OyOY3hnaXagQK1TC=uABSA@mail.gmail.com' \
    --to=maabaum@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).