From mboxrd@z Thu Jan 1 00:00:00 1970 From: Bastien Subject: Re: [PATCH] Allow % escapes to capture templates, expanded to text entered in 'th prompt Date: Tue, 24 Apr 2012 14:51:29 +0200 Message-ID: <8762cp70oe.fsf@gnu.org> References: <87haw98nbl.fsf@gnu.org> <20120424110558.GA23688@c3po> Mime-Version: 1.0 Content-Type: text/plain Return-path: Received: from eggs.gnu.org ([208.118.235.92]:39476) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SMfCQ-0002PC-1E for emacs-orgmode@gnu.org; Tue, 24 Apr 2012 08:50:36 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1SMfCJ-00081t-Bp for emacs-orgmode@gnu.org; Tue, 24 Apr 2012 08:50:29 -0400 Received: from incoming2.cnam.fr ([163.173.128.34]:45705) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SMfCJ-00080u-5d for emacs-orgmode@gnu.org; Tue, 24 Apr 2012 08:50:23 -0400 In-Reply-To: <20120424110558.GA23688@c3po> (Toby Cubitt's message of "Tue, 24 Apr 2012 13:05:58 +0200") 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 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. -- Bastien