From unknown Thu Aug 14 22:24:17 2025 X-Loop: help-debbugs@gnu.org Subject: bug#71240: Keeping track of class and packages, even w/o options Resent-From: Arash Esbati Original-Sender: "Debbugs-submit" Resent-CC: bug-auctex@gnu.org Resent-Date: Tue, 28 May 2024 10:07:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 71240 X-GNU-PR-Package: auctex X-GNU-PR-Keywords: To: 71240@debbugs.gnu.org X-Debbugs-Original-To: "auctex-bugs" Received: via spool by submit@debbugs.gnu.org id=B.171689079927125 (code B ref -1); Tue, 28 May 2024 10:07:02 +0000 Received: (at submit) by debbugs.gnu.org; 28 May 2024 10:06:39 +0000 Received: from localhost ([127.0.0.1]:45717 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sBtj5-00073Q-8O for submit@debbugs.gnu.org; Tue, 28 May 2024 06:06:39 -0400 Received: from lists.gnu.org ([209.51.188.17]:47750) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sBtj2-00073H-JV for submit@debbugs.gnu.org; Tue, 28 May 2024 06:06:37 -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 1sBtir-0007Bd-MT for bug-auctex@gnu.org; Tue, 28 May 2024 06:06:25 -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 1sBtir-00035y-Dv for bug-auctex@gnu.org; Tue, 28 May 2024 06:06:25 -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=gtZ/vHhU4Yxp+VxAAL6yganNBrp8SSoUwPKk+Nc3IJU=; b=CWJ/iPsvCT8R91 BdZ8+8MIWJuKZlVkYWEdFajRvF/LxrHWjdre02QshJwUzF1z19Lluz/qxQMnQRdxSu6wtnpKv19Yx duWuVtlmWKwGgrIf5ot8nlj2AV02hG9dLhBlRv2xfYmTDs+xpnc6unQI7KBHAzh+5aTcQahZrTW0y NbJ3qtnB6AM/HdIVC+ojn2w7Dk7ECqNZAGHJsHWRQTPG2O45Q1CEJ5f0jY5qdhzR4H7hHh95s7ekw gWQgXStfVkdZCW3YqHGVKNMn+WC5ZaTpABmhF6ogzTlEv7m4EmidsH5o46OShRSGdaxxwpCcPcnSK fMZdyWtYCf+59ypxslEg==; From: Arash Esbati Date: Tue, 28 May 2024 12:06:23 +0200 Message-ID: User-Agent: Gnus/5.13 (Gnus v5.13) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: -2.3 (--) 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 all, currently, AUCTeX keeps track of options given to packages and/or documentclass in `LaTeX-provided-package-options' and `LaTeX-provided-class-options' respectively. No entries are added to the variables if the packages/documentclass are loaded without options. This is Ok in general, but things get complicated when we want to have a style file where both package and class have the same name, e.g.: texmf-dist/tex/latex/standalone/standalone.cls texmf-dist/tex/latex/standalone/standalone.sty We have to cater for different set of macros inside one style, so something like this: (TeX-add-style-hook "standalone" (lambda () ;; standalone.cls (when (assoc "standalone" LaTeX-provided-class-options) (TeX-add-symbols '(...))) ;; standalone.sty (when (assoc "standalone" LaTeX-provided-package-options) ...))) which currently doesn't work because if the package or class are loaded without options. I suggest the following change to `LaTeX-auto-cleanup': --8<---------------cut here---------------start------------->8--- diff --git a/latex.el b/latex.el index d0a9ee6f..8844fdc4 100644 --- a/latex.el +++ b/latex.el @@ -2168,9 +2168,8 @@ TYPE is one of the symbols mac or env." (add-to-list 'TeX-auto-file elt t) ;; Append to `LaTeX-provided-package-options' the name of the ;; package and the options provided to it at load time. - (unless (equal options '("")) - (TeX-add-to-alist 'LaTeX-provided-package-options - (list (cons elt options))))) + (TeX-add-to-alist 'LaTeX-provided-package-options + (list (cons elt options)))) ;; And a special "art10" style file combining style and size. (add-to-list 'TeX-auto-file style t) (add-to-list 'TeX-auto-file @@ -2201,9 +2200,8 @@ TYPE is one of the symbols mac or env." (t "10"))) t) - (unless (equal options '("")) - (TeX-add-to-alist 'LaTeX-provided-class-options - (list (cons style options))))) + (TeX-add-to-alist 'LaTeX-provided-class-options + (list (cons style options)))) ;; The third argument if "class" indicates LaTeX2e features. (cond ((or (string-equal class "class") --8<---------------cut here---------------end--------------->8--- This adds entries like ("package/class" "") to the variables when no options are given, and styles can check against them. WDYT? Best, Arash From unknown Thu Aug 14 22:24:17 2025 X-Loop: help-debbugs@gnu.org Subject: bug#71240: Keeping track of class and packages, even w/o options Resent-From: Ikumi Keita Original-Sender: "Debbugs-submit" Resent-CC: bug-auctex@gnu.org Resent-Date: Sun, 02 Jun 2024 15:23:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 71240 X-GNU-PR-Package: auctex X-GNU-PR-Keywords: To: Arash Esbati Cc: 71240@debbugs.gnu.org Received: via spool by 71240-submit@debbugs.gnu.org id=B71240.171734173031380 (code B ref 71240); Sun, 02 Jun 2024 15:23:02 +0000 Received: (at 71240) by debbugs.gnu.org; 2 Jun 2024 15:22:10 +0000 Received: from localhost ([127.0.0.1]:60155 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sDn2A-0008A4-EC for submit@debbugs.gnu.org; Sun, 02 Jun 2024 11:22:10 -0400 Received: from smtp1a.inetd.co.jp ([210.129.88.11]:40608) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sDn28-00089v-42 for 71240@debbugs.gnu.org; Sun, 02 Jun 2024 11:22:09 -0400 Received: from localhost (42-144-18-247.rev.home.ne.jp [42.144.18.247]) by smtp1a.inetd.co.jp (Postfix) with ESMTPSA id D94E86A; Mon, 3 Jun 2024 00:21:54 +0900 (JST) From: Ikumi Keita In-reply-to: References: Comments: In-reply-to Arash Esbati message dated "Tue, 28 May 2024 12:06:23 +0200." X-Mailer: MH-E 8.6+git; nmh 1.8; Emacs 29.3 MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <7706.1717341712.1@localhost> Date: Mon, 03 Jun 2024 00:21:52 +0900 Message-ID: <7707.1717341712@localhost> X-Spam-Score: 0.0 (/) 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: > This adds entries like ("package/class" "") to the variables when no > options are given, and styles can check against them. > WDYT? I haven't tried it for myself, but I suppose it's a reasonable idea to carry out. Regards, Ikumi Keita #StandWithUkraine #StopWarInUkraine #Gaza #StopMassiveKilling #CeasefireNOW From unknown Thu Aug 14 22:24:17 2025 MIME-Version: 1.0 X-Mailer: MIME-tools 5.505 (Entity 5.505) X-Loop: help-debbugs@gnu.org From: help-debbugs@gnu.org (GNU bug Tracking System) To: Arash Esbati Subject: bug#71240: closed (Re: bug#71240: Keeping track of class and packages, even w/o options) Message-ID: References: X-Gnu-PR-Message: they-closed 71240 X-Gnu-PR-Package: auctex Reply-To: 71240@debbugs.gnu.org Date: Sun, 02 Jun 2024 20:19:02 +0000 Content-Type: multipart/mixed; boundary="----------=_1717359542-10673-1" This is a multi-part message in MIME format... ------------=_1717359542-10673-1 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" Your bug report #71240: Keeping track of class and packages, even w/o options which was filed against the auctex package, has been closed. The explanation is attached below, along with your original report. If you require more details, please reply to 71240@debbugs.gnu.org. --=20 71240: https://debbugs.gnu.org/cgi/bugreport.cgi?bug=3D71240 GNU Bug Tracking System Contact help-debbugs@gnu.org with problems ------------=_1717359542-10673-1 Content-Type: message/rfc822 Content-Disposition: inline Content-Transfer-Encoding: 7bit Received: (at 71240-done) by debbugs.gnu.org; 2 Jun 2024 20:18:23 +0000 Received: from localhost ([127.0.0.1]:37005 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sDrep-0002k3-CK for submit@debbugs.gnu.org; Sun, 02 Jun 2024 16:18:23 -0400 Received: from eggs.gnu.org ([209.51.188.92]:35152) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sDrem-0002jd-W8 for 71240-done@debbugs.gnu.org; Sun, 02 Jun 2024 16:18:22 -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 1sDrLS-0003di-0L; Sun, 02 Jun 2024 15:58:22 -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:References:In-Reply-To:Subject:To: From; bh=nTUHRXPrM7/GgeoUnDJRhMk0bkk4Tql/I1Qn2+CcpeQ=; b=C0q8/dhhm8y9UubFW0qB rq/InDqTpOLGpKR+gGLEVZsMNS65PiNGVjhlmnGZSnvNj7dh5acwQdYcZQlxfUIPj0alDveY7tbIM gx/JJ6r8tFuCt7vwDHJQfZjWl+Bj1Hkds6YCx5xMAnZZPgU7lm8OF/jawV3GDF+PJSOwfc7RSPcEW Y8Y+/XY1TDInsMOZqHFqPncQ3Vu6IJDHwotrNyOfwBhx3h9hDZ9IytXUMtE2X74yx8YcIIEmW6bGe Na+Q5kAUai27Z1W50CfatlTyUpVf1z69rP2yDhsJR/VjcvlmFYDbVm2XJyly5A5Uxus28i8tGGD9m 0pcEFo61HdFpBw==; From: Arash Esbati To: Ikumi Keita Subject: Re: bug#71240: Keeping track of class and packages, even w/o options In-Reply-To: <7707.1717341712@localhost> (Ikumi Keita's message of "Mon, 03 Jun 2024 00:21:52 +0900") References: <7707.1717341712@localhost> Date: Sun, 02 Jun 2024 21:58:14 +0200 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: 71240-done Cc: 71240-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 (---) Ikumi Keita writes: > I haven't tried it for myself, but I suppose it's a reasonable idea to > carry out. Thanks Keita. I installed that change, and therefore closing this report. Best, Arash ------------=_1717359542-10673-1 Content-Type: message/rfc822 Content-Disposition: inline Content-Transfer-Encoding: 7bit Received: (at submit) by debbugs.gnu.org; 28 May 2024 10:06:39 +0000 Received: from localhost ([127.0.0.1]:45717 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sBtj5-00073Q-8O for submit@debbugs.gnu.org; Tue, 28 May 2024 06:06:39 -0400 Received: from lists.gnu.org ([209.51.188.17]:47750) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sBtj2-00073H-JV for submit@debbugs.gnu.org; Tue, 28 May 2024 06:06:37 -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 1sBtir-0007Bd-MT for bug-auctex@gnu.org; Tue, 28 May 2024 06:06:25 -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 1sBtir-00035y-Dv for bug-auctex@gnu.org; Tue, 28 May 2024 06:06:25 -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=gtZ/vHhU4Yxp+VxAAL6yganNBrp8SSoUwPKk+Nc3IJU=; b=CWJ/iPsvCT8R91 BdZ8+8MIWJuKZlVkYWEdFajRvF/LxrHWjdre02QshJwUzF1z19Lluz/qxQMnQRdxSu6wtnpKv19Yx duWuVtlmWKwGgrIf5ot8nlj2AV02hG9dLhBlRv2xfYmTDs+xpnc6unQI7KBHAzh+5aTcQahZrTW0y NbJ3qtnB6AM/HdIVC+ojn2w7Dk7ECqNZAGHJsHWRQTPG2O45Q1CEJ5f0jY5qdhzR4H7hHh95s7ekw gWQgXStfVkdZCW3YqHGVKNMn+WC5ZaTpABmhF6ogzTlEv7m4EmidsH5o46OShRSGdaxxwpCcPcnSK fMZdyWtYCf+59ypxslEg==; From: Arash Esbati To: "auctex-bugs" Subject: Keeping track of class and packages, even w/o options Date: Tue, 28 May 2024 12:06:23 +0200 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 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 all, currently, AUCTeX keeps track of options given to packages and/or documentclass in `LaTeX-provided-package-options' and `LaTeX-provided-class-options' respectively. No entries are added to the variables if the packages/documentclass are loaded without options. This is Ok in general, but things get complicated when we want to have a style file where both package and class have the same name, e.g.: texmf-dist/tex/latex/standalone/standalone.cls texmf-dist/tex/latex/standalone/standalone.sty We have to cater for different set of macros inside one style, so something like this: (TeX-add-style-hook "standalone" (lambda () ;; standalone.cls (when (assoc "standalone" LaTeX-provided-class-options) (TeX-add-symbols '(...))) ;; standalone.sty (when (assoc "standalone" LaTeX-provided-package-options) ...))) which currently doesn't work because if the package or class are loaded without options. I suggest the following change to `LaTeX-auto-cleanup': --8<---------------cut here---------------start------------->8--- diff --git a/latex.el b/latex.el index d0a9ee6f..8844fdc4 100644 --- a/latex.el +++ b/latex.el @@ -2168,9 +2168,8 @@ TYPE is one of the symbols mac or env." (add-to-list 'TeX-auto-file elt t) ;; Append to `LaTeX-provided-package-options' the name of the ;; package and the options provided to it at load time. - (unless (equal options '("")) - (TeX-add-to-alist 'LaTeX-provided-package-options - (list (cons elt options))))) + (TeX-add-to-alist 'LaTeX-provided-package-options + (list (cons elt options)))) ;; And a special "art10" style file combining style and size. (add-to-list 'TeX-auto-file style t) (add-to-list 'TeX-auto-file @@ -2201,9 +2200,8 @@ TYPE is one of the symbols mac or env." (t "10"))) t) - (unless (equal options '("")) - (TeX-add-to-alist 'LaTeX-provided-class-options - (list (cons style options))))) + (TeX-add-to-alist 'LaTeX-provided-class-options + (list (cons style options)))) ;; The third argument if "class" indicates LaTeX2e features. (cond ((or (string-equal class "class") --8<---------------cut here---------------end--------------->8--- This adds entries like ("package/class" "") to the variables when no options are given, and styles can check against them. WDYT? Best, Arash ------------=_1717359542-10673-1--