From mboxrd@z Thu Jan 1 00:00:00 1970 From: Kaushal Modi Subject: Re: Debugging at least 2 regressions in org-mode master breaking ox-hugo Date: Thu, 27 Feb 2020 09:13:17 -0500 Message-ID: References: Mime-Version: 1.0 Content-Type: multipart/alternative; boundary="000000000000b3ff07059f8f5436" Return-path: Received: from eggs.gnu.org ([2001:470:142:3::10]:44468) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1j7JvJ-0005jX-2q for emacs-orgmode@gnu.org; Thu, 27 Feb 2020 09:13:58 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1j7JvH-0007mE-T9 for emacs-orgmode@gnu.org; Thu, 27 Feb 2020 09:13:56 -0500 In-Reply-To: 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-mx.org@gnu.org Sender: "Emacs-orgmode" To: emacs-org list , Bastien Guerry --000000000000b3ff07059f8f5436 Content-Type: text/plain; charset="UTF-8" On Thu, Feb 27, 2020 at 9:00 AM Kaushal Modi wrote: > Failure 2: Change in parsing of org babel header arguments. > > The relevant snippet where I parse the header arguments in ox-hugo.el is > at > https://github.com/kaushalmodi/ox-hugo/blob/f8ec4aa5ad7d92f94bd8dbb814d85f980be67aea/ox-hugo.el#L2563 > > This behavior change in org-babel-parse-header-arguments is also not > documented in ORG-NEWS. I will now investigate what cause this regression. > The regression is caused by https://code.orgmode.org/bzg/org-mode/commit/6b2a7cb20b357e730de151522fe4204c96615f98 or the later commit that changes `org-babel--string-to-number'. Using this function redefinition with additional debug messages: (defun org-babel--string-to-number (string) "If STRING represents a number return its value. Otherwise return nil." (message "DBG: string: %S" string) (unless (string-match-p "\\s-" (org-trim string)) (let ((interned-string (ignore-errors (read string)))) (when (numberp interned-string) (message "DBG: interned string: %S" interned-string) interned-string)))) I get: DBG: string: "1,3-5" DBG: interned string: 1 So that ",3-5" piece of information is lost. --000000000000b3ff07059f8f5436 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
On Thu, Feb 27, 2020 at 9:00 AM Kaushal Modi <kaushal.modi@gmail.com> wrote:
Failure 2: Ch= ange in parsing of org babel header arguments.

The relevant snippet where I parse the header arguments in ox= -hugo.el is at htt= ps://github.com/kaushalmodi/ox-hugo/blob/f8ec4aa5ad7d92f94bd8dbb814d85f980b= e67aea/ox-hugo.el#L2563

This behavior change i= n org-babel-parse-header-arguments is also not documented in ORG-NEWS. I wi= ll now investigate what cause this regression.
<= /div>

The regression is caused by https://code.orgmode.org/bzg/org-mode/commit/6b2a7cb20b= 357e730de151522fe4204c96615f98 or the later commit that changes `org-ba= bel--string-to-number'.

Using this function re= definition with additional debug messages:

(defun = org-babel--string-to-number (string)
=C2=A0 "If STRING represents a= number return its value.
Otherwise return nil."
=C2=A0 (message= "DBG: string: %S" string)
=C2=A0 (unless (string-match-p &quo= t;\\s-" (org-trim string))
=C2=A0 =C2=A0 (let ((interned-string (ig= nore-errors (read string))))
=C2=A0 =C2=A0 =C2=A0 (when (numberp interne= d-string)
=C2=A0 =C2=A0 =C2=A0 =C2=A0 (message "DBG: interned strin= g: %S" interned-string)
interned-string))))

I get:

DBG: string: "1,3-5"
DBG: i= nterned string: 1

So that ",3-5" piece o= f information is lost.
--000000000000b3ff07059f8f5436--