From mboxrd@z Thu Jan 1 00:00:00 1970 From: Michael Brand Subject: Re: Org campture recursively expands %-escapes Date: Sat, 9 Jan 2016 16:53:08 +0100 Message-ID: References: <874mgb9gqv.fsf@nicolasgoaziou.fr> <87d1uwpm1a.fsf@nicolasgoaziou.fr> <87610o2wkz.fsf@nicolasgoaziou.fr> <87io4kn6cn.fsf@nicolasgoaziou.fr> <87oad2qw4z.fsf@nicolasgoaziou.fr> <87bn92qsmb.fsf@nicolasgoaziou.fr> <87lh837fzx.fsf@nicolasgoaziou.fr> <87h9ipqrez.fsf@nicolasgoaziou.fr> <8737u7lmhg.fsf@nicolasgoaziou.fr> Mime-Version: 1.0 Content-Type: multipart/alternative; boundary=001a11c37a3a430d3c0528e8b3a4 Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:50104) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aHvpG-0006oc-LG for emacs-orgmode@gnu.org; Sat, 09 Jan 2016 10:53:11 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1aHvpF-0004Ir-Fa for emacs-orgmode@gnu.org; Sat, 09 Jan 2016 10:53:10 -0500 Received: from mail-wm0-x230.google.com ([2a00:1450:400c:c09::230]:33714) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aHvpF-0004Ik-8b for emacs-orgmode@gnu.org; Sat, 09 Jan 2016 10:53:09 -0500 Received: by mail-wm0-x230.google.com with SMTP id f206so167607042wmf.0 for ; Sat, 09 Jan 2016 07:53:09 -0800 (PST) In-Reply-To: <8737u7lmhg.fsf@nicolasgoaziou.fr> 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: Org Mode --001a11c37a3a430d3c0528e8b3a4 Content-Type: text/plain; charset=UTF-8 Hi Nicolas On Fri, Jan 8, 2016 at 11:44 PM, Nicolas Goaziou wrote: > > Michael Brand writes: > > > I'm porting test-org-capture.el to test-org-feed.el and found this > > issue in org-feed-format-entry: Evaluation of > > > > (org-feed-format-entry '(:title "success!") "\\\\%h" nil) > > > > with Emacs 24.5 results in "Lisp error: (args-out-of-range # > *temp*> 4 5)". The Lisp error disappears when single stepping with > > Edebug but then org-feed-format-entry returns "\\%h" instead of the > > expected "\\success!". To my understanding the problem seems to be > > that org-capture-escaped-% messes up the match data which leads to an > > empty variable with the name "replacement". I wonder why this problem > > is not showing up in org-capture-fill-template too. > > Fixed, too. Thank you. Yes, thank you. On the other hand commit release_8.3.3-415-ge2fbaee breaks the ERT that I suggested in this thread or its simplification here: (progn (require 'org-feed) (equal "\"A)" (org-feed-format-entry '(:title "\"a)") "%(capitalize \"%h\")" nil))) Michael --001a11c37a3a430d3c0528e8b3a4 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable
Hi Nicolas

On Fri, Jan 8, 2016 at 11:44 PM, Nicolas= Goaziou <mail@nicolasgoaziou.= fr> wrote:
>
> Michael Brand <michael.ch.brand@gmail.com> writes:
>> > I'm porting test-org-capture.el to test-org-feed.el and fou= nd this
> > issue in org-feed-format-entry: Evaluation of
> = >
> >=C2=A0=C2=A0=C2=A0=C2=A0 (org-feed-format-entry '(:tit= le "success!") "\\\\%h" nil)
> >
> > = with Emacs 24.5 results in "Lisp error: (args-out-of-range #<buffer=
> > *temp*> 4 5)". The Lisp error disappears when single = stepping with
> > Edebug but then org-feed-format-entry returns &q= uot;\\%h" instead of the
> > expected "\\success!".= To my understanding the problem seems to be
> > that org-capture-= escaped-% messes up the match data which leads to an
> > empty var= iable with the name "replacement". I wonder why this problem
&= gt; > is not showing up in org-capture-fill-template too.
>
>= ; Fixed, too. Thank you.

Yes, thank you.

On the other hand co= mmit release_8.3.3-415-ge2fbaee breaks the ERT
that I suggested in this = thread or its simplification here:

=C2=A0 (progn
=C2=A0=C2=A0=C2= =A0 (require 'org-feed)
=C2=A0=C2=A0=C2=A0 (equal "\"A)&qu= ot; (org-feed-format-entry
=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 '(:titl= e "\"a)") "%(capitalize \"%h\")" nil)))<= br>
Michael
--001a11c37a3a430d3c0528e8b3a4--