From: Bob Rogers <rogers@rgrjr.com>
To: 50126@debbugs.gnu.org
Subject: bug#50126: 28.0.50; "mode: conf" and "mode: tex" get unbounded recursion
Date: Thu, 19 Aug 2021 13:11:45 -0400 [thread overview]
Message-ID: <24862.37073.150567.609831@orion.rgrjr.com> (raw)
In "emacs -Q" in master rebuilt a few hours ago, when I open the file
shown below with "# -*- mode: conf; -*-" I get a "Lisp nesting exceeds
max-lisp-eval-depth " error because conf-mode is trying to dispatch to
one of its submodes, but the submode then calls run-mode-hooks which
ends up back in conf-mode, ad inf. Using this minimal broken.conf file:
# -*- mode: conf; -*-
is sufficient; here's the top of the backtrace:
Debugger entered--Lisp error: (error "Lisp nesting exceeds max-lisp-eval-depth ")
apply(#f(compiled-function (orig-fun) "Redirect to one of the submodes when called directly." #<bytecode -0xe6df0765af3b07>) #f(compiled-function () (interactive nil) #<bytecode 0xdf70887525b4bad>) nil)
conf-mode()
conf-unix-mode()
#f(compiled-function (orig-fun) "Redirect to one of the submodes when called directly." #<bytecode -0xe6df0765af3b07>)(#f(compiled-function () (interactive nil) #<bytecode 0xdf70887525b4bad>))
apply(#f(compiled-function (orig-fun) "Redirect to one of the submodes when called directly." #<bytecode -0xe6df0765af3b07>) #f(compiled-function () (interactive nil) #<bytecode 0xdf70887525b4bad>) nil)
conf-mode()
hack-one-local-variable(mode conf)
hack-local-variables-apply()
hack-local-variables(no-mode)
run-mode-hooks(conf-unix-mode-hook)
conf-unix-mode()
#f(compiled-function (orig-fun) "Redirect to one of the submodes when called directly." #<bytecode -0xe6df0765af3b07>)(#f(compiled-function () (interactive nil) #<bytecode 0xdf70887525b4bad>))
apply(#f(compiled-function (orig-fun) "Redirect to one of the submodes when called directly." #<bytecode -0xe6df0765af3b07>) #f(compiled-function () (interactive nil) #<bytecode 0xdf70887525b4bad>) nil)
conf-mode()
hack-one-local-variable(mode conf)
. . .
It fails with conf-unix-mode in the simple case of the configuration
file above; unsurprisingly, I've also seen it fail with conf-space-mode.
And "mode: tex;" has the same general problem, since it uses the same
dispatch logic.
I would attempt a patch, but I have no clue what TRT would be here.
It would seem cleanest to keep conf-mode and tex-mode as user-visible
modes, and make new generic-conf-mode and generic-tex-mode parents for
their submodes, but that seems like it could be a fairly large change.
Using delay-mode-hooks might be simpler, but I have no idea how that
would work.
-- Bob Rogers
http://www.rgrjr.com/
------------------------------------------------------------------------
In GNU Emacs 28.0.50 (build 1, x86_64-pc-linux-gnu, GTK+ Version 3.24.20, cairo version 1.16.0)
of 2021-08-19 built on orion
Repository revision: a44432a773f7e131692e3f5c9d765cffeef0739a
Repository branch: master
Windowing system distributor 'The X.Org Foundation', version 11.0.12003000
System Description: openSUSE Leap 15.3
Configured using:
'configure --with-dbus=no --with-gsettings=no --with-gif=ifavailable
--with-tiff=no --with-gnutls=yes --with-gconf=no'
Configured features:
ACL CAIRO FREETYPE GIF GLIB GMP GNUTLS HARFBUZZ JPEG LIBSELINUX LIBXML2
MODULES NOTIFY INOTIFY PDUMPER PNG RSVG SECCOMP SOUND THREADS
TOOLKIT_SCROLL_BARS X11 XDBE XIM XPM GTK3 ZLIB
Important settings:
value of $LANG: en_US.UTF-8
locale-coding-system: utf-8-unix
next reply other threads:[~2021-08-19 17:11 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-08-19 17:11 Bob Rogers [this message]
2021-08-20 13:58 ` bug#50126: 28.0.50; "mode: conf" and "mode: tex" get unbounded recursion Lars Ingebrigtsen
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=24862.37073.150567.609831@orion.rgrjr.com \
--to=rogers@rgrjr.com \
--cc=50126@debbugs.gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/emacs.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).