From mboxrd@z Thu Jan 1 00:00:00 1970 From: Carsten Dominik Subject: Re: Re: [Patch] Capture: %[FILE] and %(SEXP) (again) Date: Sun, 18 Jul 2010 07:40:43 +0200 Message-ID: <586D78CF-CC79-41C4-9DDB-C0F21BC11138@gmail.com> References: <87fwzi1gei.fsf@gmx.de> <87r5j2xcp1.fsf@alterecco.net> <87y6d9zwl1.fsf@gmx.de> Mime-Version: 1.0 (Apple Message framework v936) Content-Type: text/plain; charset=US-ASCII; format=flowed; delsp=yes Content-Transfer-Encoding: 7bit Return-path: Received: from [140.186.70.92] (port=54279 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1OaMcN-00066f-5Q for emacs-orgmode@gnu.org; Sun, 18 Jul 2010 01:40:52 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1OaMcL-0007o6-NE for emacs-orgmode@gnu.org; Sun, 18 Jul 2010 01:40:51 -0400 Received: from mail-ew0-f41.google.com ([209.85.215.41]:61766) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1OaMcL-0007np-IL for emacs-orgmode@gnu.org; Sun, 18 Jul 2010 01:40:49 -0400 Received: by ewy28 with SMTP id 28so1215757ewy.0 for ; Sat, 17 Jul 2010 22:40:48 -0700 (PDT) In-Reply-To: <87y6d9zwl1.fsf@gmx.de> List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: Sebastian Rose Cc: emacs-orgmode@gnu.org, Johan Friis Hi Sebastian, I have rejected both of your patches an instead changed the order of evaluation of escapes in `org-capture-fill-template'. Inserting file contents and evaluating sexp entries now happens first, so that the parser looking for other escapes also sees the stuff inserted by these escapes. Hope this fixes the issues you where having. Cheers - Carsten On Jul 17, 2010, at 10:23 PM, Sebastian Rose wrote: > Johan Friis writes: >> I have this in my org-capture-templates, and it works just fine. The >> note.org file is of course an org-mode file, with normal syntax. >> >> ("j" "Journal" entry (file "~/note/journal.org") (file "~/note/ >> template/journal.org")) >> >> I am not sure if I misunderstood what you want to do, just wanted to >> state that the above works great for me (it expands what it is >> supposed to) > > > > Ahhhh! > > This does what I expect, but it is not documented. > > Thanks Johan! > > That's why I wrote my previous mail? I simply could not figure out, > how > to achieve that and I did not know about (file "filename"). Where is > this in the docs? > > But, OK, forget it. I now know that I have to use the (file "...") > syntax. > > > So this is one of the neccessary patches: > > diff --git a/doc/org.texi b/doc/org.texi > index f1f894a..e5d0a3b 100644 > --- a/doc/org.texi > +++ b/doc/org.texi > @@ -6109,7 +6109,9 @@ file and location. > The template for creating the capture item. If you leave this > empty, an appropriate default template will be used. Otherwise this > is a > string with escape codes, which will be replaced depending on time > -and context of the capture call. See below for more details. > +and context of the capture call. The string with escapes may be > loaded > +from a template file, using the special syntax `(file > +``path-to-template'')'. See below for more details. > > @item properties > The rest of the entry is a property list of additional options. > > > > > Still, as I said in my previous mail, the way "%[FILE]" and "%(SEXP)" > work is not quite right and the docs are still incomplete. > > > Best wishes > > Sebastian > _______________________________________________ > Emacs-orgmode mailing list > Please use `Reply All' to send replies to the list. > Emacs-orgmode@gnu.org > http://lists.gnu.org/mailman/listinfo/emacs-orgmode - Carsten