From unknown Fri Jun 20 07:25:48 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#70807 <70807@debbugs.gnu.org> To: bug#70807 <70807@debbugs.gnu.org> Subject: Status: Resetting *-local variables before parsing Reply-To: bug#70807 <70807@debbugs.gnu.org> Date: Fri, 20 Jun 2025 14:25:48 +0000 retitle 70807 Resetting *-local variables before parsing reassign 70807 auctex submitter 70807 Arash Esbati severity 70807 normal tag 70807 fixed thanks From debbugs-submit-bounces@debbugs.gnu.org Mon May 06 15:10:56 2024 Received: (at submit) by debbugs.gnu.org; 6 May 2024 19:10:56 +0000 Received: from localhost ([127.0.0.1]:39750 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1s43jk-0006B4-77 for submit@debbugs.gnu.org; Mon, 06 May 2024 15:10:56 -0400 Received: from lists.gnu.org ([2001:470:142::17]:60960) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1s43jf-0006Au-Ug for submit@debbugs.gnu.org; Mon, 06 May 2024 15:10:55 -0400 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 1s43jB-000651-93 for bug-auctex@gnu.org; Mon, 06 May 2024 15:10:21 -0400 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 1s43jB-0001rG-0X for bug-auctex@gnu.org; Mon, 06 May 2024 15:10:21 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=MIME-Version:Date:Subject:To:From:in-reply-to: references; bh=CZ5ShrqhvbxDoHkZScdbasgDkaFwyQRSXf0rEAIp4vU=; b=Ppa/gmLV+XRGDa 7hKQXQgb1LJQ3qpOpM+87xb+4f8PtE51x5Bu3mWWI+LnCvntTcG/FVtWfAegz8zk5xhtvu4bermn2 0K8x5DQrXkzkW6DmhHp2+MMmjP2C37iQKbKa/dEV3T5l19qXdFKnmcshOwgIAQV9swxB+dlEzWgGv TC9Zq0A8UydLGIH5pKrEbXKc4bLJnJNBMMi0FD6Fi0pSKiftVPpINjLWvXaRCpC2pVvBDouxceecT XHqHduxYh+XxeMFGXg1gImyZ9N60RIxeT8D6RKZCrQodzLO7zkJJk+Bwt+KQNdxkfAY4puU1gz+io x1MRM5G4C8CyCgZ0GcWA==; From: Arash Esbati To: "auctex-bugs" Subject: Resetting *-local variables before parsing Date: Mon, 06 May 2024 21:10:05 +0200 Message-ID: User-Agent: Gnus/5.13 (Gnus v5.13) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: 0.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: -1.0 (-) Hi all, please save this small file on your HD and call it 'minimal-test.tex'. --8<---------------cut here---------------start------------->8--- \documentclass{article} \begin{document} text body. \end{document} %%% Local Variables: %%% mode: latex %%% TeX-master: t %%% End: --8<---------------cut here---------------end--------------->8--- Now set `TeX-parse-self' to t and open the file, hit 'C-c C-n' and the parsed file 'minimal-test.el' should look like this: --8<---------------cut here---------------start------------->8--- ;; -*- lexical-binding: t; -*- (TeX-add-style-hook "minimal-test" (lambda () (TeX-run-style-hooks "latex2e" "article" "art10")) :latex) --8<---------------cut here---------------end--------------->8--- Now move point into preamble and do C-c C-m usepackage RET hyperref RET RET C-c C-n minimal-test.el should look like this now: --8<---------------cut here---------------start------------->8--- ;; -*- lexical-binding: t; -*- (TeX-add-style-hook "minimal-test" (lambda () (add-to-list 'LaTeX-verbatim-macros-with-braces-local "href") (add-to-list 'LaTeX-verbatim-macros-with-braces-local "hyperimage") (add-to-list 'LaTeX-verbatim-macros-with-braces-local "hyperbaseurl") (add-to-list 'LaTeX-verbatim-macros-with-braces-local "nolinkurl") (add-to-list 'LaTeX-verbatim-macros-with-braces-local "url") (add-to-list 'LaTeX-verbatim-macros-with-braces-local "path") (add-to-list 'LaTeX-verbatim-macros-with-delims-local "path") (TeX-run-style-hooks "latex2e" "article" "art10" "hyperref")) :latex) --8<---------------cut here---------------end--------------->8--- Now comment out the \usepackage{hyperref} and again 'C-c C-n', the file looks like this: --8<---------------cut here---------------start------------->8--- ;; -*- lexical-binding: t; -*- (TeX-add-style-hook "minimal-test" (lambda () (add-to-list 'LaTeX-verbatim-macros-with-braces-local "path") (add-to-list 'LaTeX-verbatim-macros-with-braces-local "url") (add-to-list 'LaTeX-verbatim-macros-with-braces-local "nolinkurl") (add-to-list 'LaTeX-verbatim-macros-with-braces-local "hyperbaseurl") (add-to-list 'LaTeX-verbatim-macros-with-braces-local "hyperimage") (add-to-list 'LaTeX-verbatim-macros-with-braces-local "href") (add-to-list 'LaTeX-verbatim-macros-with-delims-local "path") (TeX-run-style-hooks "latex2e" "article" "art10")) :latex) --8<---------------cut here---------------end--------------->8--- Note how the entry for "hyperref" is gone, but not the add-to-list forms; the value of LaTeX-verbatim-* are not reset. This probably applies for `LaTeX-verbatim-environments-local', but I didn't check. For me, the value of the -local version should be reset somewhere before parsing and running the style hooks again, but I couldn't find an appropriate place. Does this approach make sense? And if yes, any idea where to put the reset? Any comments welcome. Best, Arash From debbugs-submit-bounces@debbugs.gnu.org Sat Feb 22 02:09:42 2025 Received: (at 70807) by debbugs.gnu.org; 22 Feb 2025 07:09:43 +0000 Received: from localhost ([127.0.0.1]:45348 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tljdu-0007pw-Hw for submit@debbugs.gnu.org; Sat, 22 Feb 2025 02:09:42 -0500 Received: from smtp1a.inetd.co.jp ([210.129.88.11]:49876) by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1tljdr-0007pb-J8 for 70807@debbugs.gnu.org; Sat, 22 Feb 2025 02:09:40 -0500 Received: from localhost (42-144-34-247.rev.home.ne.jp [42.144.34.247]) by smtp1a.inetd.co.jp (Postfix) with ESMTPSA id 7B9475C; Sat, 22 Feb 2025 16:09:36 +0900 (JST) From: Ikumi Keita To: Arash Esbati Subject: Re: bug#70807: Resetting *-local variables before parsing In-reply-to: References: Comments: In-reply-to Arash Esbati message dated "Mon, 06 May 2024 21:10:05 +0200." X-Mailer: MH-E 8.6+git; nmh 1.8; Emacs 29.4 MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <24355.1740208175.1@localhost> Date: Sat, 22 Feb 2025 16:09:35 +0900 Message-ID: <24356.1740208175@localhost> X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 70807 Cc: 70807@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.0 (-) Hi Arash, sorry for late respose. >>>>> Arash Esbati writes: > Note how the entry for "hyperref" is gone, but not the add-to-list > forms; the value of LaTeX-verbatim-* are not reset. This probably > applies for `LaTeX-verbatim-environments-local', but I didn't check. > For me, the value of the -local version should be reset somewhere before > parsing and running the style hooks again, but I couldn't find an > appropriate place. Does this approach make sense? And if yes, any idea > where to put the reset? Any comments welcome. I agree that -local variables should be cleared at C-c C-n. My preliminary idea is to record names of such variables in a new internal variable and kill them in `TeX-normal-mode' like (dolist (var TeX-normal-mode-reset-list) (set var nil))) . (Maybe that new variable can be used to simplify `TeX-auto-store'.) Regards, Ikumi Keita #StandWithUkraine #StopWarInUkraine #Gaza #StopMassiveKilling #CeasefireNOW From debbugs-submit-bounces@debbugs.gnu.org Sun Feb 23 10:54:16 2025 Received: (at 70807) by debbugs.gnu.org; 23 Feb 2025 15:54:16 +0000 Received: from localhost ([127.0.0.1]:35619 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tmEJ6-0000TL-0c for submit@debbugs.gnu.org; Sun, 23 Feb 2025 10:54:16 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:44632) by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1tmEJ2-0000T8-Nf for 70807@debbugs.gnu.org; Sun, 23 Feb 2025 10:54:13 -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 1tmEIu-0005IQ-L0; Sun, 23 Feb 2025 10:54:04 -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=uJlTPKSf2ldze+h7DCriv99U04SHZKsVbLUyyrcMrU4=; b=PIiwhKitwXD7SiFDWrRP eEEmqjGL2SWaTjch1P5IARvbQuIex8pPYALAAVbMCg8UtcWzu9daENsulssKCzJKLRSbe/Yg5I+Ec SU+/gK+8GW4BcbJjfQau2TxbO1v7aJ8V5ulN330AE/43KNOY/EBJ5+Xno2XSMp/4loNlL3tNOSOy1 OTq914AgH7dJECIw+pXqUQZv4j7KFm6lfJJ8CcvncyIRklHscmt8HPycEkMpB9nwXHzvyrYrBQPvf g7EiRQCEP7aKW9MieKN/bcjIVC8qMfzK2bd/ZRdUt0hwrTJ8DRxl1hQtDvsqONgrzjKGky3nytB89 RFvzpcmyZU3sIA==; From: Arash Esbati To: Ikumi Keita Subject: Re: bug#70807: Resetting *-local variables before parsing In-Reply-To: <24356.1740208175@localhost> References: <24356.1740208175@localhost> Date: Sun, 23 Feb 2025 16:53:59 +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: 70807 Cc: 70807@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 Keiat, Ikumi Keita writes: > Hi Arash, sorry for late respose. No problem! > I agree that -local variables should be cleared at C-c C-n. My > preliminary idea is to record names of such variables in a new > internal variable and kill them in `TeX-normal-mode' like > (dolist (var TeX-normal-mode-reset-list) > (set var nil))) > . (Maybe that new variable can be used to simplify `TeX-auto-store'.) I did some test with resetting the *-local variables in different places, but none of them was really satisfactory. Doing the reset in `TeX-normal-mode' top-level means that the values are never written back into the parsed-file.el since (TeX-update-style t) comes last in that function. The best thing I can currently come up with is to add those variables to `TeX-normal-mode-reset-list' as well. Any other ideas? Best, Arash From debbugs-submit-bounces@debbugs.gnu.org Mon Feb 24 12:47:29 2025 Received: (at 70807) by debbugs.gnu.org; 24 Feb 2025 17:47:29 +0000 Received: from localhost ([127.0.0.1]:42479 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tmcYD-0006Gw-AM for submit@debbugs.gnu.org; Mon, 24 Feb 2025 12:47:29 -0500 Received: from smtp1a.inetd.co.jp ([210.129.88.11]:54244) by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1tmcYA-0006Gl-F5 for 70807@debbugs.gnu.org; Mon, 24 Feb 2025 12:47:27 -0500 Received: from localhost (42-144-34-247.rev.home.ne.jp [42.144.34.247]) by smtp1a.inetd.co.jp (Postfix) with ESMTPSA id 894465C; Tue, 25 Feb 2025 02:47:23 +0900 (JST) From: Ikumi Keita To: Arash Esbati Subject: Re: bug#70807: Resetting *-local variables before parsing In-reply-to: References: <24356.1740208175@localhost> Comments: In-reply-to Arash Esbati message dated "Sun, 23 Feb 2025 16:53:59 +0100." X-Mailer: MH-E 8.6+git; nmh 1.8; Emacs 29.4 MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <32934.1740419243.1@localhost> Date: Tue, 25 Feb 2025 02:47:23 +0900 Message-ID: <32935.1740419243@localhost> X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 70807 Cc: 70807@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.0 (-) Hi Arash, >>>>> Arash Esbati writes: > I did some test with resetting the *-local variables in different > places, but none of them was really satisfactory. Doing the reset in > `TeX-normal-mode' top-level means that the values are never written back > into the parsed-file.el since > (TeX-update-style t) > comes last in that function. Thanks, now I realize what is difficult. What we are facing is related to this comment in `TeX-run-style-hooks': ;; This happens in case some style added a new parser, and ;; now the style isn't used anymore (user deleted ;; \usepackage{style}). Then we're left over with, e.g., ;; (LaTeX-add-siunitx-units "\\parsec"), but the function is ;; defined in a style siunitx.el that's not loaded anymore. The problem is hard to solve because it is almost impossible for AUCTeX to be aware that the user has deleted or commented out \usepackage :-( ...Hmm, I began to be puzzled. I realize that I'm not sure why we need the entries for `LaTeX-verbatim-macros-with-delims-local' in parsed-file.el. `TeX-run-style-hooks' in the parsed-file.el runs hooks associated with "hyperref", one of which adds various items to -local variables as expected, even for child files which are \include'd or \input'ted. What am I missing? Regards, Ikumi Keita #StandWithUkraine #StopWarInUkraine #Gaza #StopMassiveKilling #CeasefireNOW From debbugs-submit-bounces@debbugs.gnu.org Mon Feb 24 14:40:39 2025 Received: (at 70807) by debbugs.gnu.org; 24 Feb 2025 19:40:39 +0000 Received: from localhost ([127.0.0.1]:42749 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tmeJi-0006bg-TB for submit@debbugs.gnu.org; Mon, 24 Feb 2025 14:40:39 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:59050) by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1tmeJa-0006bJ-9C for 70807@debbugs.gnu.org; Mon, 24 Feb 2025 14:40:31 -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 1tmeJT-0003jy-43; Mon, 24 Feb 2025 14:40:23 -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=Bedg0UEF3EX7rrhjYToRDHhplQ4fXkFaXAUOdK8OU3o=; b=SVoZ1T7kbh6Un74Oz06R 1+BWqWDjWLpYEOSDdvYIneiLbaFHvddjyLG7N5+epamwIhsvgjf7eCnC4qvo1UOOItxWaVyAMMGsm yaNdGhIol3uk03c27E12Gna12PSasJEPZLlScJjMOqEeb1eKzkhOXIIfrobcuSlcO93W72SuFUeJH l7C3+2so28TD8DcDKXmxDfGVourqNOBvFqHw/jeS8pIKS7RmQ3e+dIBSvZ/FRojVQ1lPJdFRfbDis 76OkkcBPrM+wpXzTf69+tzwNlfkhWWb1NHGWlWH7ktsQHnzYHmExBBdsk87E8pvG21Lqsf3IDMqLC fADpfzFC/zte3Q==; From: Arash Esbati To: Ikumi Keita Subject: Re: bug#70807: Resetting *-local variables before parsing In-Reply-To: <32935.1740419243@localhost> References: <24356.1740208175@localhost> <32935.1740419243@localhost> Date: Mon, 24 Feb 2025 20:40:17 +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: 70807 Cc: 70807@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 Keita, Ikumi Keita writes: > Thanks, now I realize what is difficult. What we are facing is related > to this comment in `TeX-run-style-hooks': > ;; This happens in case some style added a new parser, and > ;; now the style isn't used anymore (user deleted > ;; \usepackage{style}). Then we're left over with, e.g., > ;; (LaTeX-add-siunitx-units "\\parsec"), but the function is > ;; defined in a style siunitx.el that's not loaded anymore. > > The problem is hard to solve because it is almost impossible for AUCTeX > to be aware that the user has deleted or commented out \usepackage :-( Thanks. Indeed, AUCTeX will know about a removed \usepackage after the next re-parse, which can be late. > ...Hmm, I began to be puzzled. I realize that I'm not sure why we need > the entries for `LaTeX-verbatim-macros-with-delims-local' in > parsed-file.el. `TeX-run-style-hooks' in the parsed-file.el runs hooks > associated with "hyperref", one of which adds various items to -local > variables as expected, even for child files which are \include'd or > \input'ted. What am I missing? Probably the same bit I'm missing =F0=9F=A7=90 I always wondered why that information is written to a parsed-file.el because of the reasons you mentioned above. Best, Arash From debbugs-submit-bounces@debbugs.gnu.org Thu Feb 27 09:49:47 2025 Received: (at 70807) by debbugs.gnu.org; 27 Feb 2025 14:49:47 +0000 Received: from localhost ([127.0.0.1]:33076 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tnfCo-0005s9-Kt for submit@debbugs.gnu.org; Thu, 27 Feb 2025 09:49:47 -0500 Received: from smtp1a.inetd.co.jp ([210.129.88.11]:35128) by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1tnfCl-0005rO-7E for 70807@debbugs.gnu.org; Thu, 27 Feb 2025 09:49:40 -0500 Received: from localhost (42-144-34-247.rev.home.ne.jp [42.144.34.247]) by smtp1a.inetd.co.jp (Postfix) with ESMTPSA id 0DCB45C; Thu, 27 Feb 2025 23:49:36 +0900 (JST) From: Ikumi Keita To: Arash Esbati Subject: Re: bug#70807: Resetting *-local variables before parsing In-reply-to: References: <24356.1740208175@localhost> <32935.1740419243@localhost> Comments: In-reply-to Arash Esbati message dated "Mon, 24 Feb 2025 20:40:17 +0100." X-Mailer: MH-E 8.6+git; nmh 1.8; Emacs 29.4 MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Date: Thu, 27 Feb 2025 23:49:35 +0900 Message-ID: <49986.1740667775@localhost> X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 70807 Cc: 70807@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.0 (-) Hi Arash, >>>>> Arash Esbati writes: > Ikumi Keita writes: >> ...Hmm, I began to be puzzled. I realize that I'm not sure why we need >> the entries for `LaTeX-verbatim-macros-with-delims-local' in >> parsed-file.el. `TeX-run-style-hooks' in the parsed-file.el runs hooks >> associated with "hyperref", one of which adds various items to -local >> variables as expected, even for child files which are \include'd or >> \input'ted. What am I missing? > Probably the same bit I'm missing =F0=9F=A7=90 I always wondered why that > information is written to a parsed-file.el because of the reasons you > mentioned above. OK, I see. This feature was introduced by this commit: ,---- | d3d05d462afbe69687277f7fc0dd09e6ef2ff113 | Author: Tassilo Horn | AuthorDate: Sat Dec 20 09:10:47 2014 +0100 | Commit: Tassilo Horn | CommitDate: Sat Dec 20 09:10:47 2014 +0100 |=20 | Make some buffer-local vars document-local. |=20 | * tex.el (TeX-auto-store): Write LaTeX-verbatim-*-local variables | to auto file to make them document-local. `---- Tassilo explained the detail in [1]: ,---- | But this only | works in singe-file documents. As soon as you have |=20 | preamble.tex % lots of \newminted defs | main.tex % here the generated environments are used |=20 | where main.tex is the `TeX-master' the declaration that elispcode and | elispcode* are verbatim environments is only available in preamble.tex, | not in the master (or rather the complete doc). `---- minted.el adds new elements to LaTeX-verbatim-*-local variables dynamically based on parsing, in `LaTeX-minted-auto-cleanup' added in `TeX-auto-cleanup-hook'. Hence, without the entries for LaTeX-verbatim-*-local variables in the parsed-file.el, the main file wouldn't know the new verbatim constructs, because in the main.tex buffer, AUCTeX parses only main.tex, not the child preamble.tex. :-( I'll ponder to seek some good idea, but probably I'll fail... [1] https://lists.gnu.org/r/auctex/2014-12/msg00044.html https://lists.gnu.org/r/auctex/2014-12/msg00049.html Regards, Ikumi Keita #StandWithUkraine #StopWarInUkraine #Gaza #StopMassiveKilling #CeasefireNOW From debbugs-submit-bounces@debbugs.gnu.org Fri Feb 28 05:34:10 2025 Received: (at 70807) by debbugs.gnu.org; 28 Feb 2025 10:34:10 +0000 Received: from localhost ([127.0.0.1]:45542 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tnxh3-0006Nk-Kb for submit@debbugs.gnu.org; Fri, 28 Feb 2025 05:34:10 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:54386) by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1tnxh0-0006MW-9J for 70807@debbugs.gnu.org; Fri, 28 Feb 2025 05:34:06 -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 1tnxgs-0003x1-6M; Fri, 28 Feb 2025 05:33:58 -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=gf/Przx9nEhF/DgjBPZCOWazpBlJRkEUKisEnbnrYG8=; b=p5P8y23kesRV1qC5hsb7 Dv8vSNsK4fjffyTh+LRVAQ7qlxRO596GkVXSJ+DCjvpFbwq3Di4yj6EiAYyxguY52RonkmYaqDYTl Lj3fwkWj6hnuZBDzvAmqM3rvuqaqIMX6yRYNLiLTL32csjQHXd07BHSv6auhEUpTLtyNYqSq3Bfd8 YGcpmMPvLdgLOc3jafwAaQczvx+rxHZNO0bk7g1eAu55hqQVeqr8XLURcSvYpKyEZeQPERWxAJgBk ReKiURqOR2yBEzTJ6CRbsQRKmJBGH0be1im2s3LJnvg13+jcouO2BnPuFNlCDvx843QxPUQphPvbJ bJTA28W8CS+sBw==; From: Arash Esbati To: Ikumi Keita Subject: Re: bug#70807: Resetting *-local variables before parsing In-Reply-To: <49986.1740667775@localhost> References: <24356.1740208175@localhost> <32935.1740419243@localhost> <49986.1740667775@localhost> Date: Fri, 28 Feb 2025 11:33:51 +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: 70807 Cc: 70807@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 Keita, Ikumi Keita writes: > OK, I see. This feature was introduced by this commit: > ,---- > | d3d05d462afbe69687277f7fc0dd09e6ef2ff113 > | Author: Tassilo Horn > | AuthorDate: Sat Dec 20 09:10:47 2014 +0100 > | Commit: Tassilo Horn > | CommitDate: Sat Dec 20 09:10:47 2014 +0100 > | > | Make some buffer-local vars document-local. > | > | * tex.el (TeX-auto-store): Write LaTeX-verbatim-*-local variables > | to auto file to make them document-local. > `---- Thanks for digging into this, I see now. > minted.el adds new elements to LaTeX-verbatim-*-local variables > dynamically based on parsing, in `LaTeX-minted-auto-cleanup' added in > `TeX-auto-cleanup-hook'. Hence, without the entries for > LaTeX-verbatim-*-local variables in the parsed-file.el, the main file > wouldn't know the new verbatim constructs, because in the main.tex > buffer, AUCTeX parses only main.tex, not the child preamble.tex. :-( > > I'll ponder to seek some good idea, but probably I'll fail... I'm looking forward to that. I think my current (final) idea is to add those variables to `TeX-normal-mode-reset-list', so they can be reset with 'C-u C-c C-n'. It seems better that what we have right now which is deleting the auto-generated .el file and/or even restarting Emacs. Best, Arash From debbugs-submit-bounces@debbugs.gnu.org Wed Mar 05 05:37:34 2025 Received: (at 70807) by debbugs.gnu.org; 5 Mar 2025 10:37:34 +0000 Received: from localhost ([127.0.0.1]:35659 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tpm86-0007FF-21 for submit@debbugs.gnu.org; Wed, 05 Mar 2025 05:37:34 -0500 Received: from smtp1a.inetd.co.jp ([210.129.88.11]:51130) by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1tpm80-0007Ex-58 for 70807@debbugs.gnu.org; Wed, 05 Mar 2025 05:37:31 -0500 Received: from localhost (42-144-34-247.rev.home.ne.jp [42.144.34.247]) by smtp1a.inetd.co.jp (Postfix) with ESMTPSA id 4B3AC5C; Wed, 5 Mar 2025 19:37:25 +0900 (JST) From: Ikumi Keita To: Arash Esbati Subject: Re: bug#70807: Resetting *-local variables before parsing In-reply-to: References: <24356.1740208175@localhost> <32935.1740419243@localhost> <49986.1740667775@localhost> Comments: In-reply-to Arash Esbati message dated "Fri, 28 Feb 2025 11:33:51 +0100." X-Mailer: MH-E 8.6+git; nmh 1.8; Emacs 29.4 MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <70176.1741171044.1@localhost> Date: Wed, 05 Mar 2025 19:37:24 +0900 Message-ID: <70179.1741171044@localhost> X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 70807 Cc: 70807@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.0 (-) Hi Arash, >>>>> Arash Esbati writes: >> I'll ponder to seek some good idea, but probably I'll fail... > I'm looking forward to that. I think my current (final) idea is to add > those variables to `TeX-normal-mode-reset-list', so they can be reset > with 'C-u C-c C-n'. I didn't come up with a good idea. I agree that your idea is reasonable approach. Regards, Ikumi Keita #StandWithUkraine #StopWarInUkraine #Gaza #StopMassiveKilling #CeasefireNOW From debbugs-submit-bounces@debbugs.gnu.org Thu Mar 06 04:14:21 2025 Received: (at 70807) by debbugs.gnu.org; 6 Mar 2025 09:14:21 +0000 Received: from localhost ([127.0.0.1]:41530 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tq7J7-0006W8-88 for submit@debbugs.gnu.org; Thu, 06 Mar 2025 04:14:21 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:35772) by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1tq7J4-0006Vl-4N; Thu, 06 Mar 2025 04:14:18 -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 1tq7Iv-0007Td-DO; Thu, 06 Mar 2025 04:14:10 -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=bnlRL3lzAu8pWjPTWEvYLdPdIIGkuArG9KG1igr+pFg=; b=qq5lHkjYTAwxSXf/6b0s IdoWxrRMHqMuli+XsUGoSjXd7sBtJLg8MY1YErwRpIx4ACjlZLVxyB3/0Qz8KvjDoD3N+MEaLuF8Y Xl27JNgUoxUiIuIEQcoxTz6VXCy2E1RGA/l+JBNkJi4pBvPyenQnAkTqk2De1pvVsGDpu4Da7ieod eedxoAbMOQ4/6W7iIiNKK78u1luaSeb9bVAZgBt50v2dtATUjFKGsq0OpI/nUFn9rGA1Cbxumph5X KN7qCsY0NROyqAMBpeRmE2UrBb1l6fJdC5ha7Ul4ajZ8Il060E3FBq60VbaPagKEakIr2YVlxZdKe QiUfSh6HX94kmw==; From: Arash Esbati To: Ikumi Keita Subject: Re: bug#70807: Resetting *-local variables before parsing In-Reply-To: <70179.1741171044@localhost> References: <24356.1740208175@localhost> <32935.1740419243@localhost> <49986.1740667775@localhost> <70179.1741171044@localhost> Date: Thu, 06 Mar 2025 10:14:06 +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: 70807 Cc: 70807@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 (---) tags 70807 fixed close 70807 14.1.0 thanks Hi Keita, Ikumi Keita writes: > I didn't come up with a good idea. I agree that your idea is reasonable > approach. Thanks for looking at this issue again. I installed that change with commit 0718ac55, therefore closing this report. Best, Arash From unknown Fri Jun 20 07:25:48 2025 Received: (at fakecontrol) by fakecontrolmessage; To: internal_control@debbugs.gnu.org From: Debbugs Internal Request Subject: Internal Control Message-Id: bug archived. Date: Thu, 03 Apr 2025 11:24:05 +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