GNU bug report logs -
#30489
26.0.91; [PATCH] Data associated with json-readtable-error not a list
Previous Next
Reported by: "Basil L. Contovounesios" <contovob <at> tcd.ie>
Date: Fri, 16 Feb 2018 17:31:02 UTC
Severity: normal
Tags: fixed, patch
Found in version 26.0.91
Fixed in version 26.1
Done: Noam Postavsky <npostavs <at> gmail.com>
Bug is archived. No further changes may be made.
To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 30489 in the body.
You can then email your comments to 30489 AT debbugs.gnu.org in the normal way.
Toggle the display of automated, internal messages from the tracker.
Report forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#30489
; Package
emacs
.
(Fri, 16 Feb 2018 17:31:02 GMT)
Full text and
rfc822 format available.
Acknowledgement sent
to
"Basil L. Contovounesios" <contovob <at> tcd.ie>
:
New bug report received and forwarded. Copy sent to
bug-gnu-emacs <at> gnu.org
.
(Fri, 16 Feb 2018 17:31:02 GMT)
Full text and
rfc822 format available.
Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):
[0001-lisp-json.el-json-readtable-dispatch-Fix-error-data.patch (text/x-diff, attachment)]
[Message part 2 (text/plain, inline)]
When signalling json-readtable-error, the macro json-readtable-dispatch
passes the unrecognised character as error data verbatim, rather than as
a list. Attached is a patch which fixes this.
Thanks,
--
Basil
In GNU Emacs 26.0.91 (build 3, x86_64-pc-linux-gnu, X toolkit, Xaw3d scroll bars)
of 2018-02-16 built on thunk
Repository revision: edc06adf96f4aa9d8b707181015acfe61d396edb
Windowing system distributor 'The X.Org Foundation', version 11.0.11906000
System Description: Debian GNU/Linux testing (buster)
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#30489
; Package
emacs
.
(Fri, 16 Mar 2018 02:40:01 GMT)
Full text and
rfc822 format available.
Message #8 received at 30489 <at> debbugs.gnu.org (full text, mbox):
"Basil L. Contovounesios" <contovob <at> tcd.ie> writes:
> - `(cond ,@res (t (signal 'json-readtable-error ,char)))))
> + `(cond ,@res (t (signal 'json-readtable-error ,(list char))))))
> When signalling json-readtable-error, the macro json-readtable-dispatch
> passes the unrecognised character as error data verbatim, rather than as
> a list. Attached is a patch which fixes this.
Should this be applied to emacs-26? It seems to fix a regression
relative to Emacs 25 (where this error just had `nil' as the data) and
the patch looks safe enough.
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#30489
; Package
emacs
.
(Fri, 16 Mar 2018 03:38:02 GMT)
Full text and
rfc822 format available.
Message #11 received at 30489 <at> debbugs.gnu.org (full text, mbox):
> From: Noam Postavsky <npostavs <at> gmail.com>
> Date: Thu, 15 Mar 2018 22:39:18 -0400
> Cc: 30489 <at> debbugs.gnu.org
>
> "Basil L. Contovounesios" <contovob <at> tcd.ie> writes:
>
> > - `(cond ,@res (t (signal 'json-readtable-error ,char)))))
> > + `(cond ,@res (t (signal 'json-readtable-error ,(list char))))))
>
> > When signalling json-readtable-error, the macro json-readtable-dispatch
> > passes the unrecognised character as error data verbatim, rather than as
> > a list. Attached is a patch which fixes this.
>
> Should this be applied to emacs-26? It seems to fix a regression
> relative to Emacs 25 (where this error just had `nil' as the data) and
> the patch looks safe enough.
What change(s) introduced the regression?
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#30489
; Package
emacs
.
(Fri, 16 Mar 2018 09:53:02 GMT)
Full text and
rfc822 format available.
Message #14 received at 30489 <at> debbugs.gnu.org (full text, mbox):
Eli Zaretskii <eliz <at> gnu.org> writes:
>> From: Noam Postavsky <npostavs <at> gmail.com>
>> Date: Thu, 15 Mar 2018 22:39:18 -0400
>> Cc: 30489 <at> debbugs.gnu.org
>>
>> "Basil L. Contovounesios" <contovob <at> tcd.ie> writes:
>>
>> > - `(cond ,@res (t (signal 'json-readtable-error ,char)))))
>> > + `(cond ,@res (t (signal 'json-readtable-error ,(list char))))))
>>
>> > When signalling json-readtable-error, the macro json-readtable-dispatch
>> > passes the unrecognised character as error data verbatim, rather than as
>> > a list. Attached is a patch which fixes this.
>>
>> Should this be applied to emacs-26? It seems to fix a regression
>> relative to Emacs 25 (where this error just had `nil' as the data) and
>> the patch looks safe enough.
>
> What change(s) introduced the regression?
[1: 9314e6c56e]: 2017-09-04 03:40:30 -0400
Embed JSON readtable into json-read
https://git.savannah.gnu.org/cgit/emacs.git/commit/?id=9314e6c56e248a5060a6c125e2088c4fbffe123b
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#30489
; Package
emacs
.
(Fri, 16 Mar 2018 14:08:01 GMT)
Full text and
rfc822 format available.
Message #17 received at 30489 <at> debbugs.gnu.org (full text, mbox):
> From: Noam Postavsky <npostavs <at> gmail.com>
> Cc: contovob <at> tcd.ie, 30489 <at> debbugs.gnu.org
> Date: Fri, 16 Mar 2018 05:52:06 -0400
>
> >> > - `(cond ,@res (t (signal 'json-readtable-error ,char)))))
> >> > + `(cond ,@res (t (signal 'json-readtable-error ,(list char))))))
> >>
> >> > When signalling json-readtable-error, the macro json-readtable-dispatch
> >> > passes the unrecognised character as error data verbatim, rather than as
> >> > a list. Attached is a patch which fixes this.
> >>
> >> Should this be applied to emacs-26? It seems to fix a regression
> >> relative to Emacs 25 (where this error just had `nil' as the data) and
> >> the patch looks safe enough.
> >
> > What change(s) introduced the regression?
>
> [1: 9314e6c56e]: 2017-09-04 03:40:30 -0400
> Embed JSON readtable into json-read
> https://git.savannah.gnu.org/cgit/emacs.git/commit/?id=9314e6c56e248a5060a6c125e2088c4fbffe123b
Thanks, then the patch in question is OK for the release branch.
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#30489
; Package
emacs
.
(Fri, 16 Mar 2018 23:48:02 GMT)
Full text and
rfc822 format available.
Message #20 received at 30489 <at> debbugs.gnu.org (full text, mbox):
"Basil L. Contovounesios" <contovob <at> tcd.ie> writes:
> @@ -685,7 +685,7 @@ json-readtable-dispatch
> (push (list c 'json-read-number) table))
> (pcase-dolist (`(,c . ,rest) table)
> (push `((eq ,char ,c) (,@rest)) res))
> - `(cond ,@res (t (signal 'json-readtable-error ,char)))))
> + `(cond ,@res (t (signal 'json-readtable-error ,(list char))))))
Actually, shouldn't this be (list ,char)?
Otherwise, I get this warning when compiling:
In end of data:
../../lisp/json.el:766:1:Warning: the function ‘char’ is not known to be
defined.
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#30489
; Package
emacs
.
(Sun, 18 Mar 2018 00:15:02 GMT)
Full text and
rfc822 format available.
Message #23 received at 30489 <at> debbugs.gnu.org (full text, mbox):
[0001-Pass-json-readtable-error-data-as-a-list-bug-30489.patch (text/x-diff, attachment)]
[Message part 2 (text/plain, inline)]
Noam Postavsky <npostavs <at> gmail.com> writes:
> "Basil L. Contovounesios" <contovob <at> tcd.ie> writes:
>
>> @@ -685,7 +685,7 @@ json-readtable-dispatch
>> (push (list c 'json-read-number) table))
>> (pcase-dolist (`(,c . ,rest) table)
>> (push `((eq ,char ,c) (,@rest)) res))
>> - `(cond ,@res (t (signal 'json-readtable-error ,char)))))
>> + `(cond ,@res (t (signal 'json-readtable-error ,(list char))))))
>
> Actually, shouldn't this be (list ,char)?
>
> Otherwise, I get this warning when compiling:
>
> In end of data:
> ../../lisp/json.el:766:1:Warning: the function ‘char’ is not known to be
> defined.
Right you are; thanks for catching this embarrassing macro mistake.
I attach an updated patch including your fix and the bug number.
Thanks again,
--
Basil
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#30489
; Package
emacs
.
(Sun, 18 Mar 2018 00:26:02 GMT)
Full text and
rfc822 format available.
Message #26 received at 30489 <at> debbugs.gnu.org (full text, mbox):
"Basil L. Contovounesios" <contovob <at> tcd.ie> writes:
> I attach an updated patch including your fix and the bug number.
Thanks, could you add a regression test for this too, please? Since
we've already had two mistakes independently generated, it seems likely
we'll make more if this code is updated again.
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#30489
; Package
emacs
.
(Sun, 18 Mar 2018 14:24:02 GMT)
Full text and
rfc822 format available.
Message #29 received at 30489 <at> debbugs.gnu.org (full text, mbox):
[0001-Pass-json-readtable-error-data-as-a-list-bug-30489.patch (text/x-diff, attachment)]
[Message part 2 (text/plain, inline)]
Noam Postavsky <npostavs <at> gmail.com> writes:
> Thanks, could you add a regression test for this too, please? Since
> we've already had two mistakes independently generated, it seems likely
> we'll make more if this code is updated again.
Of course. Is the attached up to scratch?
Thanks,
--
Basil
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#30489
; Package
emacs
.
(Mon, 19 Mar 2018 03:15:02 GMT)
Full text and
rfc822 format available.
Message #32 received at 30489 <at> debbugs.gnu.org (full text, mbox):
tags 30489 fixed
close 30489 26.1
quit
"Basil L. Contovounesios" <contovob <at> tcd.ie> writes:
> Noam Postavsky <npostavs <at> gmail.com> writes:
>
>> Thanks, could you add a regression test for this too, please? Since
>> we've already had two mistakes independently generated, it seems likely
>> we'll make more if this code is updated again.
>
> Of course. Is the attached up to scratch?
Perfect, pushed to emacs-26.
[1: 7f27d42f0b]: 2018-03-18 23:13:29 -0400
Pass json-readtable-error data as a list (bug#30489)
https://git.savannah.gnu.org/cgit/emacs.git/commit/?id=7f27d42f0b64c74625e45909a0bf389d68eddc62
Added tag(s) fixed.
Request was from
Noam Postavsky <npostavs <at> gmail.com>
to
control <at> debbugs.gnu.org
.
(Mon, 19 Mar 2018 03:15:02 GMT)
Full text and
rfc822 format available.
bug marked as fixed in version 26.1, send any further explanations to
30489 <at> debbugs.gnu.org and "Basil L. Contovounesios" <contovob <at> tcd.ie>
Request was from
Noam Postavsky <npostavs <at> gmail.com>
to
control <at> debbugs.gnu.org
.
(Mon, 19 Mar 2018 03:15:02 GMT)
Full text and
rfc822 format available.
bug archived.
Request was from
Debbugs Internal Request <help-debbugs <at> gnu.org>
to
internal_control <at> debbugs.gnu.org
.
(Mon, 16 Apr 2018 11:24:05 GMT)
Full text and
rfc822 format available.
This bug report was last modified 7 years and 67 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.