From mboxrd@z Thu Jan 1 00:00:00 1970 From: Michael Baum <maabaum@gmail.com> Subject: Capture template -- Global replacement of prompt string in buffer? Date: Fri, 2 Nov 2012 14:13:34 -0400 Message-ID: <CA+G3xFh9SSHLaHn_A_BTFxswfaq=OyOY3hnaXagQK1TC=uABSA@mail.gmail.com> Mime-Version: 1.0 Content-Type: multipart/alternative; boundary=f46d0444e86910bcb704cd871855 Return-path: <emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org> Received: from eggs.gnu.org ([208.118.235.92]:44276) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from <maabaum@gmail.com>) 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 <maabaum@gmail.com>) 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 <maabaum@gmail.com>) 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 <emacs-orgmode@gnu.org>; Fri, 02 Nov 2012 11:13:35 -0700 (PDT) List-Id: "General discussions about Org-mode." <emacs-orgmode.gnu.org> List-Unsubscribe: <https://lists.gnu.org/mailman/options/emacs-orgmode>, <mailto:emacs-orgmode-request@gnu.org?subject=unsubscribe> List-Archive: <http://lists.gnu.org/archive/html/emacs-orgmode> List-Post: <mailto:emacs-orgmode@gnu.org> List-Help: <mailto:emacs-orgmode-request@gnu.org?subject=help> List-Subscribe: <https://lists.gnu.org/mailman/listinfo/emacs-orgmode>, <mailto:emacs-orgmode-request@gnu.org?subject=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 <maabaum@gmail.com> 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?<br> <br>I want to do something like this:<br>-----------8<------------------= --------------<br>("p" "phone log" entry (file+datetree= org-phone-log)<br>"* %^{Organization} - %^{First Name} %^{Last Name}<= br> :PROPERTIES:<br>:FIRST_NAME: {First Name}<br>:LAST_NAME: {Last Name}<br>:OR= G: {Organization}<br>:END:<br><br>usw.<br>-----------8<-----------------= ---------------<br><br>where the value entered in response to {First Name} = gets globally substituted in two or more places in the template.<br> <br>Can this be done?<br><br>tnx,<br>maab<br><br>-- <br>=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<br>Michael Baum <<a href=3D"mailto:maabaum@gmail.com">ma= abaum@gmail.com</a>><br><br>You should never have your best trousers on = when you go out<br> =A0to fight for freedom and truth. - Ibsen<br> --f46d0444e86910bcb704cd871855--