From mboxrd@z Thu Jan 1 00:00:00 1970 From: Toby Cubitt Subject: Re: [PATCH] Allow % escapes to capture templates, expanded to text entered in 'th prompt Date: Tue, 24 Apr 2012 15:37:19 +0200 Message-ID: <20120424133719.GA12770@c3po> References: <8762cp70oe.fsf@gnu.org> Reply-To: Toby Cubitt Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Return-path: Received: from eggs.gnu.org ([208.118.235.92]:55549) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SMfwF-0004uA-LX for emacs-orgmode@gnu.org; Tue, 24 Apr 2012 09:38:01 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1SMfwA-0001zM-2n for emacs-orgmode@gnu.org; Tue, 24 Apr 2012 09:37:51 -0400 Received: from starfish.geekisp.com ([216.168.135.166]:14259) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SMfw9-0001z9-TW for emacs-orgmode@gnu.org; Tue, 24 Apr 2012 09:37:46 -0400 Content-Disposition: inline In-Reply-To: <8762cp70oe.fsf@gnu.org> 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 On Tue, Apr 24, 2012 at 02:51:29PM +0200, Bastien wrote: > Toby Cubitt writes: > > > On Tue, Apr 24, 2012 at 11:57:02AM +0200, Bastien wrote: > >> I've pushed a change to this new feature: > >> http://orgmode.org/w/?p=org-mode.git;a=commit;h=1666b9 > >> > >> Using %n is not good, because it will match many escaped > >> strings that you don't want to match. Using %\n looks > >> good to me as it resonates with \1 in replace-regexp. > >> > >> Toby, let me know if you agree with this change. > > > > I'm fine with it. But I don't understand, what other escapes will it > > match? None of the other % escapes documented in org-capture-templates > > start with a digit, they all start with a letter or punctuation. > > It is not the escapes from the capture template itself, but at the time > the capture buffer is prepared, links go to `org-make-link-string' which > calls `org-link-escape' which might in turn insert "%20" strings. Ah, I get it now. Your %\n syntax looks to be a good choice. I'll pull your changes and update my org-capture-template setting. Thanks! Toby -- Dr T. S. Cubitt Mathematics and Quantum Information group Department of Mathematics Complutense University Madrid, Spain email: tsc25@cantab.net web: www.dr-qubit.org