GNU bug report logs - #72811
28.2; global-display-line-numbers-mode with debbugs package cause Lisp nesting exceeds ‘max-lisp-eval-depth’

Previous Next

Package: emacs;

Reported by: Mats Lidell <mats.lidell <at> lidells.se>

Date: Sun, 25 Aug 2024 22:21:01 UTC

Severity: normal

Found in version 28.2

Done: Eli Zaretskii <eliz <at> gnu.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 72811 in the body.
You can then email your comments to 72811 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 rswgnu <at> gmail.com, bug-gnu-emacs <at> gnu.org:
bug#72811; Package emacs. (Sun, 25 Aug 2024 22:21:01 GMT) Full text and rfc822 format available.

Acknowledgement sent to Mats Lidell <mats.lidell <at> lidells.se>:
New bug report received and forwarded. Copy sent to rswgnu <at> gmail.com, bug-gnu-emacs <at> gnu.org. (Sun, 25 Aug 2024 22:21:02 GMT) Full text and rfc822 format available.

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

From: Mats Lidell <mats.lidell <at> lidells.se>
To: bug-gnu-emacs <at> gnu.org
Subject: 28.2; global-display-line-numbers-mode with debbugs package cause
 Lisp nesting exceeds ‘max-lisp-eval-depth’
Date: Mon, 26 Aug 2024 00:19:16 +0200
Hi,

With Emacs 27.2 and 28.2 using global-display-line-numbers-mode after fetching a bug with debbugs leads to Lisp nesting exceeds ‘max-lisp-eval-depth’. With Emacs 29.4 or Emacs 30 there is no error.

The recipe used is this:

    (setq debug-on-error t)
    (require 'package)
    (package-refresh-contents)
    (package-install 'debbugs)
    (debbugs-gnu-bugs 100)
    (global-display-line-numbers-mode)

Tested by putting the recipe in a file "dot-emacs" in the current folder and running with docker for the different Emacs versions: (Example for 28.2)

    > docker run -v $(pwd):/emacs -it silex/emacs:28.2 emacs -Q -l /emacs/dot-emacs

The backtrace:

Debugger entered--Lisp error: (error "Lisp nesting exceeds ‘max-lisp-eval-depth’")
  window-normalize-window(#<window 1 on *Bugs*> t)
  set-window-buffer-start-and-point(#<window 1 on *Bugs*> #<buffer *scratch*> #<marker at 1 in *scratch*> #<marker at 1 in *scratch*>)
  switch-to-prev-buffer(#<window 1 on *Bugs*> kill)
  replace-buffer-in-windows(#<buffer *Bugs*>)
  kill-buffer("*Bugs*")
  debbugs-gnu-show-reports()
  debbugs-gnu-rescan()
  run-hooks(tabulated-list-revert-hook)
  tabulated-list-revert()
  run-hooks(display-line-numbers-mode-hook display-line-numbers-mode-on-hook)
  display-line-numbers-mode()
  display-line-numbers--turn-on()
  global-display-line-numbers-mode-enable-in-buffers()
  run-hooks(after-change-major-mode-hook)
  run-mode-hooks(debbugs-gnu-mode-hook)
  debbugs-gnu-mode()
  debbugs-gnu-show-reports()
  debbugs-gnu-rescan()
  run-hooks(tabulated-list-revert-hook)
  tabulated-list-revert()
  run-hooks(display-line-numbers-mode-hook display-line-numbers-mode-on-hook)
  display-line-numbers-mode()
  display-line-numbers--turn-on()
  global-display-line-numbers-mode-enable-in-buffers()
  run-hooks(after-change-major-mode-hook)
  run-mode-hooks(debbugs-gnu-mode-hook)
  debbugs-gnu-mode()
  debbugs-gnu-show-reports()

  [...repeating lines deleted...]

  debbugs-gnu-rescan()
  run-hooks(tabulated-list-revert-hook)
  tabulated-list-revert()
  run-hooks(display-line-numbers-mode-hook display-line-numbers-mode-on-hook)
  display-line-numbers-mode()
  display-line-numbers--turn-on()
  global-display-line-numbers-mode()
  eval-buffer(#<buffer  *load*> nil "/emacs/dot-emacs" nil t)  ; Reading at buffer position 155
  load-with-code-conversion("/emacs/dot-emacs" "/emacs/dot-emacs" nil t)
  load("/emacs/dot-emacs" nil t)
  command-line-1(("-l" "/emacs/dot-emacs"))
  command-line()
  normal-top-level()

Yours
-- 
%% Mats




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#72811; Package emacs. (Thu, 29 Aug 2024 12:02:02 GMT) Full text and rfc822 format available.

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

From: Eli Zaretskii <eliz <at> gnu.org>
To: Mats Lidell <mats.lidell <at> lidells.se>
Cc: rswgnu <at> gmail.com, 72811 <at> debbugs.gnu.org
Subject: Re: bug#72811: 28.2;
 global-display-line-numbers-mode with debbugs package cause Lisp
 nesting exceeds ‘max-lisp-eval-depth’
Date: Thu, 29 Aug 2024 15:00:14 +0300
> Cc: Robert Weiner <rswgnu <at> gmail.com>
> Date: Mon, 26 Aug 2024 00:19:16 +0200
> From:  Mats Lidell via "Bug reports for GNU Emacs,
>  the Swiss army knife of text editors" <bug-gnu-emacs <at> gnu.org>
> 
> With Emacs 27.2 and 28.2 using global-display-line-numbers-mode after fetching a bug with debbugs leads to Lisp nesting exceeds ‘max-lisp-eval-depth’. With Emacs 29.4 or Emacs 30 there is no error.

I guess we already fixed this, so we could close this bug.  Still...

>   debbugs-gnu-rescan()
>   run-hooks(tabulated-list-revert-hook)
>   tabulated-list-revert()
>   run-hooks(display-line-numbers-mode-hook display-line-numbers-mode-on-hook)
>   display-line-numbers-mode()
>   display-line-numbers--turn-on()
>   global-display-line-numbers-mode()

...can you figure out which Lisp caused display-line-numbers-mode or
display-line-numbers-mode-on-hook to run tabulated-list-revert?  I
couldn't find that anywhere in Emacs, and also not in debbugs.  I do
see that debbugs-gnu adds to tabulated-list-revert-hook the function
debbugs-gnu-rescan, which then changes the major mode, which causes
display-line-numbers-mode to be turned on again, so what happens after
that is clear: infinite recursion.  But I cannot understand why was
tabulated-list-revert called in the first place.




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#72811; Package emacs. (Thu, 29 Aug 2024 20:14:01 GMT) Full text and rfc822 format available.

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

From: Mats Lidell <mats.lidell <at> lidells.se>
To: Eli Zaretskii <eliz <at> gnu.org>
Cc: rswgnu <at> gmail.com, 72811 <at> debbugs.gnu.org
Subject: Re: bug#72811: 28.2; global-display-line-numbers-mode with debbugs
 package cause Lisp nesting exceeds ‘max-lisp-eval-depth’
Date: Thu, 29 Aug 2024 22:12:16 +0200
> Eli Zaretskii writes:
> I guess we already fixed this, so we could close this bug.  Still...

Yes. But I was curious since I could not find any commit in Emacs that looked
related to fixing this.

> ...can you figure out which Lisp caused display-line-numbers-mode or
> display-line-numbers-mode-on-hook to run tabulated-list-revert?  I
> couldn't find that anywhere in Emacs, and also not in debbugs.  I do
> see that debbugs-gnu adds to tabulated-list-revert-hook the function
> debbugs-gnu-rescan, which then changes the major mode, which causes
> display-line-numbers-mode to be turned on again, so what happens after
> that is clear: infinite recursion.  But I cannot understand why was
> tabulated-list-revert called in the first place.

I could not either so I filed the bug report. ;-) And hoped someone could
figure it out. \o/

%% Mats




Reply sent to Eli Zaretskii <eliz <at> gnu.org>:
You have taken responsibility. (Sat, 14 Sep 2024 07:32:02 GMT) Full text and rfc822 format available.

Notification sent to Mats Lidell <mats.lidell <at> lidells.se>:
bug acknowledged by developer. (Sat, 14 Sep 2024 07:32:02 GMT) Full text and rfc822 format available.

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

From: Eli Zaretskii <eliz <at> gnu.org>
To: Mats Lidell <mats.lidell <at> lidells.se>
Cc: rswgnu <at> gmail.com, 72811-done <at> debbugs.gnu.org
Subject: Re: bug#72811: 28.2; global-display-line-numbers-mode with debbugs
 package cause Lisp nesting exceeds ‘max-lisp-eval-depth’
Date: Sat, 14 Sep 2024 10:31:00 +0300
> From: Mats Lidell <mats.lidell <at> lidells.se>
> Cc: 72811 <at> debbugs.gnu.org,  rswgnu <at> gmail.com
> Date: Thu, 29 Aug 2024 22:12:16 +0200
> 
> > Eli Zaretskii writes:
> > I guess we already fixed this, so we could close this bug.  Still...
> 
> Yes. But I was curious since I could not find any commit in Emacs that looked
> related to fixing this.
> 
> > ...can you figure out which Lisp caused display-line-numbers-mode or
> > display-line-numbers-mode-on-hook to run tabulated-list-revert?  I
> > couldn't find that anywhere in Emacs, and also not in debbugs.  I do
> > see that debbugs-gnu adds to tabulated-list-revert-hook the function
> > debbugs-gnu-rescan, which then changes the major mode, which causes
> > display-line-numbers-mode to be turned on again, so what happens after
> > that is clear: infinite recursion.  But I cannot understand why was
> > tabulated-list-revert called in the first place.
> 
> I could not either so I filed the bug report. ;-) And hoped someone could
> figure it out. \o/

No further comments, so I'm closing this bug.




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

This bug report was last modified 250 days ago.

Previous Next


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