From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Bob Rogers Newsgroups: gmane.emacs.bugs Subject: bug#50126: 28.0.50; "mode: conf" and "mode: tex" get unbounded recursion Date: Thu, 19 Aug 2021 13:11:45 -0400 Message-ID: <24862.37073.150567.609831@orion.rgrjr.com> Mime-Version: 1.0 Content-Type: text/plain; charset=unknown Content-Transfer-Encoding: 7bit Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="31058"; mail-complaints-to="usenet@ciao.gmane.io" To: 50126@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Thu Aug 19 19:14:11 2021 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1mGlcI-0007iC-V7 for geb-bug-gnu-emacs@m.gmane-mx.org; Thu, 19 Aug 2021 19:14:11 +0200 Original-Received: from localhost ([::1]:38564 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mGlcG-0001t4-TX for geb-bug-gnu-emacs@m.gmane-mx.org; Thu, 19 Aug 2021 13:14:08 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:35388) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mGlcA-0001sq-N5 for bug-gnu-emacs@gnu.org; Thu, 19 Aug 2021 13:14:02 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:49232) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1mGlcA-0007lP-Fv for bug-gnu-emacs@gnu.org; Thu, 19 Aug 2021 13:14:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1mGlcA-0000KF-7J for bug-gnu-emacs@gnu.org; Thu, 19 Aug 2021 13:14:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Bob Rogers Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 19 Aug 2021 17:14:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 50126 X-GNU-PR-Package: emacs X-Debbugs-Original-To: bug-gnu-emacs@gnu.org Original-Received: via spool by submit@debbugs.gnu.org id=B.16293932201205 (code B ref -1); Thu, 19 Aug 2021 17:14:02 +0000 Original-Received: (at submit) by debbugs.gnu.org; 19 Aug 2021 17:13:40 +0000 Original-Received: from localhost ([127.0.0.1]:60778 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mGlbn-0000JM-PX for submit@debbugs.gnu.org; Thu, 19 Aug 2021 13:13:40 -0400 Original-Received: from lists.gnu.org ([209.51.188.17]:41768) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mGla5-0000GH-H6 for submit@debbugs.gnu.org; Thu, 19 Aug 2021 13:11:53 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:34978) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mGla5-0001dj-75 for bug-gnu-emacs@gnu.org; Thu, 19 Aug 2021 13:11:53 -0400 Original-Received: from mail-qk1-x730.google.com ([2607:f8b0:4864:20::730]:34759) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1mGla2-00069N-HC for bug-gnu-emacs@gnu.org; Thu, 19 Aug 2021 13:11:52 -0400 Original-Received: by mail-qk1-x730.google.com with SMTP id n11so7944760qkk.1 for ; Thu, 19 Aug 2021 10:11:47 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=rgrjr-com.20150623.gappssmtp.com; s=20150623; h=mime-version:content-transfer-encoding:message-id:date:from:to :subject; bh=EKc9cJmrcEls70YR3P6G0+Af3oc2mx9ySQGoiCv1KN0=; b=hJXaSvWFFSr+Z/u2Zz7/Iu6MTbKjfdXzmRAATgr4iwdHfqXAcPVSJf14BYFtylpvx7 6Uowjoqe2JWBtIOPjXdOaYHUDU1tDKBoTfFM7NhpVJOmDrpf07vDGu6ZHVm9B6n3Jjlf bizMdjNprrF0J8slfbvHyEK5LW4Hh2Jtw44UE9j8EUdvBLeeFSZ4twiskHo6Whu1ThyD To/WbKBlgxXrxai0RMECI6yloFjQlzPvpjeYo0IZQvEpDp5HW0Sc0LqP7FAAC2y+10QZ H7N/6MsLSf8egUwu6MES20I0IrFkp0nE6LPQ4GvPlRvR3gHVkG42MlNL2npWfpsfnVlY Jstg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:content-transfer-encoding :message-id:date:from:to:subject; bh=EKc9cJmrcEls70YR3P6G0+Af3oc2mx9ySQGoiCv1KN0=; b=UEsJznPuIk5r/AH5asxE+N9QZ/0BYDxTeeZBh0Ujx047ho+PlnsfrdfeGAuRLayzMw ZV2DQiXfFUI+bLwgWxo7wHb1NaiK3u5VxuFlo+7qG49v2Pu21SAybngax76weaysdNwc pcl4sUTSwddXMs6t+IHa3mFJYWZnvuPtzhLifGp0CItEBb5/pZK0cpy7KydF+iuveGRQ yZe7Cxp6m+Bs/u6vuSgaQHCsZa4Ibe6JwGK0UghJnyZlqv5ZEbEITQZuPHtR/SBTzWJw CTA+EIxOVJLWgTcmgpQpWZkkhZovdk1zsvuBjKE1SUNw1LVxn7y6r8B7hXzP4L9iQM83 cp2g== X-Gm-Message-State: AOAM531lfKxrXw1l1FXQWnQZNnMJwp139A4JHClyORG+OLF+LMEf6lbL vodsJhDEfEItPOr/jDnMZEezxH8kvBwFZcfT X-Google-Smtp-Source: ABdhPJyEy8J4e1+m5waNTyPbkz5SStCA4p+OVisufMTkITBHjeNsYCfCsuZcYNw1XNvQ21LKxHlBJQ== X-Received: by 2002:a37:6197:: with SMTP id v145mr4701941qkb.487.1629393106743; Thu, 19 Aug 2021 10:11:46 -0700 (PDT) Original-Received: from orion.rgrjr.com ([2601:19c:4600:3270::4]) by smtp.gmail.com with ESMTPSA id m19sm1440646qtx.84.2021.08.19.10.11.45 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 19 Aug 2021 10:11:46 -0700 (PDT) X-Mailer: VM 7.19 under Emacs 28.0.50 Received-SPF: none client-ip=2607:f8b0:4864:20::730; envelope-from=rogers@rgrjr.com; helo=mail-qk1-x730.google.com X-Spam_score_int: -18 X-Spam_score: -1.9 X-Spam_bar: - X-Spam_report: (-1.9 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_NONE=0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-Mailman-Approved-At: Thu, 19 Aug 2021 13:13:37 -0400 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.io gmane.emacs.bugs:212236 Archived-At: 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." #) #f(compiled-function () (interactive nil) #) nil) conf-mode() conf-unix-mode() #f(compiled-function (orig-fun) "Redirect to one of the submodes when called directly." #)(#f(compiled-function () (interactive nil) #)) apply(#f(compiled-function (orig-fun) "Redirect to one of the submodes when called directly." #) #f(compiled-function () (interactive nil) #) 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." #)(#f(compiled-function () (interactive nil) #)) apply(#f(compiled-function (orig-fun) "Redirect to one of the submodes when called directly." #) #f(compiled-function () (interactive nil) #) 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