GNU bug report logs - #37653
26.3; edbug backquoted dot is space sensitive

Previous Next

Package: emacs;

Reported by: Devon Sean McCullough <Emacs-Hacker2018 <at> jovi.net>

Date: Tue, 8 Oct 2019 01:42:02 UTC

Severity: normal

Tags: moreinfo

Found in version 26.3

Fixed in version 29.1

Done: Lars Ingebrigtsen <larsi <at> gnus.org>

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 37653 in the body.
You can then email your comments to 37653 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to bug-gnu-emacs <at> gnu.org:
bug#37653; Package emacs. (Tue, 08 Oct 2019 01:42:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to Devon Sean McCullough <Emacs-Hacker2018 <at> jovi.net>:
New bug report received and forwarded. Copy sent to bug-gnu-emacs <at> gnu.org. (Tue, 08 Oct 2019 01:42:02 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Devon Sean McCullough <Emacs-Hacker2018 <at> jovi.net>
To: bug-gnu-emacs <at> gnu.org
Subject: 26.3; edbug backquoted dot is space sensitive
Date: Tue, 8 Oct 2019 09:40:59 +0800
$ src/emacs --batch -Q --eval '(progn (message emacs-version) (insert "(defun x () `(t .,t))") (eval-defun t))'
26.3
Invalid read syntax: "."

$ src/emacs --batch -Q --eval '(progn (message emacs-version) (insert "(defun x () `(t .,t))") (eval-defun nil))'
26.3
x

Both cases should parse correctly.

		Peace
			--Devon

P.S. Two workarounds:

$ src/emacs --batch -Q --eval '(progn (message emacs-version) (insert "(defun x () `(t.,t))") (eval-defun t))'
26.3
Edebug: x

$ src/emacs --batch -Q --eval '(progn (message emacs-version) (insert "(defun x () `(t . ,t))") (eval-defun t))'
26.3
Edebug: x

In GNU Emacs 26.3 (build 1, x86_64-apple-darwin15.6.0, NS appkit-1404.47 Version 10.11.6 (Build 15G22010))
 of 2019-08-29 built on Devons-MacBook-Air.local
Windowing system distributor 'Apple', version 10.3.1404
Recent messages:
For information about GNU Emacs and the GNU system, type C-h C-a.

Configured using:
 'configure --with-gnutls=no'

Configured features:
NOTIFY ACL LIBXML2 ZLIB TOOLKIT_SCROLL_BARS NS THREADS

Important settings:
  value of $LANG: en_US.UTF-8
  locale-coding-system: utf-8-unix

Major mode: Fundamental

Minor modes in effect:
  tooltip-mode: t
  global-eldoc-mode: t
  electric-indent-mode: t
  mouse-wheel-mode: t
  tool-bar-mode: t
  menu-bar-mode: t
  file-name-shadow-mode: t
  global-font-lock-mode: t
  blink-cursor-mode: t
  auto-composition-mode: t
  auto-encryption-mode: t
  auto-compression-mode: t
  buffer-read-only: t
  line-number-mode: t
  transient-mark-mode: t

Load-path shadows:
None found.

Features:
(shadow sort mail-extr emacsbug message rmc puny seq byte-opt gv
bytecomp byte-compile cconv cl-loaddefs cl-lib dired dired-loaddefs
format-spec rfc822 mml easymenu mml-sec password-cache epa derived epg
epg-config gnus-util rmail rmail-loaddefs mm-decode mm-bodies mm-encode
mail-parse rfc2231 mailabbrev gmm-utils mailheader sendmail rfc2047
rfc2045 ietf-drums mm-util mail-prsvr mail-utils elec-pair time-date
tooltip eldoc electric uniquify ediff-hook vc-hooks lisp-float-type
mwheel term/ns-win ns-win ucs-normalize mule-util term/common-win
tool-bar dnd fontset image regexp-opt fringe tabulated-list replace
newcomment text-mode elisp-mode lisp-mode prog-mode register page
menu-bar rfn-eshadow isearch timer select scroll-bar mouse jit-lock
font-lock syntax facemenu font-core term/tty-colors frame cl-generic
cham georgian utf-8-lang misc-lang vietnamese tibetan thai tai-viet lao
korean japanese eucjp-ms cp51932 hebrew greek romanian slovak czech
european ethiopic indian cyrillic chinese composite charscript charprop
case-table epa-hook jka-cmpr-hook help simple abbrev obarray minibuffer
cl-preloaded nadvice loaddefs button faces cus-face macroexp files
text-properties overlay sha1 md5 base64 format env code-pages mule
custom widget hashtable-print-readable backquote threads kqueue cocoa ns
multi-tty make-network-process emacs)

Memory information:
((conses 16 204494 8932)
 (symbols 48 20201 2)
 (miscs 40 70 175)
 (strings 32 28953 1582)
 (string-bytes 1 772687)
 (vectors 16 35017)
 (vector-slots 8 727034 10188)
 (floats 8 48 68)
 (intervals 56 196 0)
 (buffers 992 12))





Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#37653; Package emacs. (Fri, 20 May 2022 10:53:01 GMT) Full text and rfc822 format available.

Message #8 received at 37653 <at> debbugs.gnu.org (full text, mbox):

From: Lars Ingebrigtsen <larsi <at> gnus.org>
To: Devon Sean McCullough <Emacs-Hacker2018 <at> jovi.net>
Cc: Stefan Monnier <monnier <at> iro.umontreal.ca>, 37653 <at> debbugs.gnu.org
Subject: Re: bug#37653: 26.3; edbug backquoted dot is space sensitive
Date: Fri, 20 May 2022 12:52:18 +0200
Devon Sean McCullough <Emacs-Hacker2018 <at> jovi.net> writes:

> $ src/emacs --batch -Q --eval '(progn (message emacs-version) (insert "(defun x () `(t .,t))") (eval-defun t))'
> 26.3
> Invalid read syntax: "."

(I'm going through old bug reports that unfortunately weren't resolved
at the time.)

Or different reproduction:

(defun x () `(t .,t))

M-: (edebug-read-storing-offsets (current-buffer))

at the start of the line.  I haven't tried debugging this further --
perhaps it's obvious to Stefan what the problem might be; added to the CCs.

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no




Added tag(s) moreinfo. Request was from Lars Ingebrigtsen <larsi <at> gnus.org> to control <at> debbugs.gnu.org. (Fri, 20 May 2022 10:53:02 GMT) Full text and rfc822 format available.

Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#37653; Package emacs. (Fri, 20 May 2022 12:35:02 GMT) Full text and rfc822 format available.

Message #13 received at 37653 <at> debbugs.gnu.org (full text, mbox):

From: Andreas Schwab <schwab <at> linux-m68k.org>
To: Lars Ingebrigtsen <larsi <at> gnus.org>
Cc: Juri Linkov <juri <at> jurta.org>,
 Devon Sean McCullough <Emacs-Hacker2018 <at> jovi.net>,
 Stefan Monnier <monnier <at> iro.umontreal.ca>, 37653 <at> debbugs.gnu.org
Subject: Re: bug#37653: 26.3; edbug backquoted dot is space sensitive
Date: Fri, 20 May 2022 14:34:27 +0200
On Mai 20 2022, Lars Ingebrigtsen wrote:

> Or different reproduction:
>
> (defun x () `(t .,t))
>
> M-: (edebug-read-storing-offsets (current-buffer))
>
> at the start of the line.  I haven't tried debugging this further --
> perhaps it's obvious to Stefan what the problem might be; added to the CCs.

edebug-next-token-class returns 'symbol for "." when followed by ","
which looks wrong (see commit 392cf16dd0).

-- 
Andreas Schwab, schwab <at> linux-m68k.org
GPG Key fingerprint = 7578 EB47 D4E5 4D69 2510  2552 DF73 E780 A9DA AEC1
"And now for something completely different."




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#37653; Package emacs. (Fri, 20 May 2022 13:29:02 GMT) Full text and rfc822 format available.

Message #16 received at 37653 <at> debbugs.gnu.org (full text, mbox):

From: Andreas Schwab <schwab <at> linux-m68k.org>
To: Lars Ingebrigtsen <larsi <at> gnus.org>
Cc: Juri Linkov <juri <at> jurta.org>,
 Devon Sean McCullough <Emacs-Hacker2018 <at> jovi.net>,
 Stefan Monnier <monnier <at> iro.umontreal.ca>, 37653 <at> debbugs.gnu.org
Subject: Re: bug#37653: 26.3; edbug backquoted dot is space sensitive
Date: Fri, 20 May 2022 15:28:22 +0200
On Mai 20 2022, Andreas Schwab wrote:

> On Mai 20 2022, Lars Ingebrigtsen wrote:
>
>> Or different reproduction:
>>
>> (defun x () `(t .,t))
>>
>> M-: (edebug-read-storing-offsets (current-buffer))
>>
>> at the start of the line.  I haven't tried debugging this further --
>> perhaps it's obvious to Stefan what the problem might be; added to the CCs.
>
> edebug-next-token-class returns 'symbol for "." when followed by ","
> which looks wrong (see commit 392cf16dd0).

Apparently the handling of ".," in the reader changed with the
introduction of new-style backquotes.

-- 
Andreas Schwab, schwab <at> linux-m68k.org
GPG Key fingerprint = 7578 EB47 D4E5 4D69 2510  2552 DF73 E780 A9DA AEC1
"And now for something completely different."




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#37653; Package emacs. (Sat, 21 May 2022 12:15:02 GMT) Full text and rfc822 format available.

Message #19 received at 37653 <at> debbugs.gnu.org (full text, mbox):

From: Lars Ingebrigtsen <larsi <at> gnus.org>
To: Andreas Schwab <schwab <at> linux-m68k.org>
Cc: Juri Linkov <juri <at> jurta.org>,
 Devon Sean McCullough <Emacs-Hacker2018 <at> jovi.net>,
 Stefan Monnier <monnier <at> iro.umontreal.ca>, 37653 <at> debbugs.gnu.org
Subject: Re: bug#37653: 26.3; edbug backquoted dot is space sensitive
Date: Sat, 21 May 2022 14:13:49 +0200
Andreas Schwab <schwab <at> linux-m68k.org> writes:

> Apparently the handling of ".," in the reader changed with the
> introduction of new-style backquotes.

So the code here is:

(defun edebug-next-token-class ()
[...]
  (if (and (eq (following-char) ?.)
	   (save-excursion
	     (forward-char 1)
	     (or (and (eq (aref edebug-read-syntax-table (following-char))
			  'symbol)
		      (not (= (following-char) ?\;)))
		 (memq (following-char) '(?\, ?\.)))))

So it's explicitly allowing , after . here -- but surely that's wrong?
Or are there any circumstances that reading .,<foo> leads should lead to
a valid symbol?  Juri, do you remember this?  It's from 2004.  😀

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#37653; Package emacs. (Sun, 19 Jun 2022 12:27:01 GMT) Full text and rfc822 format available.

Message #22 received at 37653 <at> debbugs.gnu.org (full text, mbox):

From: Lars Ingebrigtsen <larsi <at> gnus.org>
To: Andreas Schwab <schwab <at> linux-m68k.org>
Cc: Juri Linkov <juri <at> jurta.org>,
 Devon Sean McCullough <Emacs-Hacker2018 <at> jovi.net>,
 Stefan Monnier <monnier <at> iro.umontreal.ca>, 37653 <at> debbugs.gnu.org
Subject: Re: bug#37653: 26.3; edbug backquoted dot is space sensitive
Date: Sun, 19 Jun 2022 14:26:02 +0200
Lars Ingebrigtsen <larsi <at> gnus.org> writes:

> 		      (not (= (following-char) ?\;)))
> 		 (memq (following-char) '(?\, ?\.)))))
>
> So it's explicitly allowing , after . here -- but surely that's wrong?
> Or are there any circumstances that reading .,<foo> leads should lead to
> a valid symbol?  Juri, do you remember this?  It's from 2004.  😀

I've now made this parse like `read' does in Emacs 29.

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no




bug marked as fixed in version 29.1, send any further explanations to 37653 <at> debbugs.gnu.org and Devon Sean McCullough <Emacs-Hacker2018 <at> jovi.net> Request was from Lars Ingebrigtsen <larsi <at> gnus.org> to control <at> debbugs.gnu.org. (Sun, 19 Jun 2022 12:27:02 GMT) Full text and rfc822 format available.

Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#37653; Package emacs. (Mon, 20 Jun 2022 16:54:02 GMT) Full text and rfc822 format available.

Message #27 received at 37653 <at> debbugs.gnu.org (full text, mbox):

From: Juri Linkov <juri <at> jurta.org>
To: Lars Ingebrigtsen <larsi <at> gnus.org>
Cc: Devon Sean McCullough <Emacs-Hacker2018 <at> jovi.net>,
 Andreas Schwab <schwab <at> linux-m68k.org>,
 Stefan Monnier <monnier <at> iro.umontreal.ca>, 37653 <at> debbugs.gnu.org
Subject: Re: bug#37653: 26.3; edbug backquoted dot is space sensitive
Date: Mon, 20 Jun 2022 19:47:15 +0300
>> 		      (not (= (following-char) ?\;)))
>> 		 (memq (following-char) '(?\, ?\.)))))
>>
>> So it's explicitly allowing , after . here -- but surely that's wrong?
>> Or are there any circumstances that reading .,<foo> leads should lead to
>> a valid symbol?  Juri, do you remember this?  It's from 2004.  😀
>
> I've now made this parse like `read' does in Emacs 29.

Sorry, I don't remember. 🤷🏻‍♂️  I hope your change is right.




bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Tue, 19 Jul 2022 11:24:05 GMT) Full text and rfc822 format available.

This bug report was last modified 1 year and 280 days ago.

Previous Next


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