From mboxrd@z Thu Jan 1 00:00:00 1970 From: Michael Baum Subject: Capture template -- Global replacement of prompt string in buffer? Date: Fri, 2 Nov 2012 14:13:34 -0400 Message-ID: Mime-Version: 1.0 Content-Type: multipart/alternative; boundary=f46d0444e86910bcb704cd871855 Return-path: Received: from eggs.gnu.org ([208.118.235.92]:44276) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TULkP-0003NZ-0w for emacs-orgmode@gnu.org; Fri, 02 Nov 2012 14:13:38 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1TULkN-0003rj-UY for emacs-orgmode@gnu.org; Fri, 02 Nov 2012 14:13:36 -0400 Received: from mail-ob0-f169.google.com ([209.85.214.169]:61782) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TULkN-0003rX-P0 for emacs-orgmode@gnu.org; Fri, 02 Nov 2012 14:13:35 -0400 Received: by mail-ob0-f169.google.com with SMTP id va7so4291963obc.0 for ; Fri, 02 Nov 2012 11:13:35 -0700 (PDT) List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: emacs-orgmode@gnu.org --f46d0444e86910bcb704cd871855 Content-Type: text/plain; charset=ISO-8859-1 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 You should never have your best trousers on when you go out to fight for freedom and truth. - Ibsen --f46d0444e86910bcb704cd871855 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable I'm not sure (because I didn't understand what was going on) if thi= s is the same question that Sebastian Fischmeister=A0 asked earlier ("= Custom escapes & the evaluation order in fill-template"), but is i= t possible to construct a capture template using something like the %{promp= t} that replaces _all_ occurrences of the prompt string throughout the capt= ure buffer,=A0 rather than just at the insertion point of the escape expres= sion?

I want to do something like this:
-----------8<------------------= --------------
("p" "phone log" entry (file+datetree= org-phone-log)
"* %^{Organization} - %^{First Name} %^{Last Name}<= br> :PROPERTIES:
:FIRST_NAME: {First Name}
:LAST_NAME: {Last Name}
:OR= G: {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

--
=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D
Michael Baum <ma= abaum@gmail.com>

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