From unknown Sun Jun 22 07:52:21 2025 X-Loop: help-debbugs@gnu.org Subject: bug#48012: 13.0.8; subscripts and superscripts not parsed correctly if there are underscores outside of math mode Resent-From: Todor Tsankov Original-Sender: "Debbugs-submit" Resent-CC: bug-auctex@gnu.org Resent-Date: Sun, 25 Apr 2021 08:49:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 48012 X-GNU-PR-Package: auctex X-GNU-PR-Keywords: To: 48012@debbugs.gnu.org X-Debbugs-Original-To: bug-auctex@gnu.org Received: via spool by submit@debbugs.gnu.org id=B.16193404906399 (code B ref -1); Sun, 25 Apr 2021 08:49:02 +0000 Received: (at submit) by debbugs.gnu.org; 25 Apr 2021 08:48:10 +0000 Received: from localhost ([127.0.0.1]:41961 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1laaR0-0001f8-7Q for submit@debbugs.gnu.org; Sun, 25 Apr 2021 04:48:10 -0400 Received: from lists.gnu.org ([209.51.188.17]:34580) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1laaQy-0001f0-Ht for submit@debbugs.gnu.org; Sun, 25 Apr 2021 04:48:08 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:41720) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1laaQy-000294-08 for bug-auctex@gnu.org; Sun, 25 Apr 2021 04:48:08 -0400 Received: from smtpng3.m.smailru.net ([94.100.177.149]:56236) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1laaQv-0004C6-8n for bug-auctex@gnu.org; Sun, 25 Apr 2021 04:48:07 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=mail.ru; s=mail3; h=Content-Transfer-Encoding:Content-Type:MIME-Version:Date:Message-ID:From:Subject:To:From:Subject:Content-Type:Content-Transfer-Encoding:To:Cc; bh=jGE32Q0B43d/9X0X7qrzw6lWnSsx6Cx1d5IW7AvAW7g=; b=E6dX5GNsMeM3yPHkI5xFDrkYLMxcqAGXQKueIwoCFbKucC/3DHyxjLbUdSHMkvynpBRqVH5j9/hK7NvOMdZSxboldjCvzAiEXygCA2WsAwEDR5deJM3zcJUUmFUV2kUuFNS3VCkhPm+94Oac018zoKp7TTzUcMf//v0HfcvgdNo=; Received: by smtpng3.m.smailru.net with esmtpa (envelope-from ) id 1laaQo-00054Z-J9 for bug-auctex@gnu.org; Sun, 25 Apr 2021 11:47:59 +0300 From: Todor Tsankov Message-ID: <6ec25009-5c13-028e-f6fb-92c505b43b27@mail.ru> Date: Sun, 25 Apr 2021 10:47:57 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.9.0 MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit Authentication-Results: smtpng3.m.smailru.net; auth=pass smtp.auth=tt.debian@mail.ru smtp.mailfrom=tt.debian@mail.ru X-7564579A: B8F34718100C35BD X-77F55803: 4F1203BC0FB41BD9203E2ABA940B7548CA3406377FA04A72641288DF385C0094182A05F53808504038E6ADF0F402D75C6A056379B74FD47F46B6BEAA6AD3017E2466D0BACF7A52C0 X-7FA49CB5: FF5795518A3D127A4AD6D5ED66289B5278DA827A17800CE77BF46084C0059042EA1F7E6F0F101C67BD4B6F7A4D31EC0BCC500DACC3FED6E28638F802B75D45FF8AA50765F790063771C846A5973DEE7E8638F802B75D45FF914D58D5BE9E6BC1A93B80C6DEB9DEE97C6FB206A91F05B28BF732BBA023F948DEC120EBEC2695E1E5D25F19253116ADD2E47CDBA5A96583C09775C1D3CA48CFCF36E64A7E3F8E58117882F4460429724CE54428C33FAD30A8DF7F3B2552694AC26CFBAC0749D213D2E47CDBA5A9658378DA827A17800CE70F3DDF2BBF19B93A9FA2833FD35BB23DF004C906525384302BEBFE083D3B9BA71A620F70A64A45A98AA50765F79006372E808ACE2090B5E1725E5C173C3A84C3C5EA940A35A165FF2DBA43225CD8A89F783D6DB41994EC49262FEC7FBD7D1F5BB5C8C57E37DE458BEDA766A37F9254B7 X-C1DE0DAB: C20DE7B7AB408E4181F030C43753B8186998911F362727C414F749A5E30D975CB6E146CBBBB42ED6CE92C75AB4AA4378A59A0343F80BD6FB9C2B6934AE262D3EE7EAB7254005DCEDFB21A5296C2FA8A492E1F3B950BCE21616EB5DE968479BF5B2CF3E77A3BD9B2CBDC6A1CF3F042BAD6DF99611D93F60EF197FFA0EFC27E0ACDC48ACC2A39D04F89CDFB48F4795C241BDAD6C7F3747799A X-C8649E89: 4E36BF7865823D7055A7F0CF078B5EC49A30900B95165D34ECB3E21D3CD9CB4FF4C9EBFE683A096E96FCCFD37EAC362B0581D6DA4241A42580FAFAB00215C6691D7E09C32AA3244C4DC4EACBBD19686662E10AB78DA12D495595C85A795C7BAE3EB3F6AD6EA9203E X-D57D3AED: 3ZO7eAau8CL7WIMRKs4sN3D3tLDjz0dLbV79QFUyzQ2Ujvy7cMT6pYYqY16iZVKkSc3dCLJ7zSJH7+u4VD18S7Vl4ZUrpaVfd2+vE6kuoey4m4VkSEu530nj6fImhcD4MUrOEAnl0W826KZ9Q+tr5ycPtXkTV4k65bRjmOUUP8cvGozZ33TWg5HZplvhhXbhDGzqmQDTd6OAevLeAnq3Ra9uf7zvY2zzsIhlcp/Y7m53TZgf2aB4JOg4gkr2bioj08M52wfuxcH4XjkEOVPq3w== X-Mailru-Sender: 689FA8AB762F73936BC43F508A063822A86515858730EA18B24A9CC59405F1931646EBDE42D3894B78BE569BC5BE87F41D988CFDBCA51818ACA15A9D01AF375D2426A9611C05C7F96D641EACA40F3D86221F13F98F33C7E30D4ABDE8C577C2ED X-Mras: Ok Received-SPF: pass client-ip=94.100.177.149; envelope-from=tt.debian@mail.ru; helo=smtpng3.m.smailru.net X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 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, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H3=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-Spam-Score: -1.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: -2.3 (--) Dear Maintainers, I am using font-latex-fontify-script set to invisible in order to hide _ and ^ in math expressions. Unfortunately, AucTeX fails to correctly parse the file if there are underscores in the document outside of math mode (for example, in labels or comments). Here are two examples: \documentclass{article} \begin{document} \begin{equation} \label{eq_1} x_0 \end{equation} \end{document} \documentclass{article} \begin{document} \begin{equation} % y_0 x_0 \end{equation} \end{document} For me, AucTeX displays the underscore in x_0 despite the font-latex-fontify-script option. The second one is more problematic because it is quite common to comment out LaTeX code with a lot of subscripts and superscripts. This also leads to inconsistent fontification in large files. Thank you for maintaining AucTeX. Best wishes, Todor Emacs : GNU Emacs 27.1 (build 1, x86_64-pc-linux-gnu, GTK+ Version 3.24.24, cairo version 1.16.0) of 2021-03-28, modified by Debian Package: 13.0.8 current state: ============== (setq AUCTeX-date "2021-04-18" window-system 'x LaTeX-version "2e" TeX-style-path '("~/.emacs.d/auctex" "/home/todor/.emacs.d/elpa/auctex-13.0.8/style" "/home/todor/.emacs.d/auctex/auto" "/home/todor/.emacs.d/auctex/style" "auto" "style") TeX-auto-save nil 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 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) %(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 (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 %(O?aux)" TeX-run-BibTeX nil (plain-tex-mode latex-mode doctex-mode ams-tex-mode texinfo-mode context-mode) :help "Run BibTeX") ("Biber" "biber %s %(output-dir)" TeX-run-Biber nil (plain-tex-mode latex-mode doctex-mode ams-tex-mode texinfo-mode) :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 (plain-tex-mode latex-mode doctex-mode ams-tex-mode texinfo-mode) :help "Generate PostScript file") ("Dvips" "%(o?)dvips %d -o %f " TeX-run-dvips nil (plain-tex-mode latex-mode doctex-mode ams-tex-mode texinfo-mode) :help "Convert DVI file to PostScript") ("Dvipdfmx" "dvipdfmx %d -o %(O?pdf)" TeX-run-dvipdfmx nil (plain-tex-mode latex-mode doctex-mode ams-tex-mode texinfo-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 ams-tex-mode texinfo-mode) :help "Convert PostScript file to PDF") ("Glossaries" "makeglossaries %(O?aux)" TeX-run-command nil (plain-tex-mode latex-mode doctex-mode ams-tex-mode texinfo-mode) :help "Run makeglossaries to create glossary\n file") ("Index" "makeindex %(O?idx)" TeX-run-index nil (plain-tex-mode latex-mode doctex-mode ams-tex-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 ams-tex-mode texinfo-mode) :help "Run upmendex to create index file") ("Xindy" "texindy %s" TeX-run-command nil (plain-tex-mode latex-mode doctex-mode ams-tex-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-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 unknown Sun Jun 22 07:52:21 2025 X-Loop: help-debbugs@gnu.org Subject: bug#48012: 13.0.8; subscripts and superscripts not parsed correctly if there are underscores outside of math mode Resent-From: Tassilo Horn Original-Sender: "Debbugs-submit" Resent-CC: bug-auctex@gnu.org Resent-Date: Sun, 25 Apr 2021 09:39:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 48012 X-GNU-PR-Package: auctex X-GNU-PR-Keywords: To: Todor Tsankov Cc: 48012@debbugs.gnu.org, 48012-done@debbugs.gnu.org X-Debbugs-Original-Cc: bug-auctex@gnu.org, 48012-done@debbugs.gnu.org Received: via spool by submit@debbugs.gnu.org id=B.161934352811144 (code B ref -1); Sun, 25 Apr 2021 09:39:01 +0000 Received: (at submit) by debbugs.gnu.org; 25 Apr 2021 09:38:48 +0000 Received: from localhost ([127.0.0.1]:42013 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1labE0-0002tg-5E for submit@debbugs.gnu.org; Sun, 25 Apr 2021 05:38:48 -0400 Received: from lists.gnu.org ([209.51.188.17]:43646) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1labDy-0002tY-5D for submit@debbugs.gnu.org; Sun, 25 Apr 2021 05:38:46 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:47222) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1labDx-0008MP-Uo for bug-auctex@gnu.org; Sun, 25 Apr 2021 05:38:45 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]:34669) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1labDw-0000VJ-Up; Sun, 25 Apr 2021 05:38:44 -0400 Received: from auth1-smtp.messagingengine.com ([66.111.4.227]:57053) by fencepost.gnu.org with esmtpsa (TLS1.2:DHE_RSA_AES_256_CBC_SHA256:256) (Exim 4.82) (envelope-from ) id 1labDw-00074w-Jz; Sun, 25 Apr 2021 05:38:44 -0400 Received: from compute4.internal (compute4.nyi.internal [10.202.2.44]) by mailauth.nyi.internal (Postfix) with ESMTP id 3FCF927C0054; Sun, 25 Apr 2021 05:38:44 -0400 (EDT) Received: from mailfrontend2 ([10.202.2.163]) by compute4.internal (MEProxy); Sun, 25 Apr 2021 05:38:44 -0400 X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeduledrvdduiedgudekucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucenucfjughrpehffgfhvffuffgjkfggtgesthdtre dttdertdenucfhrhhomhepvfgrshhsihhlohcujfhorhhnuceothhsughhsehgnhhurdho rhhgqeenucggtffrrghtthgvrhhnpeevveeikeetkeeviefgfeffiedvteeguddvffeuue duveegtddthedvhfeuveffhfenucfkphepkeejrdduieefrdefuddrudehgeenucevlhhu shhtvghrufhiiigvpedtnecurfgrrhgrmhepmhgrihhlfhhrohhmpehthhhorhhnodhmvg hsmhhtphgruhhthhhpvghrshhonhgrlhhithihqdekieejfeekjeekgedqieefhedvleek qdhtshguhheppehgnhhurdhorhhgsehfrghsthhmrghilhdrfhhm X-ME-Proxy: Received: from thinkpad-t440p (p57a31f9a.dip0.t-ipconnect.de [87.163.31.154]) by mail.messagingengine.com (Postfix) with ESMTPA id 598261080063; Sun, 25 Apr 2021 05:38:43 -0400 (EDT) References: <6ec25009-5c13-028e-f6fb-92c505b43b27@mail.ru> User-agent: mu4e 1.5.12; emacs 28.0.50 From: Tassilo Horn Date: Sun, 25 Apr 2021 11:36:31 +0200 In-reply-to: <6ec25009-5c13-028e-f6fb-92c505b43b27@mail.ru> Message-ID: <87zgxmk8kf.fsf@gnu.org> 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 (---) Todor Tsankov via bug-auctex via Bug reporting list for AUCTeX writes: Hi Todor, > I am using font-latex-fontify-script set to invisible in order to hide > _ and ^ in math expressions. Unfortunately, AucTeX fails to correctly > parse the file if there are underscores in the document outside of > math mode (for example, in labels or comments). Thanks for the good bug report. I could easily reproduce the problem and fix it (in git master). I'll make a new ELPA release ASAP. Bye, Tassilo From unknown Sun Jun 22 07:52:21 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: Todor Tsankov Subject: bug#48012: closed (Re: bug#48012: 13.0.8; subscripts and superscripts not parsed correctly if there are underscores outside of math mode) Message-ID: References: <87zgxmk8kf.fsf@gnu.org> <6ec25009-5c13-028e-f6fb-92c505b43b27@mail.ru> X-Gnu-PR-Message: they-closed 48012 X-Gnu-PR-Package: auctex Reply-To: 48012@debbugs.gnu.org Date: Sun, 25 Apr 2021 09:39:02 +0000 Content-Type: multipart/mixed; boundary="----------=_1619343542-11184-1" This is a multi-part message in MIME format... ------------=_1619343542-11184-1 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" Your bug report #48012: 13.0.8; subscripts and superscripts not parsed correctly if there a= re underscores outside of math mode 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 48012@debbugs.gnu.org. --=20 48012: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=3D48012 GNU Bug Tracking System Contact help-debbugs@gnu.org with problems ------------=_1619343542-11184-1 Content-Type: message/rfc822 Content-Disposition: inline Content-Transfer-Encoding: 7bit Received: (at 48012-done) by debbugs.gnu.org; 25 Apr 2021 09:38:52 +0000 Received: from localhost ([127.0.0.1]:42016 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1labE4-0002tw-CP for submit@debbugs.gnu.org; Sun, 25 Apr 2021 05:38:52 -0400 Received: from eggs.gnu.org ([209.51.188.92]:38946) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1labE2-0002tX-UQ for 48012-done@debbugs.gnu.org; Sun, 25 Apr 2021 05:38:51 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]:34669) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1labDw-0000VJ-Up; Sun, 25 Apr 2021 05:38:44 -0400 Received: from auth1-smtp.messagingengine.com ([66.111.4.227]:57053) by fencepost.gnu.org with esmtpsa (TLS1.2:DHE_RSA_AES_256_CBC_SHA256:256) (Exim 4.82) (envelope-from ) id 1labDw-00074w-Jz; Sun, 25 Apr 2021 05:38:44 -0400 Received: from compute4.internal (compute4.nyi.internal [10.202.2.44]) by mailauth.nyi.internal (Postfix) with ESMTP id 3FCF927C0054; Sun, 25 Apr 2021 05:38:44 -0400 (EDT) Received: from mailfrontend2 ([10.202.2.163]) by compute4.internal (MEProxy); Sun, 25 Apr 2021 05:38:44 -0400 X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeduledrvdduiedgudekucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucenucfjughrpehffgfhvffuffgjkfggtgesthdtre dttdertdenucfhrhhomhepvfgrshhsihhlohcujfhorhhnuceothhsughhsehgnhhurdho rhhgqeenucggtffrrghtthgvrhhnpeevveeikeetkeeviefgfeffiedvteeguddvffeuue duveegtddthedvhfeuveffhfenucfkphepkeejrdduieefrdefuddrudehgeenucevlhhu shhtvghrufhiiigvpedtnecurfgrrhgrmhepmhgrihhlfhhrohhmpehthhhorhhnodhmvg hsmhhtphgruhhthhhpvghrshhonhgrlhhithihqdekieejfeekjeekgedqieefhedvleek qdhtshguhheppehgnhhurdhorhhgsehfrghsthhmrghilhdrfhhm X-ME-Proxy: Received: from thinkpad-t440p (p57a31f9a.dip0.t-ipconnect.de [87.163.31.154]) by mail.messagingengine.com (Postfix) with ESMTPA id 598261080063; Sun, 25 Apr 2021 05:38:43 -0400 (EDT) References: <6ec25009-5c13-028e-f6fb-92c505b43b27@mail.ru> User-agent: mu4e 1.5.12; emacs 28.0.50 From: Tassilo Horn To: Todor Tsankov Subject: Re: bug#48012: 13.0.8; subscripts and superscripts not parsed correctly if there are underscores outside of math mode Date: Sun, 25 Apr 2021 11:36:31 +0200 In-reply-to: <6ec25009-5c13-028e-f6fb-92c505b43b27@mail.ru> Message-ID: <87zgxmk8kf.fsf@gnu.org> MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 48012-done Cc: bug-auctex@gnu.org, 48012-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 (---) Todor Tsankov via bug-auctex via Bug reporting list for AUCTeX writes: Hi Todor, > I am using font-latex-fontify-script set to invisible in order to hide > _ and ^ in math expressions. Unfortunately, AucTeX fails to correctly > parse the file if there are underscores in the document outside of > math mode (for example, in labels or comments). Thanks for the good bug report. I could easily reproduce the problem and fix it (in git master). I'll make a new ELPA release ASAP. Bye, Tassilo ------------=_1619343542-11184-1 Content-Type: message/rfc822 Content-Disposition: inline Content-Transfer-Encoding: 7bit Received: (at submit) by debbugs.gnu.org; 25 Apr 2021 08:48:10 +0000 Received: from localhost ([127.0.0.1]:41961 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1laaR0-0001f8-7Q for submit@debbugs.gnu.org; Sun, 25 Apr 2021 04:48:10 -0400 Received: from lists.gnu.org ([209.51.188.17]:34580) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1laaQy-0001f0-Ht for submit@debbugs.gnu.org; Sun, 25 Apr 2021 04:48:08 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:41720) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1laaQy-000294-08 for bug-auctex@gnu.org; Sun, 25 Apr 2021 04:48:08 -0400 Received: from smtpng3.m.smailru.net ([94.100.177.149]:56236) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1laaQv-0004C6-8n for bug-auctex@gnu.org; Sun, 25 Apr 2021 04:48:07 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=mail.ru; s=mail3; h=Content-Transfer-Encoding:Content-Type:MIME-Version:Date:Message-ID:From:Subject:To:From:Subject:Content-Type:Content-Transfer-Encoding:To:Cc; bh=jGE32Q0B43d/9X0X7qrzw6lWnSsx6Cx1d5IW7AvAW7g=; b=E6dX5GNsMeM3yPHkI5xFDrkYLMxcqAGXQKueIwoCFbKucC/3DHyxjLbUdSHMkvynpBRqVH5j9/hK7NvOMdZSxboldjCvzAiEXygCA2WsAwEDR5deJM3zcJUUmFUV2kUuFNS3VCkhPm+94Oac018zoKp7TTzUcMf//v0HfcvgdNo=; Received: by smtpng3.m.smailru.net with esmtpa (envelope-from ) id 1laaQo-00054Z-J9 for bug-auctex@gnu.org; Sun, 25 Apr 2021 11:47:59 +0300 To: bug-auctex@gnu.org Subject: 13.0.8; subscripts and superscripts not parsed correctly if there are underscores outside of math mode From: Todor Tsankov Message-ID: <6ec25009-5c13-028e-f6fb-92c505b43b27@mail.ru> Date: Sun, 25 Apr 2021 10:47:57 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.9.0 MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit Authentication-Results: smtpng3.m.smailru.net; auth=pass smtp.auth=tt.debian@mail.ru smtp.mailfrom=tt.debian@mail.ru X-7564579A: B8F34718100C35BD X-77F55803: 4F1203BC0FB41BD9203E2ABA940B7548CA3406377FA04A72641288DF385C0094182A05F53808504038E6ADF0F402D75C6A056379B74FD47F46B6BEAA6AD3017E2466D0BACF7A52C0 X-7FA49CB5: FF5795518A3D127A4AD6D5ED66289B5278DA827A17800CE77BF46084C0059042EA1F7E6F0F101C67BD4B6F7A4D31EC0BCC500DACC3FED6E28638F802B75D45FF8AA50765F790063771C846A5973DEE7E8638F802B75D45FF914D58D5BE9E6BC1A93B80C6DEB9DEE97C6FB206A91F05B28BF732BBA023F948DEC120EBEC2695E1E5D25F19253116ADD2E47CDBA5A96583C09775C1D3CA48CFCF36E64A7E3F8E58117882F4460429724CE54428C33FAD30A8DF7F3B2552694AC26CFBAC0749D213D2E47CDBA5A9658378DA827A17800CE70F3DDF2BBF19B93A9FA2833FD35BB23DF004C906525384302BEBFE083D3B9BA71A620F70A64A45A98AA50765F79006372E808ACE2090B5E1725E5C173C3A84C3C5EA940A35A165FF2DBA43225CD8A89F783D6DB41994EC49262FEC7FBD7D1F5BB5C8C57E37DE458BEDA766A37F9254B7 X-C1DE0DAB: C20DE7B7AB408E4181F030C43753B8186998911F362727C414F749A5E30D975CB6E146CBBBB42ED6CE92C75AB4AA4378A59A0343F80BD6FB9C2B6934AE262D3EE7EAB7254005DCEDFB21A5296C2FA8A492E1F3B950BCE21616EB5DE968479BF5B2CF3E77A3BD9B2CBDC6A1CF3F042BAD6DF99611D93F60EF197FFA0EFC27E0ACDC48ACC2A39D04F89CDFB48F4795C241BDAD6C7F3747799A X-C8649E89: 4E36BF7865823D7055A7F0CF078B5EC49A30900B95165D34ECB3E21D3CD9CB4FF4C9EBFE683A096E96FCCFD37EAC362B0581D6DA4241A42580FAFAB00215C6691D7E09C32AA3244C4DC4EACBBD19686662E10AB78DA12D495595C85A795C7BAE3EB3F6AD6EA9203E X-D57D3AED: 3ZO7eAau8CL7WIMRKs4sN3D3tLDjz0dLbV79QFUyzQ2Ujvy7cMT6pYYqY16iZVKkSc3dCLJ7zSJH7+u4VD18S7Vl4ZUrpaVfd2+vE6kuoey4m4VkSEu530nj6fImhcD4MUrOEAnl0W826KZ9Q+tr5ycPtXkTV4k65bRjmOUUP8cvGozZ33TWg5HZplvhhXbhDGzqmQDTd6OAevLeAnq3Ra9uf7zvY2zzsIhlcp/Y7m53TZgf2aB4JOg4gkr2bioj08M52wfuxcH4XjkEOVPq3w== X-Mailru-Sender: 689FA8AB762F73936BC43F508A063822A86515858730EA18B24A9CC59405F1931646EBDE42D3894B78BE569BC5BE87F41D988CFDBCA51818ACA15A9D01AF375D2426A9611C05C7F96D641EACA40F3D86221F13F98F33C7E30D4ABDE8C577C2ED X-Mras: Ok Received-SPF: pass client-ip=94.100.177.149; envelope-from=tt.debian@mail.ru; helo=smtpng3.m.smailru.net X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 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, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H3=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 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 (--) Dear Maintainers, I am using font-latex-fontify-script set to invisible in order to hide _ and ^ in math expressions. Unfortunately, AucTeX fails to correctly parse the file if there are underscores in the document outside of math mode (for example, in labels or comments). Here are two examples: \documentclass{article} \begin{document} \begin{equation} \label{eq_1} x_0 \end{equation} \end{document} \documentclass{article} \begin{document} \begin{equation} % y_0 x_0 \end{equation} \end{document} For me, AucTeX displays the underscore in x_0 despite the font-latex-fontify-script option. The second one is more problematic because it is quite common to comment out LaTeX code with a lot of subscripts and superscripts. This also leads to inconsistent fontification in large files. Thank you for maintaining AucTeX. Best wishes, Todor Emacs : GNU Emacs 27.1 (build 1, x86_64-pc-linux-gnu, GTK+ Version 3.24.24, cairo version 1.16.0) of 2021-03-28, modified by Debian Package: 13.0.8 current state: ============== (setq AUCTeX-date "2021-04-18" window-system 'x LaTeX-version "2e" TeX-style-path '("~/.emacs.d/auctex" "/home/todor/.emacs.d/elpa/auctex-13.0.8/style" "/home/todor/.emacs.d/auctex/auto" "/home/todor/.emacs.d/auctex/style" "auto" "style") TeX-auto-save nil 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 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) %(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 (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 %(O?aux)" TeX-run-BibTeX nil (plain-tex-mode latex-mode doctex-mode ams-tex-mode texinfo-mode context-mode) :help "Run BibTeX") ("Biber" "biber %s %(output-dir)" TeX-run-Biber nil (plain-tex-mode latex-mode doctex-mode ams-tex-mode texinfo-mode) :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 (plain-tex-mode latex-mode doctex-mode ams-tex-mode texinfo-mode) :help "Generate PostScript file") ("Dvips" "%(o?)dvips %d -o %f " TeX-run-dvips nil (plain-tex-mode latex-mode doctex-mode ams-tex-mode texinfo-mode) :help "Convert DVI file to PostScript") ("Dvipdfmx" "dvipdfmx %d -o %(O?pdf)" TeX-run-dvipdfmx nil (plain-tex-mode latex-mode doctex-mode ams-tex-mode texinfo-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 ams-tex-mode texinfo-mode) :help "Convert PostScript file to PDF") ("Glossaries" "makeglossaries %(O?aux)" TeX-run-command nil (plain-tex-mode latex-mode doctex-mode ams-tex-mode texinfo-mode) :help "Run makeglossaries to create glossary\n file") ("Index" "makeindex %(O?idx)" TeX-run-index nil (plain-tex-mode latex-mode doctex-mode ams-tex-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 ams-tex-mode texinfo-mode) :help "Run upmendex to create index file") ("Xindy" "texindy %s" TeX-run-command nil (plain-tex-mode latex-mode doctex-mode ams-tex-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-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")) ) ------------=_1619343542-11184-1--