From unknown Fri Jun 20 07:15:37 2025 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-Mailer: MIME-tools 5.509 (Entity 5.509) Content-Type: text/plain; charset=utf-8 From: bug#69373 <69373@debbugs.gnu.org> To: bug#69373 <69373@debbugs.gnu.org> Subject: Status: 14.0.3; hack-local-variables misbehaves after loading AUCTeX Reply-To: bug#69373 <69373@debbugs.gnu.org> Date: Fri, 20 Jun 2025 14:15:37 +0000 retitle 69373 14.0.3; hack-local-variables misbehaves after loading AUCTeX reassign 69373 auctex submitter 69373 Tony Zorman severity 69373 normal thanks From debbugs-submit-bounces@debbugs.gnu.org Sun Feb 25 02:45:18 2024 Received: (at submit) by debbugs.gnu.org; 25 Feb 2024 07:45:18 +0000 Received: from localhost ([127.0.0.1]:50689 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1re9CH-0007S7-Ol for submit@debbugs.gnu.org; Sun, 25 Feb 2024 02:45:18 -0500 Received: from lists.gnu.org ([209.51.188.17]:55012) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1re9CF-0007L1-Ff for submit@debbugs.gnu.org; Sun, 25 Feb 2024 02:45:16 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1re8dl-0007eF-VP for bug-auctex@gnu.org; Sun, 25 Feb 2024 02:09:37 -0500 Received: from mout-p-101.mailbox.org ([80.241.56.151]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_CHACHA20_POLY1305:256) (Exim 4.90_1) (envelope-from ) id 1re8dh-0006tb-Id for bug-auctex@gnu.org; Sun, 25 Feb 2024 02:09:37 -0500 Received: from smtp202.mailbox.org (smtp202.mailbox.org [IPv6:2001:67c:2050:b231:465::202]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by mout-p-101.mailbox.org (Postfix) with ESMTPS id 4TjFHC3wzbz9sRx for ; Sun, 25 Feb 2024 08:09:27 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=mailbox.org; s=mail20150812; t=1708844967; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=jzdxKsqwSLONX3au2rYDAmfDMORZpfDJ8pFHSP8Vzto=; b=qDs2INfRD4glUCaVTSOa3UHM1tGC2XpOXe2+Q3SjRvNGa03PKAQSmxvNNwgxrFLcJl8HX4 J3WONw4uqZtR3yh7P9qf7QxDQD09I05URDSoOS7JIOnnaO2GsDGU8xYTgu+2G2OHUXYHN0 zpnR2eZryxN0d1F4NgLIXYdm3l4LpKL5YhEkgKkI7a5kIl9bEM5XXWZg3C8anYI/b6F4jE J7b/ixy9VQtrxRNJEAA+/WZX2mh3jJx8kUeN6bbJxWypIoOXmEr4Ag8sfJ69Txd+ZXJyxe YxQQi37LPdFf61ZRhkKhntOMT7DrzXnffnwMvME5a+ScEBlmlxtvwD98LKV9Ow== From: Tony Zorman To: bug-auctex@gnu.org Subject: 14.0.3; hack-local-variables misbehaves after loading AUCTeX Date: Sun, 25 Feb 2024 08:09:26 +0100 Message-ID: <87y1b958bd.fsf@hyperspace> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-MBO-RS-ID: 5b7285f5b317279aef0 X-MBO-RS-META: gaua77d4txchydbbwb59jrkmaan4ut3c Received-SPF: pass client-ip=80.241.56.151; envelope-from=soliditsallgood@mailbox.org; helo=mout-p-101.mailbox.org X-Spam_score_int: -27 X-Spam_score: -2.8 X-Spam_bar: -- X-Spam_report: (-2.8 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_LOW=-0.7, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no X-Spam_action: no action X-Spam-Score: -1.3 (-) X-Debbugs-Envelope-To: submit X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -2.3 (--) Hi, AUCTeX 14.x changed major-mode names from latex-mode to LaTeX-mode. As indicated in the relevant changes file, the local variables added by AUCTeX at the bottom of a file are now %%% Local Variables: %%% mode: LaTeX <-- not `latex' %%% End: However, it seems like this is not enough. It might be that a minor mode calls hack-local-variables after AUCTeX is loaded; what will happen then is that the regular latex-mode is activated, and AUCTeX vanishes! The reason for that is that hack-local-variables eventually calls hack-one-local-variable, which features this piece of code: (defun hack-one-local-variable (var val) "...DOCSTRING..." (pcase var ('mode ; vvvvvvvv (let ((mode (intern (concat (downcase (symbol-name val)) "-mode")))) (unless (eq (indirect-function mode) (indirect-function major-mode)) (funcall mode)))) =E2=80=A6)) In other words, LaTeX-mode gets turned into latex-mode anyways. Curiously, executing this does indeed drop one down into the built in latex-mode=E2=80=94it seems that the settings in major-mode-remap-alist are ignored somehow. This is not a theoretical issue, and has happened with a particular minor mode (that issue was fixed, but I reckon there are potentially more modes out there that do something like this). I'm not sure there to report this (Is this an Emacs bug with repect to major-mode-remap-alist not being respected? or hack-one-local-variable just downcasing the mode?) so I will try here first. Thanks! Tony Emacs : GNU Emacs 30.0.50 (build 1, x86_64-pc-linux-gnu, Motif Version 2.3= .8, cairo version 1.18.0) Package: 14.0.3 current state: =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D (setq AUCTeX-date "2024-02-20" window-system 'x LaTeX-version "2e" TeX-style-path '("~/.emacs.d/auctex" "/nix/store/2q9acgmrj6bya64wn83y5h2kw8ravgij-emacs-packag= es-deps/share/emacs/site-lisp/elpa/auctex-14.0.3/style" "/home/slot/.config/emacs/auctex/auto" "/home/slot/.confi= g/emacs/auctex/style" "auto" "style") TeX-auto-save t TeX-parse-self t TeX-master t TeX-command-list '(("TeX" "%(PDF)%(tex) %(file-line-error) %`%(extraopts) = %S%(PDFout)%(mode)%' %(output-dir) %t" TeX-run-TeX nil (plain-TeX-mode AmSTeX-mode Texinfo-mode) :help "Run p= lain TeX") ("LaTeX" "%`%l%(mode)%' %T" TeX-run-TeX nil (LaTeX-mode= docTeX-mode) :help "Run LaTeX") ("Makeinfo" "makeinfo %(extraopts) %(o-dir) %t" TeX-run= -compile nil (Texinfo-mode) :help "Run Makeinfo with Info output") ("Makeinfo HTML" "makeinfo %(extraopts) %(o-dir) --html= %t" TeX-run-compile nil (Texinfo-mode) :help "Run Makeinfo with HTML output") ("AmSTeX" "amstex %(PDFout) %`%(extraopts) %S%(mode)%' = %(output-dir) %t" TeX-run-TeX nil (AmSTeX-mode) :help "Run AMSTeX") ("ConTeXt" "%(cntxcom) --once --texutil %(extraopts) %(= execopts)%t" TeX-run-TeX nil (ConTeXt-mode) :help "Run ConTeXt once") ("ConTeXt Full" "%(cntxcom) %(extraopts) %(execopts)%t"= TeX-run-TeX nil (ConTeXt-mode) :help "Run ConTeXt until completion") ("BibTeX" "bibtex %(O?aux)" TeX-run-BibTeX nil (plain-TeX-mode LaTeX-mode docTeX-mode AmSTeX-mode Tex= info-mode ConTeXt-mode) :help "Run BibTeX") ("Biber" "biber %(output-dir) %s" TeX-run-Biber nil (plain-TeX-mode LaTeX-mode docTeX-mode AmSTeX-mode Tex= info-mode) :help "Run Biber") ("Texindex" "texindex %s.??" TeX-run-command nil (Texin= fo-mode) :help "Run Texindex") ("Texi2dvi" "%(PDF)texi2dvi %t" TeX-run-command nil (Te= xinfo-mode) :help "Run Texi2dvi or Texi2pdf") ("View" "%V" TeX-run-discard-or-function t t :help "Run= Viewer") ("Print" "%p" TeX-run-command t t :help "Print the file= ") ("Queue" "%q" TeX-run-background nil t :help "View the = printer queue" :visible TeX-queue-command) ("File" "%(o?)dvips %d -o %f " TeX-run-dvips t (plain-T= eX-mode LaTeX-mode docTeX-mode AmSTeX-mode Texinfo-mode) :help "Generate PostScript file") ("Dvips" "%(o?)dvips %d -o %f " TeX-run-dvips nil (plain-TeX-mode LaTeX-mode docTeX-mode AmSTeX-mode Tex= info-mode) :help "Convert DVI file to PostScript") ("Dvipdfmx" "dvipdfmx -o %(O?pdf) %d" TeX-run-dvipdfmx = nil (plain-TeX-mode LaTeX-mode docTeX-mode AmSTeX-mode Tex= info-mode) :help "Convert DVI file to PDF with dvipdfmx") ("Ps2pdf" "ps2pdf %f %(O?pdf)" TeX-run-ps2pdf nil (plain-TeX-mode LaTeX-mode docTeX-mode AmSTeX-mode Tex= info-mode) :help "Convert PostScript file to PDF") ("Glossaries" "makeglossaries %(d-dir) %s" TeX-run-comm= and nil (plain-TeX-mode LaTeX-mode docTeX-mode AmSTeX-mode Tex= info-mode) :help "Run makeglossaries to create glossary file") ("Index" "makeindex %(O?idx)" TeX-run-index nil (plain-= TeX-mode LaTeX-mode docTeX-mode AmSTeX-mode Texinfo-mode) :help "Run makeindex to create index file") ("upMendex" "upmendex %(O?idx)" TeX-run-index t (plain-= TeX-mode LaTeX-mode docTeX-mode AmSTeX-mode Texinfo-mode) :help "Run upmendex to create index file") ("Xindy" "texindy %s" TeX-run-command nil (plain-TeX-mo= de LaTeX-mode docTeX-mode AmSTeX-mode Texinfo-mode) :help "Run xindy to create index file") ("Check" "lacheck %s" TeX-run-compile nil (LaTeX-mode) = :help "Check LaTeX file for correctness") ("ChkTeX" "chktex -v6 %s" TeX-run-compile nil (LaTeX-mo= de) :help "Check LaTeX file for common mistakes") ("Spell" "(TeX-ispell-document \"\")" TeX-run-function = nil t :help "Spell-check the document") ("Clean" "TeX-clean" TeX-run-function nil t :help "Dele= te generated intermediate files") ("Clean All" "(TeX-clean t)" TeX-run-function nil t :he= lp "Delete generated intermediate and output files") ("Other" "" TeX-run-command t t :help "Run an arbitrary= command")) ) --=20 Tony Zorman | https://tony-zorman.com/ From debbugs-submit-bounces@debbugs.gnu.org Sun Feb 25 09:11:41 2024 Received: (at submit) by debbugs.gnu.org; 25 Feb 2024 14:11:41 +0000 Received: from localhost ([127.0.0.1]:47455 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1reFEC-0007lg-PZ for submit@debbugs.gnu.org; Sun, 25 Feb 2024 09:11:41 -0500 Received: from lists.gnu.org ([209.51.188.17]:58620) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1reFEB-0007lW-AB for submit@debbugs.gnu.org; Sun, 25 Feb 2024 09:11:40 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1reFDm-0006JW-09 for bug-auctex@gnu.org; Sun, 25 Feb 2024 09:11:14 -0500 Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1reFDk-0002kn-5o; Sun, 25 Feb 2024 09:11:12 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=MIME-Version:Date:References:In-Reply-To:Subject:To: From; bh=P8zpYhR5G1Jg5uqw6oGxphzDQTIu5fRAa0CafWAcWac=; b=Ugk4gVa66GWNa/+0d3tT RnxX771r1HMMfHsmKdbP9i8esiOOH/JkYYE9YMevz/JFc+5p/uXIr+xTpDiHrrUABkmM6W1rdqerc W3+JH6phwMLj2RRcbCGgbdesXiDdQOTqRhfMMZhJoD8+K0Uh8OKhmiSeE2rUCOM+xJ0ocVrGXlWJu PCfK5akEMyoOHFy7JTBqASttH26prWjXHqdhH5ZSK7BKbzZLhwCbVs8PEEeK74XBUqvcLOnqHE9Ou CeGJFhFRCs+YDaiwCg1qSqJh9U2NrxwRY47++bwBzUaegeZY/KW6+st2+m1PLjwT65Go/YLLoDVCA pEBTgu3uJDb5Rg==; From: Arash Esbati To: Tony Zorman via bug-auctex via Bug reporting list for AUCTeX Subject: Re: bug#69373: 14.0.3; hack-local-variables misbehaves after loading AUCTeX In-Reply-To: <87y1b958bd.fsf@hyperspace> (Tony Zorman via bug-auctex via Bug reporting list for AUCTeX's message of "Sun, 25 Feb 2024 08:09:26 +0100") References: <87y1b958bd.fsf@hyperspace> Date: Sun, 25 Feb 2024 15:10:56 +0100 Message-ID: User-Agent: Gnus/5.13 (Gnus v5.13) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: submit Cc: Tony Zorman , Stefan Monnier , 69373@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) Hi Tony, Thanks for the report. I think this is more an Emacs issue than AUCTeX and should be assigned/fixed there. @Stefan: Can you please also have a look at the report below? Do you have an idea how and where it should be fixed? TIA. Best, Arash Tony Zorman via bug-auctex via Bug reporting list for AUCTeX writes: > Hi, > > AUCTeX 14.x changed major-mode names from latex-mode to LaTeX-mode. As > indicated in the relevant changes file, the local variables added by > AUCTeX at the bottom of a file are now > > %%% Local Variables: > %%% mode: LaTeX <-- not `latex' > %%% End: > > However, it seems like this is not enough. It might be that a minor mode > calls hack-local-variables after AUCTeX is loaded; what will happen then > is that the regular latex-mode is activated, and AUCTeX vanishes! > > The reason for that is that hack-local-variables eventually calls > hack-one-local-variable, which features this piece of code: > > (defun hack-one-local-variable (var val) > "...DOCSTRING..." > (pcase var > ('mode ; vvvvvvvv > (let ((mode (intern (concat (downcase (symbol-name val)) > "-mode")))) > (unless (eq (indirect-function mode) > (indirect-function major-mode)) > (funcall mode)))) > =E2=80=A6)) > > In other words, LaTeX-mode gets turned into latex-mode anyways. > Curiously, executing this does indeed drop one down into the built in > latex-mode=E2=80=94it seems that the settings in major-mode-remap-alist a= re > ignored somehow. > > This is not a theoretical issue, and has happened with a particular > minor mode (that issue was fixed, but I reckon there are potentially > more modes out there that do something like this). > > I'm not sure there to report this (Is this an Emacs bug with repect to > major-mode-remap-alist not being respected? or hack-one-local-variable > just downcasing the mode?) so I will try here first. > > Thanks! > Tony > > Emacs : GNU Emacs 30.0.50 (build 1, x86_64-pc-linux-gnu, Motif Version 2= .3.8, cairo version 1.18.0) > Package: 14.0.3 > > current state: > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D > (setq > AUCTeX-date "2024-02-20" > window-system 'x > LaTeX-version "2e" > TeX-style-path '("~/.emacs.d/auctex" > "/nix/store/2q9acgmrj6bya64wn83y5h2kw8ravgij-emacs-pack= ages-deps/share/emacs/site-lisp/elpa/auctex-14.0.3/style" > "/home/slot/.config/emacs/auctex/auto" "/home/slot/.con= fig/emacs/auctex/style" "auto" "style") > TeX-auto-save t > TeX-parse-self t > TeX-master t > TeX-command-list '(("TeX" "%(PDF)%(tex) %(file-line-error) %`%(extraopts= ) %S%(PDFout)%(mode)%' %(output-dir) %t" TeX-run-TeX nil > (plain-TeX-mode AmSTeX-mode Texinfo-mode) :help "Run= plain TeX") > ("LaTeX" "%`%l%(mode)%' %T" TeX-run-TeX nil (LaTeX-mo= de docTeX-mode) :help "Run LaTeX") > ("Makeinfo" "makeinfo %(extraopts) %(o-dir) %t" TeX-r= un-compile nil (Texinfo-mode) :help > "Run Makeinfo with Info output") > ("Makeinfo HTML" "makeinfo %(extraopts) %(o-dir) --ht= ml %t" TeX-run-compile nil (Texinfo-mode) :help > "Run Makeinfo with HTML output") > ("AmSTeX" "amstex %(PDFout) %`%(extraopts) %S%(mode)%= ' %(output-dir) %t" TeX-run-TeX nil (AmSTeX-mode) :help > "Run AMSTeX") > ("ConTeXt" "%(cntxcom) --once --texutil %(extraopts) = %(execopts)%t" TeX-run-TeX nil (ConTeXt-mode) :help > "Run ConTeXt once") > ("ConTeXt Full" "%(cntxcom) %(extraopts) %(execopts)%= t" TeX-run-TeX nil (ConTeXt-mode) :help > "Run ConTeXt until completion") > ("BibTeX" "bibtex %(O?aux)" TeX-run-BibTeX nil > (plain-TeX-mode LaTeX-mode docTeX-mode AmSTeX-mode T= exinfo-mode ConTeXt-mode) :help "Run BibTeX") > ("Biber" "biber %(output-dir) %s" TeX-run-Biber nil > (plain-TeX-mode LaTeX-mode docTeX-mode AmSTeX-mode T= exinfo-mode) :help "Run Biber") > ("Texindex" "texindex %s.??" TeX-run-command nil (Tex= info-mode) :help "Run Texindex") > ("Texi2dvi" "%(PDF)texi2dvi %t" TeX-run-command nil (= Texinfo-mode) :help "Run Texi2dvi or Texi2pdf") > ("View" "%V" TeX-run-discard-or-function t t :help "R= un Viewer") > ("Print" "%p" TeX-run-command t t :help "Print the fi= le") > ("Queue" "%q" TeX-run-background nil t :help "View th= e printer queue" :visible TeX-queue-command) > ("File" "%(o?)dvips %d -o %f " TeX-run-dvips t (plain= -TeX-mode LaTeX-mode docTeX-mode AmSTeX-mode Texinfo-mode) > :help "Generate PostScript file") > ("Dvips" "%(o?)dvips %d -o %f " TeX-run-dvips nil > (plain-TeX-mode LaTeX-mode docTeX-mode AmSTeX-mode T= exinfo-mode) :help "Convert DVI file to PostScript") > ("Dvipdfmx" "dvipdfmx -o %(O?pdf) %d" TeX-run-dvipdfm= x nil > (plain-TeX-mode LaTeX-mode docTeX-mode AmSTeX-mode T= exinfo-mode) :help "Convert DVI file to PDF with dvipdfmx") > ("Ps2pdf" "ps2pdf %f %(O?pdf)" TeX-run-ps2pdf nil > (plain-TeX-mode LaTeX-mode docTeX-mode AmSTeX-mode T= exinfo-mode) :help "Convert PostScript file to PDF") > ("Glossaries" "makeglossaries %(d-dir) %s" TeX-run-co= mmand nil > (plain-TeX-mode LaTeX-mode docTeX-mode AmSTeX-mode T= exinfo-mode) :help > "Run makeglossaries to create glossary file") > ("Index" "makeindex %(O?idx)" TeX-run-index nil (plai= n-TeX-mode LaTeX-mode docTeX-mode AmSTeX-mode Texinfo-mode) > :help "Run makeindex to create index file") > ("upMendex" "upmendex %(O?idx)" TeX-run-index t (plai= n-TeX-mode LaTeX-mode docTeX-mode AmSTeX-mode Texinfo-mode) > :help "Run upmendex to create index file") > ("Xindy" "texindy %s" TeX-run-command nil (plain-TeX-= mode LaTeX-mode docTeX-mode AmSTeX-mode Texinfo-mode) :help > "Run xindy to create index file") > ("Check" "lacheck %s" TeX-run-compile nil (LaTeX-mode= ) :help "Check LaTeX file for correctness") > ("ChkTeX" "chktex -v6 %s" TeX-run-compile nil (LaTeX-= mode) :help "Check LaTeX file for common mistakes") > ("Spell" "(TeX-ispell-document \"\")" TeX-run-functio= n nil t :help "Spell-check the document") > ("Clean" "TeX-clean" TeX-run-function nil t :help "De= lete generated intermediate files") > ("Clean All" "(TeX-clean t)" TeX-run-function nil t := help "Delete generated intermediate and output files") > ("Other" "" TeX-run-command t t :help "Run an arbitra= ry command")) > ) From debbugs-submit-bounces@debbugs.gnu.org Sun Feb 25 10:33:16 2024 Received: (at 69373) by debbugs.gnu.org; 25 Feb 2024 15:33:16 +0000 Received: from localhost ([127.0.0.1]:53946 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1reGVA-0006C7-As for submit@debbugs.gnu.org; Sun, 25 Feb 2024 10:33:16 -0500 Received: from mailscanner.iro.umontreal.ca ([132.204.25.50]:56206) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1reGV8-0006Bo-5H for 69373@debbugs.gnu.org; Sun, 25 Feb 2024 10:33:14 -0500 Received: from pmg1.iro.umontreal.ca (localhost.localdomain [127.0.0.1]) by pmg1.iro.umontreal.ca (Proxmox) with ESMTP id B4A9C10005D; Sun, 25 Feb 2024 10:32:43 -0500 (EST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=iro.umontreal.ca; s=mail; t=1708875162; bh=upjNZR8V7iX0lCJOIcD5Oz+gefCcomkrWDXSa7uZDbs=; h=From:To:Cc:Subject:In-Reply-To:References:Date:From; b=kI2anyG7jiK/jHfQYl+AouQoUAUEZbFLEGAH17q0LsHjsaDpfINB6Sc3aNo5p5P12 29aHy4Ya2WVdnl9Ub7CpUeR/sh6tMFb1rFUg4LgFlDLcFSpfN9vFzS2g0CAGmw5Ugu JUA4c5wrYo7rJOHC9Ke3Ob5oW09mLRmbX241iUbU2OvFFf4EhWLYdwNbFb7hYKfPQu uHrx+jqZ0TirSx2S+TCX6kbo8Fv4OwZiFLUNyclNAmPTsfDzLuMbbBwHD6mSy7BIKJ R3gO8Sn552WxHp+KhETmxB9B77X0qcpYGzAkXmxurO420YBVw+xQjrPtJWxa3GB2s7 jZOTOP0aFQC4A== Received: from mail01.iro.umontreal.ca (unknown [172.31.2.1]) by pmg1.iro.umontreal.ca (Proxmox) with ESMTP id C14CB10004A; Sun, 25 Feb 2024 10:32:42 -0500 (EST) Received: from alfajor (unknown [45.72.205.238]) by mail01.iro.umontreal.ca (Postfix) with ESMTPSA id 8EA7612068E; Sun, 25 Feb 2024 10:32:42 -0500 (EST) From: Stefan Monnier To: Arash Esbati Subject: Re: bug#69373: 14.0.3; hack-local-variables misbehaves after loading AUCTeX In-Reply-To: (Arash Esbati's message of "Sun, 25 Feb 2024 15:10:56 +0100") Message-ID: References: <87y1b958bd.fsf@hyperspace> Date: Sun, 25 Feb 2024 10:32:40 -0500 User-Agent: Gnus/5.13 (Gnus v5.13) MIME-Version: 1.0 Content-Type: text/plain X-SPAM-INFO: Spam detection results: 0 ALL_TRUSTED -1 Passed through trusted hosts only via SMTP AWL -0.129 Adjusted score from AWL reputation of From: address BAYES_00 -1.9 Bayes spam probability is 0 to 1% DKIM_SIGNED 0.1 Message has a DKIM or DK signature, not necessarily valid DKIM_VALID -0.1 Message has at least one valid DKIM or DK signature DKIM_VALID_AU -0.1 Message has a valid DKIM or DK signature from author's domain DKIM_VALID_EF -0.1 Message has a valid DKIM or DK signature from envelope-from domain T_SCC_BODY_TEXT_LINE -0.01 - X-SPAM-LEVEL: X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 69373 Cc: Tony Zorman via bug-auctex via Bug reporting list for AUCTeX , Tony Zorman , 69373@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) > Thanks for the report. I think this is more an Emacs issue than AUCTeX > and should be assigned/fixed there. Agreed. I think the patch below is needed. Tony, are you able to recompile your own Emacs to test that patch? If so, I'd appreciate if you could try it to confirm that it fixes the problem for you as well. Stefan diff --git a/lisp/files.el b/lisp/files.el index 524385edc84..d1b7ab04b6f 100644 --- a/lisp/files.el +++ b/lisp/files.el @@ -4353,9 +4366,7 @@ hack-one-local-variable ('mode (let ((mode (intern (concat (downcase (symbol-name val)) "-mode")))) - (unless (eq (indirect-function mode) - (indirect-function major-mode)) - (funcall mode)))) + (set-auto-mode-0 mode t))) ('eval (pcase val (`(add-hook ',hook . ,_) (hack-one-local-variable--obsolete hook))) From debbugs-submit-bounces@debbugs.gnu.org Sun Feb 25 11:27:12 2024 Received: (at 69373) by debbugs.gnu.org; 25 Feb 2024 16:27:12 +0000 Received: from localhost ([127.0.0.1]:57335 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1reHLM-00036V-7Q for submit@debbugs.gnu.org; Sun, 25 Feb 2024 11:27:12 -0500 Received: from mout-p-101.mailbox.org ([80.241.56.151]:60410) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1reHLH-00035m-3V for 69373@debbugs.gnu.org; Sun, 25 Feb 2024 11:27:11 -0500 Received: from smtp2.mailbox.org (smtp2.mailbox.org [10.196.197.2]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by mout-p-101.mailbox.org (Postfix) with ESMTPS id 4TjTdS5R2nz9sV5; Sun, 25 Feb 2024 17:26:04 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=mailbox.org; s=mail20150812; t=1708878364; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=i7SxxunULAoC1MR0RuBiBd1J2x8TxgbvMgKsFuUDGbQ=; b=JKY2sVFbS2ZUNnHJ6Qp2JqL6CbQ49I3nMi590BTiV4SW3Y4Ql8SiOINsCo4ia8pPKPJGqO aD+lefJ1JzTsRZd7Vxc3rdeao5W3kerbDioSbP0N1MGpD0vu3N7lxNaSXXYjfcooXJKKTI lt8paAyOmk1RIBP5a8nfdvLnhEUdkNsuOrK3ONya8iMxqyxBEkLZIMsUf3uajDiM1+wrIX mExpWtRIOJnkaVcR8NAeiFs2yynOq/qeTFvSBFc5eSgHG0cfcbq7U+e2LajxMqNSg+0TYy zVqKkY8C9Oz3xQJ82eSKwhEbEVv1DhDsgxSY8tagE/gvRawh5zhsYEQHXtQCiA== From: Tony Zorman To: Stefan Monnier , Arash Esbati Subject: Re: bug#69373: 14.0.3; hack-local-variables misbehaves after loading AUCTeX In-Reply-To: References: <87y1b958bd.fsf@hyperspace> Date: Sun, 25 Feb 2024 17:26:03 +0100 Message-ID: <87o7c45x44.fsf@hyperspace> MIME-Version: 1.0 Content-Type: text/plain X-MBO-RS-META: f9h3oc7oxjhemqnuqbcfhjb1mzgkhhtf X-MBO-RS-ID: 923ec621ade00f39a85 X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 69373 Cc: Tony Zorman via bug-auctex via Bug reporting list for AUCTeX , 69373@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.7 (-) On Sun, Feb 25 2024 10:32, Stefan Monnier wrote: >> Thanks for the report. I think this is more an Emacs issue than AUCTeX >> and should be assigned/fixed there. > > Agreed. > I think the patch below is needed. > Tony, are you able to recompile your own Emacs to test that patch? > If so, I'd appreciate if you could try it to confirm that it fixes the > problem for you as well. Yup, things are working as expected with that patch applied. Thank you! Tony -- Tony Zorman | https://tony-zorman.com/ From debbugs-submit-bounces@debbugs.gnu.org Sun Feb 25 11:57:52 2024 Received: (at 69373-done) by debbugs.gnu.org; 25 Feb 2024 16:57:52 +0000 Received: from localhost ([127.0.0.1]:59244 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1reHp2-0004Ya-5R for submit@debbugs.gnu.org; Sun, 25 Feb 2024 11:57:52 -0500 Received: from mailscanner.iro.umontreal.ca ([132.204.25.50]:28313) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1reHoz-0004Y5-1A for 69373-done@debbugs.gnu.org; Sun, 25 Feb 2024 11:57:50 -0500 Received: from pmg3.iro.umontreal.ca (localhost [127.0.0.1]) by pmg3.iro.umontreal.ca (Proxmox) with ESMTP id 4616C441298; Sun, 25 Feb 2024 11:47:37 -0500 (EST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=iro.umontreal.ca; s=mail; t=1708879655; bh=IjZULQnMnawZkRrX5ymMSYuf1O70j83CFWnaBOji36A=; h=From:To:Cc:Subject:In-Reply-To:References:Date:From; b=gr+L15KZfMf/V9V8unePFLLb1uXm4ENBxoOoaPyWdT0m9Q/SV/22Kojo+iedvEuen i4I78PivOP3oaTFhr+4jOXAv3DzQVmfAgSibD+eaBNzZzC/jIwOrCVi8GwZa0WQpMY HA/xXAgxP7rVCgX9Ik3ltKl9wN2iJMl24rArFt1vi9YnkNDYA2ED6u0OFi/cTgB2Ci 4ObSyLnQxq0YUCbz60AITic2XF3zlxzkLXfh758v9ECrVbbomxzZwz4xI4it4qB+bm jNVeXaq+XiQCkT8c0gY3lQZXsoq82by4AGSpwyFFZmxxABG3wIj32F0XsToq/5Kvdz 8L04j8zIIWmdw== Received: from mail01.iro.umontreal.ca (unknown [172.31.2.1]) by pmg3.iro.umontreal.ca (Proxmox) with ESMTP id 7FD29441275; Sun, 25 Feb 2024 11:47:35 -0500 (EST) Received: from alfajor (unknown [45.72.205.238]) by mail01.iro.umontreal.ca (Postfix) with ESMTPSA id 4B50612064B; Sun, 25 Feb 2024 11:47:35 -0500 (EST) From: Stefan Monnier To: Tony Zorman Subject: Re: bug#69373: 14.0.3; hack-local-variables misbehaves after loading AUCTeX In-Reply-To: <87o7c45x44.fsf@hyperspace> (Tony Zorman's message of "Sun, 25 Feb 2024 17:26:03 +0100") Message-ID: References: <87y1b958bd.fsf@hyperspace> <87o7c45x44.fsf@hyperspace> Date: Sun, 25 Feb 2024 11:47:34 -0500 User-Agent: Gnus/5.13 (Gnus v5.13) MIME-Version: 1.0 Content-Type: text/plain X-SPAM-INFO: Spam detection results: 0 ALL_TRUSTED -1 Passed through trusted hosts only via SMTP AWL -0.001 Adjusted score from AWL reputation of From: address BAYES_00 -1.9 Bayes spam probability is 0 to 1% DKIM_SIGNED 0.1 Message has a DKIM or DK signature, not necessarily valid DKIM_VALID -0.1 Message has at least one valid DKIM or DK signature DKIM_VALID_AU -0.1 Message has a valid DKIM or DK signature from author's domain DKIM_VALID_EF -0.1 Message has a valid DKIM or DK signature from envelope-from domain T_SCC_BODY_TEXT_LINE -0.01 - X-SPAM-LEVEL: X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 69373-done Cc: Tony Zorman via bug-auctex via Bug reporting list for AUCTeX , Arash Esbati , 69373-done@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) > Yup, things are working as expected with that patch applied. Thank you! Great, thank you, pushed. [ That was an oversight from many years ago (until Emacs-28, that code was identical to the body of `set-auto-mode-0` and that was short enough that it wasn't important to use the function) which I failed to noticed when I changed `set-auto-mode-0` for Emacs-29.1. ] Stefan From debbugs-submit-bounces@debbugs.gnu.org Sun Feb 25 12:43:06 2024 Received: (at submit) by debbugs.gnu.org; 25 Feb 2024 17:43:06 +0000 Received: from localhost ([127.0.0.1]:33814 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1reIWo-0006eb-Dy for submit@debbugs.gnu.org; Sun, 25 Feb 2024 12:43:06 -0500 Received: from lists.gnu.org ([209.51.188.17]:47468) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1reIWi-0006dZ-AC for submit@debbugs.gnu.org; Sun, 25 Feb 2024 12:43:01 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1reIA2-0006B9-9s for bug-auctex@gnu.org; Sun, 25 Feb 2024 12:19:34 -0500 Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1reIA2-0004D8-0G; Sun, 25 Feb 2024 12:19:34 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=MIME-Version:Date:References:In-Reply-To:Subject:To: From; bh=sc3OY2eQnxepl/yIEodZMvYVCFaAFKIer+LV33Ni/CU=; b=M91e/VKoQrE/bNwvFiiF Kd041y//tq30u3xr9Lc8Gs7d5Zbi9NeEVZOLy2o8ep6Z+wAWESz0gnZeNYW3U8uRcF21yVCqbHMNZ Wmt9nk5VGgvV4dpSl4EfcTA/q/UNiULxE8O+aXJ+4XN9b9ethMgHMUG9HShXFK4rzEOi0bxJoK4F/ q7UBL7ftlfjtUFR2adYlR7L9L5lHiunuS8a9uibm/gUWTVXz2Rf1n+paHnIB6VdpDfeK4cmv6R86O +DA9fSjlRdBeLdQzozyHxDqnF8KoP8iDxfFvKkVPObDIJT3rYQ9Cg9lEUo5/aiYNWj6T4cqeOYmCN tMJkVo7p4fo7eg==; From: Arash Esbati To: Stefan Monnier Subject: Re: bug#69373: 14.0.3; hack-local-variables misbehaves after loading AUCTeX In-Reply-To: (Stefan Monnier's message of "Sun, 25 Feb 2024 11:47:34 -0500") References: <87y1b958bd.fsf@hyperspace> <87o7c45x44.fsf@hyperspace> Date: Sun, 25 Feb 2024 18:19:29 +0100 Message-ID: User-Agent: Gnus/5.13 (Gnus v5.13) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: submit Cc: Tony Zorman via bug-auctex via Bug reporting list for AUCTeX , Tony Zorman , 69373@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) Stefan Monnier writes: > Great, thank you, pushed. Thanks for the quick fix. Best, Arash From unknown Fri Jun 20 07:15:37 2025 Received: (at fakecontrol) by fakecontrolmessage; To: internal_control@debbugs.gnu.org From: Debbugs Internal Request Subject: Internal Control Message-Id: bug archived. Date: Wed, 27 Mar 2024 11:24:17 +0000 User-Agent: Fakemail v42.6.9 # This is a fake control message. # # The action: # bug archived. thanks # This fakemail brought to you by your local debbugs # administrator