From mboxrd@z Thu Jan 1 00:00:00 1970 From: Michael Brand Subject: Re: Org campture recursively expands %-escapes Date: Fri, 8 Jan 2016 21:59:38 +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> Mime-Version: 1.0 Content-Type: multipart/alternative; boundary=001a11c37a3a8cdb4d0528d8ddf2 Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:44841) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aHe8K-00053F-Mv for emacs-orgmode@gnu.org; Fri, 08 Jan 2016 15:59:41 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1aHe8J-0002pi-Np for emacs-orgmode@gnu.org; Fri, 08 Jan 2016 15:59:40 -0500 Received: from mail-wm0-x232.google.com ([2a00:1450:400c:c09::232]:37717) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aHe8J-0002pe-HC for emacs-orgmode@gnu.org; Fri, 08 Jan 2016 15:59:39 -0500 Received: by mail-wm0-x232.google.com with SMTP id f206so189357250wmf.0 for ; Fri, 08 Jan 2016 12:59:39 -0800 (PST) In-Reply-To: <87h9ipqrez.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 --001a11c37a3a8cdb4d0528d8ddf2 Content-Type: text/plain; charset=UTF-8 Hi Nicolas On Thu, Jan 7, 2016 at 5:35 PM, Nicolas Goaziou wrote: > For now, I left some code duplication. The issue is, hopefully, fixed, > however. It is, thank you! > I didn't add your ert, but if you provide a patch with > a "test-org-feed.el" file, I can add it. It would be best to split the > test into small ones, though, as it seems you're testing multiple things > at once. 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 # 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. Michael --001a11c37a3a8cdb4d0528d8ddf2 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable
Hi Nicolas

On Thu, Jan 7, 2016 at 5:35 PM, Nicolas = Goaziou <mail@nicolasgoaziou.f= r> wrote:
> For now, I left some code duplication. The issue i= s, hopefully, fixed,
> however.

It is, thank you!

> = I didn't add your ert, but if you provide a patch with
> a "= test-org-feed.el" file, I can add it. It would be best to split the> test into small ones, though, as it seems you're testing multiple= things
> at once.

I'm porting test-org-capture.el to test= -org-feed.el and found this
issue in org-feed-format-entry: Evaluation o= f

=C2=A0=C2=A0=C2=A0 (org-feed-format-entry '(:title "succe= ss!") "\\\\%h" nil)

with Emacs 24.5 results in "= Lisp error: (args-out-of-range #<buffer
*temp*> 4 5)". The Li= sp error disappears when single stepping with
Edebug but then org-feed-f= ormat-entry returns "\\%h" instead of the
expected "\\suc= cess!". To my understanding the problem seems to be
that org-captur= e-escaped-% messes up the match data which leads to an
empty variable wi= th the name "replacement". I wonder why this problem
is not sh= owing up in org-capture-fill-template too.

Michael
--001a11c37a3a8cdb4d0528d8ddf2--