GNU bug report logs - #62020
Lisp reader: dotted pair notation not working when initial elements are omitted

Previous Next

Package: emacs;

Reported by: Federico Tedin <federicotedin <at> gmail.com>

Date: Tue, 7 Mar 2023 01:15:02 UTC

Severity: normal

Done: Mattias Engdegård <mattiase <at> acm.org>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: help-debbugs <at> gnu.org (GNU bug Tracking System)
To: Mattias Engdegård <mattiase <at> acm.org>
Cc: tracker <at> debbugs.gnu.org
Subject: bug#62020: closed (Lisp reader: dotted pair notation not working
 when initial elements are omitted)
Date: Sun, 12 Mar 2023 17:11:02 +0000
[Message part 1 (text/plain, inline)]
Your message dated Sun, 12 Mar 2023 18:10:39 +0100
with message-id <1187451A-9DF9-49D1-A14F-8F68AB657BCD <at> acm.org>
and subject line Re: bug#62020: Lisp reader: dotted pair notation not working when initial elements are omitted
has caused the debbugs.gnu.org bug report #62020,
regarding Lisp reader: dotted pair notation not working when initial elements are omitted
to be marked as done.

(If you believe you have received this mail in error, please contact
help-debbugs <at> gnu.org.)


-- 
62020: https://debbugs.gnu.org/cgi/bugreport.cgi?bug=62020
GNU Bug Tracking System
Contact help-debbugs <at> gnu.org with problems
[Message part 2 (message/rfc822, inline)]
From: Federico Tedin <federicotedin <at> gmail.com>
To: bug-gnu-emacs <at> gnu.org
Subject: Lisp reader: dotted pair notation not working when initial elements
 are omitted
Date: Tue, 7 Mar 2023 02:14:02 +0100
According to the Elisp docs
(https://www.gnu.org/software/emacs/manual/html_node/elisp/Dotted-Pair-Notation.html),
one should be able to evaluate e.g.:
    (. 1)
to:
    1

This works correctly in Emacs 28.1 However, in the emacs-29 branch
(bd07cec) this results in:
    *** Read error ***  Invalid read syntax: "."

Since the description in the docs are the same in the emacs-29 I
assume this is a bug.
I believe this may have been caused by the changes implementing the
nonrecursive Lisp reader.
I believe the fix would be roughly:
- in read0 (lread.c), when handling c == '.', ensure we handle not
only the case where the top of the read stack is RE_list but *also*
RE_list_start.
- if the top of the stack was effectively RE_list_start, then the top
of the stack needs to be manipulated somehow so that at the end of
read0 the correct value is returned, when emptying the stack.


[Message part 3 (message/rfc822, inline)]
From: Mattias Engdegård <mattiase <at> acm.org>
To: Eli Zaretskii <eliz <at> gnu.org>
Cc: 62020-done <at> debbugs.gnu.org, Stefan Monnier <monnier <at> iro.umontreal.ca>,
 Federico Tedin <federicotedin <at> gmail.com>
Subject: Re: bug#62020: Lisp reader: dotted pair notation not working when
 initial elements are omitted
Date: Sun, 12 Mar 2023 18:10:39 +0100
11 mars 2023 kl. 13.19 skrev Eli Zaretskii <eliz <at> gnu.org>:

>>> Documentation changes are always fine for a release branch, but I'd
>>> prefer to discuss a specific patch, if you don't mind posting one.
>> 
>> Not at all. There's not much to see here -- the minimal change would just remove a paragraph:
> 
> OK, thanks.

Pushed to emacs-29.



This bug report was last modified 2 years and 71 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.