GNU bug report logs - #34722
26.1; REGRESSION: `indent-pp-sexp' Wrong type argument: consp, nil

Previous Next

Package: emacs;

Reported by: Drew Adams <drew.adams <at> oracle.com>

Date: Sun, 3 Mar 2019 17:31:01 UTC

Severity: normal

Merged with 30891

Found in versions 26.0.91, 26.1

Fixed in version 26.2

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 34722 in the body.
You can then email your comments to 34722 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#34722; Package emacs. (Sun, 03 Mar 2019 17:31:01 GMT) Full text and rfc822 format available.

Acknowledgement sent to Drew Adams <drew.adams <at> oracle.com>:
New bug report received and forwarded. Copy sent to bug-gnu-emacs <at> gnu.org. (Sun, 03 Mar 2019 17:31:01 GMT) Full text and rfc822 format available.

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

From: Drew Adams <drew.adams <at> oracle.com>
To: bug-gnu-emacs <at> gnu.org
Subject: 26.1; REGRESSION: `indent-pp-sexp' Wrong type argument: consp, nil
Date: Sun, 3 Mar 2019 09:29:32 -0800 (PST)
1. emacs -Q

2. C-x C-f foo.el

3. Enter this text. Be sure to hit RET after the final right paren, so there is a newline char at the end.

(defun foo ()
  (unless t 42)))


4. Put point just before the first left paren, then use `C-M-q'.

This error is raised:

Wrong type argument: consp, nil

If you turn on `debug-on-error' this is what you get:

Debugger entered--Lisp error: (wrong-type-argument consp nil)
  lisp-indent-calc-next(#s(lisp-indent-state :stack (2 nil) :ppss (1 1 12 nil nil nil 0 nil nil (1) nil) :ppss-point 14))
  indent-sexp()
  indent-pp-sexp(nil)
  funcall-interactively(indent-pp-sexp nil)
  call-interactively(indent-pp-sexp nil nil)
  command-execute(indent-pp-sexp)

I see the same regression in Emacs 27, this build (the latest I have):

In GNU Emacs 27.0.50 (build 3, x86_64-w64-mingw32)
 of 2018-03-21 built on CIRROCUMULUS
Repository revision: e70d0c9e66d7a8609450b2889869d16aeb0363b5
Windowing system distributor 'Microsoft Corp.', version 10.0.17134
Recent messages:
For information about GNU Emacs and the GNU system, type C-h C-a.
throw-clone-fr-2.el has auto save data; consider M-x recover-this-file
indent-sexp: Wrong type argument: consp, nil
indent-sexp: Wrong type argument: consp, nil
Configured using:
 'configure --without-dbus --host=x86_64-w64-mingw32
 --without-compress-install -C 'CFLAGS=-O2 -static -g3''

I do not see this bug in Emacs 25.3.1.

In GNU Emacs 26.1 (build 1, x86_64-w64-mingw32)
 of 2018-05-30 built on CIRROCUMULUS
Repository revision: 07f8f9bc5a51f5aa94eb099f3e15fbe0c20ea1ea
Windowing system distributor 'Microsoft Corp.', version 10.0.17134
Recent messages:
For information about GNU Emacs and the GNU system, type C-h C-a.
indent-sexp: Wrong type argument: consp, nil
Configured using:
 'configure --without-dbus --host=x86_64-w64-mingw32
 --without-compress-install 'CFLAGS=-O2 -static -g3''

Configured features:
XPM JPEG TIFF GIF PNG RSVG SOUND NOTIFY ACL GNUTLS LIBXML2 ZLIB
TOOLKIT_SCROLL_BARS THREADS LCMS2

Important settings:
  value of $LANG: ENU
  locale-coding-system: cp1252

Major mode: Emacs-Lisp

Minor modes in effect:
  tooltip-mode: t
  global-eldoc-mode: t
  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
  font-lock-mode: t
  blink-cursor-mode: t
  auto-composition-mode: t
  auto-encryption-mode: t
  auto-compression-mode: 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 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 dired dired-loaddefs elec-pair time-date
mule-util tooltip eldoc electric uniquify ediff-hook vc-hooks
lisp-float-type mwheel dos-w32 ls-lisp disp-table term/w32-win w32-win
w32-vars 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 w32notify w32 lcms2 multi-tty make-network-process emacs)

Memory information:
((conses 16 98254 9195)
 (symbols 56 20427 1)
 (miscs 48 59 191)
 (strings 32 29927 1011)
 (string-bytes 1 764152)
 (vectors 16 13997)
 (vector-slots 8 487459 12958)
 (floats 8 55 315)
 (intervals 56 248 29)
 (buffers 992 14))




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#34722; Package emacs. (Sun, 03 Mar 2019 17:46:01 GMT) Full text and rfc822 format available.

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

From: Eli Zaretskii <eliz <at> gnu.org>
To: Drew Adams <drew.adams <at> oracle.com>
Cc: 34722 <at> debbugs.gnu.org
Subject: Re: bug#34722: 26.1;
 REGRESSION: `indent-pp-sexp' Wrong type argument: consp, nil
Date: Sun, 03 Mar 2019 19:45:11 +0200
> Date: Sun, 3 Mar 2019 09:29:32 -0800 (PST)
> From: Drew Adams <drew.adams <at> oracle.com>
> 
> 1. emacs -Q
> 
> 2. C-x C-f foo.el
> 
> 3. Enter this text. Be sure to hit RET after the final right paren, so there is a newline char at the end.
> 
> (defun foo ()
>   (unless t 42)))
> 
> 
> 4. Put point just before the first left paren, then use `C-M-q'.
> 
> This error is raised:
> 
> Wrong type argument: consp, nil

FWIW, I cannot reproduce this with today's Emacs 27.  Your Emacs 27
build is almost a year old, maybe we had a bug back then.




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#34722; Package emacs. (Sun, 03 Mar 2019 18:19:01 GMT) Full text and rfc822 format available.

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

From: Drew Adams <drew.adams <at> oracle.com>
To: Eli Zaretskii <eliz <at> gnu.org>, Drew Adams <drew.adams <at> oracle.com>
Cc: 34722 <at> debbugs.gnu.org
Subject: RE: bug#34722: 26.1;	REGRESSION: `indent-pp-sexp' Wrong type
 argument: consp, nil
Date: Sun, 3 Mar 2019 10:18:09 -0800 (PST)
> > 1. emacs -Q
> >
> > 2. C-x C-f foo.el
> >
> > 3. Enter this text. Be sure to hit RET after the final right paren,
> so there is a newline char at the end.
> >
> > (defun foo ()
> >   (unless t 42)))
> >
> >
> > 4. Put point just before the first left paren, then use `C-M-q'.
> >
> > This error is raised:
> >
> > Wrong type argument: consp, nil
> 
> FWIW, I cannot reproduce this with today's Emacs 27.  Your Emacs 27
> build is almost a year old, maybe we had a bug back then.

Good, if it's fixed.

Can you at least repro it in Emacs 26?  That will tell
you whether the instructions are clear enough and you
followed them OK.




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#34722; Package emacs. (Sun, 03 Mar 2019 18:32:01 GMT) Full text and rfc822 format available.

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

From: Eli Zaretskii <eliz <at> gnu.org>
To: Drew Adams <drew.adams <at> oracle.com>
Cc: 34722 <at> debbugs.gnu.org
Subject: Re: bug#34722: 26.1;	REGRESSION: `indent-pp-sexp' Wrong type
 argument: consp, nil
Date: Sun, 03 Mar 2019 20:31:41 +0200
> Date: Sun, 3 Mar 2019 10:18:09 -0800 (PST)
> From: Drew Adams <drew.adams <at> oracle.com>
> Cc: 34722 <at> debbugs.gnu.org
> 
> Can you at least repro it in Emacs 26?

No, I cannot.




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#34722; Package emacs. (Sun, 03 Mar 2019 18:58:02 GMT) Full text and rfc822 format available.

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

From: Drew Adams <drew.adams <at> oracle.com>
To: Eli Zaretskii <eliz <at> gnu.org>, Drew Adams <drew.adams <at> oracle.com>
Cc: 34722 <at> debbugs.gnu.org
Subject: RE: bug#34722: 26.1;	REGRESSION: `indent-pp-sexp' Wrong type
 argument: consp, nil
Date: Sun, 3 Mar 2019 10:57:30 -0800 (PST)
[Message part 1 (text/plain, inline)]
> > Can you at least repro it in Emacs 26?
> No, I cannot.

I see.  I can. ;-)

Perhaps you did not type the extra right
paren at the end?  Or perhaps you did not
enter a newline after that?

Could you please try emacs -Q, then C-x C-f
for the attached file?

With the Emacs 26.1 release build I cited
this should be 100% reproducible.  It is
for me.

(I narrowed this down from the code where I
discovered this.  Perhaps it can be narrowed
even further, but this 33-char file suffices.)
[throw-bug-34722.el (application/octet-stream, attachment)]

Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#34722; Package emacs. (Sun, 03 Mar 2019 19:29:01 GMT) Full text and rfc822 format available.

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

From: Eli Zaretskii <eliz <at> gnu.org>
To: Drew Adams <drew.adams <at> oracle.com>
Cc: 34722 <at> debbugs.gnu.org
Subject: Re: bug#34722: 26.1;	REGRESSION: `indent-pp-sexp' Wrong type
 argument: consp, nil
Date: Sun, 03 Mar 2019 21:28:31 +0200
> Date: Sun, 3 Mar 2019 10:57:30 -0800 (PST)
> From: Drew Adams <drew.adams <at> oracle.com>
> Cc: 34722 <at> debbugs.gnu.org
> 
> > > Can you at least repro it in Emacs 26?
> > No, I cannot.
> 
> I see.  I can. ;-)
> 
> Perhaps you did not type the extra right
> paren at the end?

I did.

> Or perhaps you did not enter a newline after that?

I did.

> Could you please try emacs -Q, then C-x C-f
> for the attached file?

Same result with Emacs 26.

> With the Emacs 26.1 release build I cited
> this should be 100% reproducible.  It is
> for me.

With stock Emacs 26.1, I see this, yes.  But not with what will be
Emacs 26.2.  (You said "Emacs 26" earlier, so I tried the latest
pretest.)




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#34722; Package emacs. (Sun, 03 Mar 2019 19:35:01 GMT) Full text and rfc822 format available.

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

From: Michael Heerdegen <michael_heerdegen <at> web.de>
To: Drew Adams <drew.adams <at> oracle.com>
Cc: Eli Zaretskii <eliz <at> gnu.org>, 34722 <at> debbugs.gnu.org
Subject: Re: bug#34722: 26.1;
 REGRESSION: `indent-pp-sexp' Wrong type argument: consp, nil
Date: Sun, 03 Mar 2019 20:34:19 +0100
Drew Adams <drew.adams <at> oracle.com> writes:

> With the Emacs 26.1 release build I cited this should be 100%
> reproducible.  It is for me.

Yes, I can reproduce in 26.1.  I cannot with master.  Looks much like
Bug#30891 which has been fixed in October 2018.

Michael.




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#34722; Package emacs. (Sun, 03 Mar 2019 23:24:02 GMT) Full text and rfc822 format available.

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

From: Drew Adams <drew.adams <at> oracle.com>
To: Eli Zaretskii <eliz <at> gnu.org>, Drew Adams <drew.adams <at> oracle.com>
Cc: 34722 <at> debbugs.gnu.org
Subject: RE: bug#34722: 26.1;	REGRESSION: `indent-pp-sexp' Wrong type
 argument: consp, nil
Date: Sun, 3 Mar 2019 15:22:59 -0800 (PST)
> > Could you please try emacs -Q, then C-x C-f
> > for the attached file?
> 
> Same result with Emacs 26.
> 
> > With the Emacs 26.1 release build I cited
> > this should be 100% reproducible.  It is
> > for me.
> 
> With stock Emacs 26.1, I see this, yes.  But not with what will be
> Emacs 26.2.  (You said "Emacs 26" earlier, so I tried the latest
> pretest.)

OK, that's good news (both that you can repro
it with Emacs 26.1 and that it's fixed in 26.2)

My report was from Emacs 26.1 - it indicates the
release build etc.




Forcibly Merged 30891 34722. Request was from Glenn Morris <rgm <at> gnu.org> to control <at> debbugs.gnu.org. (Sun, 03 Mar 2019 23:24: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, 01 Apr 2019 11:24:04 GMT) Full text and rfc822 format available.

This bug report was last modified 5 years and 27 days ago.

Previous Next


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