From unknown Sat Jun 21 10:17:19 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#23329 <23329@debbugs.gnu.org> To: bug#23329 <23329@debbugs.gnu.org> Subject: Status: 11.89; Unloading tex-site doesn't restore original functionality Reply-To: bug#23329 <23329@debbugs.gnu.org> Date: Sat, 21 Jun 2025 17:17:19 +0000 retitle 23329 11.89; Unloading tex-site doesn't restore original functional= ity reassign 23329 auctex submitter 23329 Ikumi Keita severity 23329 normal thanks From debbugs-submit-bounces@debbugs.gnu.org Thu Apr 21 10:25:34 2016 Received: (at submit) by debbugs.gnu.org; 21 Apr 2016 14:25:34 +0000 Received: from localhost ([127.0.0.1]:42460 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1atFXy-0003DT-3T for submit@debbugs.gnu.org; Thu, 21 Apr 2016 10:25:34 -0400 Received: from eggs.gnu.org ([208.118.235.92]:37515) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1atFXw-0003DG-9p for submit@debbugs.gnu.org; Thu, 21 Apr 2016 10:25:33 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1atFXp-0004r6-L0 for submit@debbugs.gnu.org; Thu, 21 Apr 2016 10:25:27 -0400 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=0.8 required=5.0 tests=BAYES_50 autolearn=disabled version=3.3.2 Received: from lists.gnu.org ([2001:4830:134:3::11]:48043) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1atFXp-0004r2-HY for submit@debbugs.gnu.org; Thu, 21 Apr 2016 10:25:25 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:56702) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1atFXo-0005Zu-02 for bug-auctex@gnu.org; Thu, 21 Apr 2016 10:25:25 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1atFXk-0004pu-OR for bug-auctex@gnu.org; Thu, 21 Apr 2016 10:25:23 -0400 Received: from ofb25.esk.m4.zaq.ne.jp ([220.152.48.24]:60452) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1atFXk-0004pg-BY for bug-auctex@gnu.org; Thu, 21 Apr 2016 10:25:20 -0400 Received: from omx22.esk.m4.zaq.ne.jp ([220.152.49.33] [220.152.49.33]) by omx22.esk.m4.zaq.ne.jp with ESMTP id <20160421142512153.QQJF.8366.omx22.esk.m4.zaq.ne.jp@omx22.esk.m4.zaq.ne.jp> for ; Thu, 21 Apr 2016 23:25:12 +0900 Received: from smtpa22.esk.m4.zaq.ne.jp ([42.144.27.116] [42.144.27.116]) by smtpa22.esk.m4.zaq.ne.jp with ESMTP id <20160421142512104.MGCU.9411.smtpa22.esk.m4.zaq.ne.jp@smtpa22.esk.m4.zaq.ne.jp> for ; Thu, 21 Apr 2016 23:25:12 +0900 Received: from localhost (localhost [127.0.0.1]) by freebsd.vmware (Postfix) with ESMTP id CCA35139800 for ; Thu, 21 Apr 2016 23:25:11 +0900 (JST) To: bug-auctex@gnu.org Subject: 11.89; Unloading tex-site doesn't restore original functionality X-Mailer: MH-E 8.6; MH 6.8.4.JP-3.05; GNU Emacs 24.5.1 Date: Thu, 21 Apr 2016 23:25:11 +0900 Message-ID: <18668.1461248711@localhost> From: Ikumi Keita X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x X-Received-From: 2001:4830:134:3::11 X-Spam-Score: -4.0 (----) 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: -4.0 (----) Remember to cover the basics, that is, what you expected to happen and what in fact did happen. Be sure to consult the FAQ section in the manual before submitting a bug report. In addition check if the bug is reproducable with an up-to-date version of AUCTeX. So please upgrade to the version available from http://www.gnu.org/software/auctex/ if your installation is older than the one available from the web site. If the bug is triggered by a specific (La)TeX file, you should try to produce a minimal sample file showing the problem and include it in your report. Your report will be posted for the auctex package at the GNU bug tracker. Visit http://debbugs.gnu.org/cgi/pkgreport.cgi?pkg=auctex to browse existing AUCTeX bugs. ------------------------------------------------------------------------ Unloading tex-site doesn't restore the functionality of the original tex-mode. [How to reproduce] 1. Start a new emacs session. 2. M-x unload-feature RET tex-site RET 3. C-x C-f /tmp/abc.tex RET 4. I expect abc.tex is opened with the original, emacs built-in tex-mode. However, emacs reports that "File mode specification error: (void-function TeX-tex-mode)" Even if I replace ~/.emacs/init.el with a file of only a line (load "auctex.el" nil t t) , nothing changes. If I set `debug-on-error' to t before the item 3 of the above list, the following backtrace is displayed. Apparently overriding advice still remains. vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv Debugger entered--Lisp error: (void-function TeX-tex-mode) TeX-tex-mode() apply(TeX-tex-mode nil) tex-mode() set-auto-mode-0(tex-mode nil) set-auto-mode() normal-mode(t) after-find-file(t t) find-file-noselect-1(# "/tmp/abc.tex" nil nil "/tmp/abc.tex" nil) find-file-noselect("/tmp/abc.tex" nil nil t) find-file("/tmp/abc.tex" t) call-interactively(find-file nil nil) command-execute(find-file) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ Emacs : GNU Emacs 24.5.1 (x86_64-unknown-freebsd10.3, GTK+ Version 3.18.8) of 2016-04-08 on freebsd.vmware Package: 11.89 current state: ============== (setq AUCTeX-date "2015-11-13" window-system 'x LaTeX-version "2e" TeX-style-path '("/usr/local/var/auctex" "/usr/local/share/emacs/site-lisp/auctex/style" "/home/keita/.emacs.d/auctex/auto" "/home/keita/.emacs.d/auctex/style" "auto" "style") TeX-auto-save nil TeX-parse-self t TeX-master t TeX-command-list '(("jTeX" "%(PDF)jtex %`%S%(PDFout)%(mode)%' %t" TeX-run-TeX nil (plain-tex-mode) :help "Run NTT jTeX") ("jLaTeX" "%(PDF)jlatex %`%S%(PDFout)%(mode)%' %t" TeX-run-TeX nil (latex-mode) :help "Run NTT jLaTeX") ("pTeX" "%(PDF)ptex %(kanjiopt)%`%S%(PDFout)%(mode)%' %t" TeX-run-TeX nil (plain-tex-mode) :help "Run ASCII pTeX") ("pLaTeX" "%(PDF)platex %(kanjiopt)%`%S%(PDFout)%(mode)%' %t" TeX-run-TeX nil (latex-mode) :help "Run ASCII pLaTeX") ("Mendex" "mendex %(mendexkopt)%s" TeX-run-command nil t :help "Create index file with mendex") ("jBibTeX" "jbibtex %s" TeX-run-BibTeX nil t :help "Run jBibTeX") ("pBibTeX" "pbibtex %(kanjiopt)%s" TeX-run-BibTeX nil t :help "Run pBibTeX") ("-" "" ignore nil t) ("TeX" "%(PDF)%(tex) %(file-line-error) %(extraopts) %`%S%(PDFout)%(mode)%' %t" TeX-run-TeX nil (plain-tex-mode ams-tex-mode texinfo-mode) :help "Run plain TeX") ("LaTeX" "%`%l%(mode)%' %t" TeX-run-TeX nil (latex-mode doctex-mode) :help "Run LaTeX") ("Makeinfo" "makeinfo %(extraopts) %t" TeX-run-compile nil (texinfo-mode) :help "Run Makeinfo with Info output") ("Makeinfo HTML" "makeinfo %(extraopts) --html %t" TeX-run-compile nil (texinfo-mode) :help "Run Makeinfo with HTML output") ("AmSTeX" "amstex %(PDFout) %(extraopts) %`%S%(mode)%' %t" TeX-run-TeX nil (ams-tex-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) %s" TeX-run-BibTeX nil t :help "Run BibTeX") ("Biber" "biber %s" TeX-run-Biber nil t :help "Run Biber") ("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 t :help "Generate PostScript file") ("Dvips" "%(o?)dvips %d -o %f " TeX-run-dvips nil t :help "Convert DVI file to PostScript") ("Dvipdfmx" "dvipdfmx %d" TeX-run-dvipdfmx nil t :help "Convert DVI file to PDF with dvipdfmx") ("Ps2pdf" "ps2pdf %f" TeX-run-ps2pdf nil t :help "Convert PostScript file to PDF") ("Index" "%(makeindex) %s" TeX-run-index nil t :help "Run makeindex to create index file") ("Xindy" "texindy %s" TeX-run-command nil t :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-function nil t :help "Spell-check the document") ("Clean" "TeX-clean" TeX-run-function nil t :help "Delete 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 arbitrary command") ) ) From debbugs-submit-bounces@debbugs.gnu.org Thu Apr 21 12:23:33 2016 Received: (at 23329) by debbugs.gnu.org; 21 Apr 2016 16:23:33 +0000 Received: from localhost ([127.0.0.1]:42537 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1atHO8-0007p5-OM for submit@debbugs.gnu.org; Thu, 21 Apr 2016 12:23:33 -0400 Received: from eggs.gnu.org ([208.118.235.92]:41680) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1atHO6-0007op-BA for 23329@debbugs.gnu.org; Thu, 21 Apr 2016 12:23:30 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1atHNu-0004eE-Ot for 23329@debbugs.gnu.org; Thu, 21 Apr 2016 12:23:25 -0400 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=-0.2 required=5.0 tests=BAYES_50,RP_MATCHES_RCVD autolearn=disabled version=3.3.2 Received: from fencepost.gnu.org ([2001:4830:134:3::e]:40632) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1atHNu-0004di-Dp for 23329@debbugs.gnu.org; Thu, 21 Apr 2016 12:23:18 -0400 Received: from mail-wm0-f41.google.com ([74.125.82.41]:36228) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_ARCFOUR_SHA1:128) (Exim 4.82) (envelope-from ) id 1atHNs-0001os-Kz for 23329@debbugs.gnu.org; Thu, 21 Apr 2016 12:23:16 -0400 Received: by mail-wm0-f41.google.com with SMTP id v188so251631625wme.1 for <23329@debbugs.gnu.org>; Thu, 21 Apr 2016 09:23:16 -0700 (PDT) X-Gm-Message-State: AOPr4FX3nDIh1sbbbpH+fDHxDl2COXmrIncgaVYNpx1oAjhnMgwiTT/KL57akuEVDNcUGGcu3D0bpRUJjlB8Tg== X-Received: by 10.28.27.87 with SMTP id b84mr4573354wmb.7.1461255795509; Thu, 21 Apr 2016 09:23:15 -0700 (PDT) MIME-Version: 1.0 Received: by 10.28.93.129 with HTTP; Thu, 21 Apr 2016 09:22:35 -0700 (PDT) In-Reply-To: <18668.1461248711@localhost> References: <18668.1461248711@localhost> From: =?UTF-8?Q?Mos=C3=A8_Giordano?= Date: Thu, 21 Apr 2016 18:22:35 +0200 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: bug#23329: 11.89; Unloading tex-site doesn't restore original functionality To: Ikumi Keita Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 2001:4830:134:3::e X-Spam-Score: -6.0 (------) X-Debbugs-Envelope-To: 23329 Cc: 23329@debbugs.gnu.org, emacs-devel@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: -6.0 (------) Dear Emacs developers, it has been reported that unloading AUCTeX (M-x unload-feature RET tex-site RET) doesn't work in Emacs 24: https://debbugs.gnu.org/cgi/bugreport.cgi?bug=3D23329 I tested on fencepost and noted that it works with Emacs 22 and 23, instead. tex-site.el defines `tex-site-unload-hook' which looks into `after-load-alist' to remove AUCTeX settings (it looks for `TeX-modes-set' function), but in Emacs 24 `after-load-alist' seems to have changed and there is no reference to `TeX-modes-set' anymore. Do you have any idea how to unload AUCTeX in Emacs 24? Thanks, Mos=C3=A8 2016-04-21 16:25 GMT+02:00 Ikumi Keita : > > Remember to cover the basics, that is, what you expected to happen and > what in fact did happen. > > Be sure to consult the FAQ section in the manual before submitting > a bug report. In addition check if the bug is reproducable with an > up-to-date version of AUCTeX. So please upgrade to the version > available from http://www.gnu.org/software/auctex/ if your > installation is older than the one available from the web site. > > If the bug is triggered by a specific (La)TeX file, you should try > to produce a minimal sample file showing the problem and include it > in your report. > > Your report will be posted for the auctex package at the GNU bug > tracker. Visit http://debbugs.gnu.org/cgi/pkgreport.cgi?pkg=3Dauctex > to browse existing AUCTeX bugs. > ------------------------------------------------------------------------ > > Unloading tex-site doesn't restore the functionality of the original > tex-mode. > > [How to reproduce] > 1. Start a new emacs session. > 2. M-x unload-feature RET tex-site RET > 3. C-x C-f /tmp/abc.tex RET > 4. I expect abc.tex is opened with the original, emacs built-in > tex-mode. However, emacs reports that "File mode specification error: > (void-function TeX-tex-mode)" > > Even if I replace ~/.emacs/init.el with a file of only a line > (load "auctex.el" nil t t) > , nothing changes. > > If I set `debug-on-error' to t before the item 3 of the above list, the > following backtrace is displayed. Apparently overriding advice still > remains. > vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv > Debugger entered--Lisp error: (void-function TeX-tex-mode) > TeX-tex-mode() > apply(TeX-tex-mode nil) > tex-mode() > set-auto-mode-0(tex-mode nil) > set-auto-mode() > normal-mode(t) > after-find-file(t t) > find-file-noselect-1(# "/tmp/abc.tex" nil nil "/tmp/abc= .tex" nil) > find-file-noselect("/tmp/abc.tex" nil nil t) > find-file("/tmp/abc.tex" t) > call-interactively(find-file nil nil) > command-execute(find-file) > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ > > Emacs : GNU Emacs 24.5.1 (x86_64-unknown-freebsd10.3, GTK+ Version 3.18.= 8) > of 2016-04-08 on freebsd.vmware > Package: 11.89 > > current state: > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D > (setq > AUCTeX-date "2015-11-13" > window-system 'x > LaTeX-version "2e" > TeX-style-path '("/usr/local/var/auctex" > "/usr/local/share/emacs/site-lisp/auctex/style" > "/home/keita/.emacs.d/auctex/auto" > "/home/keita/.emacs.d/auctex/style" "auto" "style") > TeX-auto-save nil > TeX-parse-self t > TeX-master t > TeX-command-list '(("jTeX" "%(PDF)jtex %`%S%(PDFout)%(mode)%' %t" TeX-ru= n-TeX > nil (plain-tex-mode) :help "Run NTT jTeX") > ("jLaTeX" "%(PDF)jlatex %`%S%(PDFout)%(mode)%' %t" > TeX-run-TeX nil (latex-mode) :help "Run NTT jLaTeX") > ("pTeX" "%(PDF)ptex %(kanjiopt)%`%S%(PDFout)%(mode)%'= %t" > TeX-run-TeX nil (plain-tex-mode) :help "Run ASCII pT= eX") > ("pLaTeX" > "%(PDF)platex %(kanjiopt)%`%S%(PDFout)%(mode)%' %t" > TeX-run-TeX nil (latex-mode) :help "Run ASCII pLaTeX= ") > ("Mendex" "mendex %(mendexkopt)%s" TeX-run-command ni= l t > :help "Create index file with mendex") > ("jBibTeX" "jbibtex %s" TeX-run-BibTeX nil t :help > "Run jBibTeX") > ("pBibTeX" "pbibtex %(kanjiopt)%s" TeX-run-BibTeX nil= t > :help "Run pBibTeX") > ("-" "" ignore nil t) > ("TeX" > "%(PDF)%(tex) %(file-line-error) %(extraopts) %`%S%(= PDFout)%(mode)%' %t" > TeX-run-TeX nil > (plain-tex-mode ams-tex-mode texinfo-mode) :help > "Run plain TeX") > ("LaTeX" "%`%l%(mode)%' %t" TeX-run-TeX nil > (latex-mode doctex-mode) :help "Run LaTeX") > ("Makeinfo" "makeinfo %(extraopts) %t" TeX-run-compil= e nil > (texinfo-mode) :help "Run Makeinfo with Info output"= ) > ("Makeinfo HTML" "makeinfo %(extraopts) --html %t" > TeX-run-compile nil (texinfo-mode) :help > "Run Makeinfo with HTML output") > ("AmSTeX" "amstex %(PDFout) %(extraopts) %`%S%(mode)%= ' %t" > TeX-run-TeX nil (ams-tex-mode) :help "Run AMSTeX") > ("ConTeXt" > "%(cntxcom) --once --texutil %(extraopts) %(execopts= )%t" > TeX-run-TeX nil (context-mode) :help "Run ConTeXt on= ce") > ("ConTeXt Full" "%(cntxcom) %(extraopts) %(execopts)%= t" > TeX-run-TeX nil (context-mode) :help > "Run ConTeXt until completion") > ("BibTeX" "%(bibtex) %s" TeX-run-BibTeX nil t :help > "Run BibTeX") > ("Biber" "biber %s" TeX-run-Biber nil t :help "Run Bi= ber") > ("View" "%V" TeX-run-discard-or-function t t :help > "Run Viewer") > ("Print" "%p" TeX-run-command t t :help "Print the fi= le") > ("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 t :hel= p > "Generate PostScript file") > ("Dvips" "%(o?)dvips %d -o %f " TeX-run-dvips nil t := help > "Convert DVI file to PostScript") > ("Dvipdfmx" "dvipdfmx %d" TeX-run-dvipdfmx nil t :hel= p > "Convert DVI file to PDF with dvipdfmx") > ("Ps2pdf" "ps2pdf %f" TeX-run-ps2pdf nil t :help > "Convert PostScript file to PDF") > ("Index" "%(makeindex) %s" TeX-run-index nil t :help > "Run makeindex to create index file") > ("Xindy" "texindy %s" TeX-run-command nil t :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 > "Delete 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 arbitrary command") > ) > ) > > > > _______________________________________________ > bug-auctex mailing list > bug-auctex@gnu.org > https://lists.gnu.org/mailman/listinfo/bug-auctex > From debbugs-submit-bounces@debbugs.gnu.org Fri Apr 22 02:50:07 2016 Received: (at 23329) by debbugs.gnu.org; 22 Apr 2016 06:50:07 +0000 Received: from localhost ([127.0.0.1]:42831 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1atUuk-0004zp-No for submit@debbugs.gnu.org; Fri, 22 Apr 2016 02:50:06 -0400 Received: from omx24.esk.m4.zaq.ne.jp ([220.152.48.13]:54839) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1atUui-0004zD-D7 for 23329@debbugs.gnu.org; Fri, 22 Apr 2016 02:50:05 -0400 Received: from omx24.esk.m4.zaq.ne.jp ([220.152.49.29] [220.152.49.29]) by omx24.esk.m4.zaq.ne.jp with ESMTP id <20160422064957455.VHAO.6308.omx24.esk.m4.zaq.ne.jp@omx24.esk.m4.zaq.ne.jp>; Fri, 22 Apr 2016 15:49:57 +0900 Received: from smtpa13.esk.m4.zaq.ne.jp ([42.144.27.116] [42.144.27.116]) by smtpa13.esk.m4.zaq.ne.jp with ESMTP id <20160422064957410.NTLO.22905.smtpa13.esk.m4.zaq.ne.jp@smtpa13.esk.m4.zaq.ne.jp>; Fri, 22 Apr 2016 15:49:57 +0900 Received: from localhost (localhost [127.0.0.1]) by freebsd.vmware (Postfix) with ESMTP id 348AC139800; Fri, 22 Apr 2016 15:49:57 +0900 (JST) To: =?UTF-8?Q?Mos=C3=A8_Giordano?= Subject: Re: bug#23329: 11.89; Unloading tex-site doesn't restore original functionality In-reply-to: Your message of "Thu\, 21 Apr 2016 18\:22\:35 +0200." X-Mailer: MH-E 8.6; MH 6.8.4.JP-3.05; GNU Emacs 24.5.1 MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" Date: Fri, 22 Apr 2016 15:49:57 +0900 Message-ID: <29887.1461307797@localhost> From: Ikumi Keita X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 23329 Cc: 23329@debbugs.gnu.org, emacs-devel@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: 0.0 (/) --=-=-= Content-Type: text/plain Hi all, > tex-site.el defines `tex-site-unload-hook' which looks into > `after-load-alist' to remove AUCTeX settings (it looks for > `TeX-modes-set' function), but in Emacs 24 `after-load-alist' seems to > have changed and there is no reference to `TeX-modes-set' anymore. Do > you have any idea how to unload AUCTeX in Emacs 24? I think I have figured out why `unload-feature' doesn't work well. The story is as follows. If `advice-add' is available, tex-site.el uses `advice-add' on the original tex modes and doesn't touch `after-load-alist'. The advices are added through the defcustom of `TeX-modes' when tex-site.el is loaded, because it has the line :set 'TeX-modes-set . Thus `tex-site-unload-hook' should remove these advices when `advice-add' is available. I confirmed that the attached crude workaround makes unloading tex-site to work as expected. Regards, Ikumi Keita --=-=-= Content-Type: text/x-diff Content-Disposition: attachment; filename=remove-advices Content-Description: quick workaround diff -r 26f0a318aedb -r 125674651465 tex-site.el.in --- a/tex-site.el.in Tue Jun 03 14:10:34 2014 +0900 +++ b/tex-site.el.in Fri Apr 22 15:22:33 2016 +0900 @@ -87,6 +87,8 @@ (add-hook 'tex-site-unload-hook (lambda () + (if (fboundp 'advice-add) + (TeX-modes-set 'TeX-modes nil) (let ((list after-load-alist)) (while list ;; Adapted copy of the definition of `assq-delete-all' @@ -101,7 +103,7 @@ (eq (car (car tail)) key)) (setq alist (delq (car tail) alist))) (setq tail (cdr tail)))) - (setq list (cdr list)))) + (setq list (cdr list))))) (setq load-path (delq TeX-lisp-directory load-path)))) (defun TeX-modes-set (var value &optional update) --=-=-=-- From debbugs-submit-bounces@debbugs.gnu.org Fri Apr 22 08:05:35 2016 Received: (at submit) by debbugs.gnu.org; 22 Apr 2016 12:05:35 +0000 Received: from localhost ([127.0.0.1]:42988 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1atZq3-0005nk-Dz for submit@debbugs.gnu.org; Fri, 22 Apr 2016 08:05:35 -0400 Received: from eggs.gnu.org ([208.118.235.92]:47363) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1atZq1-0005nY-TO for submit@debbugs.gnu.org; Fri, 22 Apr 2016 08:05:34 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1atZps-0006c0-4m for submit@debbugs.gnu.org; Fri, 22 Apr 2016 08:05:28 -0400 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=0.8 required=5.0 tests=BAYES_00,FSL_HELO_BARE_IP_2, RCVD_NUMERIC_HELO autolearn=disabled version=3.3.2 Received: from lists.gnu.org ([2001:4830:134:3::11]:54528) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1atZps-0006bw-1W for submit@debbugs.gnu.org; Fri, 22 Apr 2016 08:05:24 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:38301) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1atZpr-00013F-4L for bug-auctex@gnu.org; Fri, 22 Apr 2016 08:05:23 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1atZpm-0006b7-5V for bug-auctex@gnu.org; Fri, 22 Apr 2016 08:05:23 -0400 Received: from plane.gmane.org ([80.91.229.3]:41078) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1atZpl-0006b1-VL for bug-auctex@gnu.org; Fri, 22 Apr 2016 08:05:18 -0400 Received: from list by plane.gmane.org with local (Exim 4.69) (envelope-from ) id 1atZpj-0003cU-H4 for bug-auctex@gnu.org; Fri, 22 Apr 2016 14:05:15 +0200 Received: from 45.72.141.36 ([45.72.141.36]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Fri, 22 Apr 2016 14:05:15 +0200 Received: from monnier by 45.72.141.36 with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Fri, 22 Apr 2016 14:05:15 +0200 X-Injected-Via-Gmane: http://gmane.org/ To: bug-auctex@gnu.org From: Stefan Monnier Subject: Re: bug#23329: 11.89; Unloading tex-site doesn't restore original functionality Date: Fri, 22 Apr 2016 07:56:00 -0400 Lines: 8 Message-ID: References: <18668.1461248711@localhost> <29887.1461307797@localhost> Mime-Version: 1.0 Content-Type: text/plain X-Complaints-To: usenet@ger.gmane.org X-Gmane-NNTP-Posting-Host: 45.72.141.36 User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.1.50 (gnu/linux) Cancel-Lock: sha1:WB1oEUKjouPXM2L0AIYU2xSoDUs= X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x X-Received-From: 2001:4830:134:3::11 X-Spam-Score: -1.7 (-) X-Debbugs-Envelope-To: submit Cc: emacs-devel@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.2 (---) > I confirmed that the attached crude workaround makes unloading tex-site > to work as expected. Actually, can't the tex-site-unload-hook just always call (TeX-modes-set 'TeX-modes nil)? Stefan From debbugs-submit-bounces@debbugs.gnu.org Sat Apr 23 12:53:42 2016 Received: (at 23329-done) by debbugs.gnu.org; 23 Apr 2016 16:53:42 +0000 Received: from localhost ([127.0.0.1]:44231 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1au0oQ-0008HO-HD for submit@debbugs.gnu.org; Sat, 23 Apr 2016 12:53:42 -0400 Received: from eggs.gnu.org ([208.118.235.92]:43385) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1au0oP-0008H9-0k for 23329-done@debbugs.gnu.org; Sat, 23 Apr 2016 12:53:41 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1au0oE-0005hb-Au for 23329-done@debbugs.gnu.org; Sat, 23 Apr 2016 12:53:35 -0400 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=-0.2 required=5.0 tests=BAYES_50,RP_MATCHES_RCVD autolearn=disabled version=3.3.2 Received: from fencepost.gnu.org ([2001:4830:134:3::e]:46523) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1au0oE-0005hN-8O for 23329-done@debbugs.gnu.org; Sat, 23 Apr 2016 12:53:30 -0400 Received: from mail-wm0-f46.google.com ([74.125.82.46]:36052) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_ARCFOUR_SHA1:128) (Exim 4.82) (envelope-from ) id 1au0oD-0003bz-Qk for 23329-done@debbugs.gnu.org; Sat, 23 Apr 2016 12:53:30 -0400 Received: by mail-wm0-f46.google.com with SMTP id v188so53029484wme.1 for <23329-done@debbugs.gnu.org>; Sat, 23 Apr 2016 09:53:29 -0700 (PDT) X-Gm-Message-State: AOPr4FU5nu5pBoTrqVcWKwRWam+3P92VK6wvoUnxos2wL7xestzPa4yvPyE4RBJLch0CysF37CYSOCaqWMPIAg== X-Received: by 10.194.59.108 with SMTP id y12mr24849055wjq.63.1461430408754; Sat, 23 Apr 2016 09:53:28 -0700 (PDT) MIME-Version: 1.0 Received: by 10.28.93.129 with HTTP; Sat, 23 Apr 2016 09:52:49 -0700 (PDT) In-Reply-To: References: <29887.1461307797@localhost> <18668.1461248711@localhost> From: =?UTF-8?Q?Mos=C3=A8_Giordano?= Date: Sat, 23 Apr 2016 18:52:49 +0200 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: bug#23329: 11.89; Unloading tex-site doesn't restore original functionality To: Stefan Monnier Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 2001:4830:134:3::e X-Spam-Score: -4.4 (----) X-Debbugs-Envelope-To: 23329-done Cc: Ikumi Keita , 23329-done@debbugs.gnu.org, emacs-devel@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: -4.4 (----) Hi Stefan, 2016-04-22 13:56 GMT+02:00 Stefan Monnier : >> I confirmed that the attached crude workaround makes unloading tex-site >> to work as expected. > > Actually, can't the tex-site-unload-hook just always call (TeX-modes-set > 'TeX-modes nil)? No, it doesn't work, I just tested on Emacs 22-24. Only the change suggested by Ikumi works across all Emacs versions. I installed his patch and I'm closing the issue, thanks for your help anyway. Bye, Mos=C3=A8 From unknown Sat Jun 21 10:17:19 2025 Received: (at fakecontrol) by fakecontrolmessage; To: internal_control@debbugs.gnu.org From: Debbugs Internal Request Subject: Internal Control Message-Id: bug archived. Date: Sun, 22 May 2016 11:24:04 +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