From unknown Fri Jun 20 18:07:18 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#62997 <62997@debbugs.gnu.org> To: bug#62997 <62997@debbugs.gnu.org> Subject: Status: 13.1.10; LaTeX-xparse-macro-parse in xparse.el fails when opening a LaTeX file Reply-To: bug#62997 <62997@debbugs.gnu.org> Date: Sat, 21 Jun 2025 01:07:18 +0000 retitle 62997 13.1.10; LaTeX-xparse-macro-parse in xparse.el fails when ope= ning a LaTeX file reassign 62997 auctex submitter 62997 Yuki Nishida severity 62997 normal thanks From debbugs-submit-bounces@debbugs.gnu.org Fri Apr 21 11:04:47 2023 Received: (at submit) by debbugs.gnu.org; 21 Apr 2023 15:04:47 +0000 Received: from localhost ([127.0.0.1]:40937 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ppsJa-00038t-Hh for submit@debbugs.gnu.org; Fri, 21 Apr 2023 11:04:47 -0400 Received: from lists.gnu.org ([209.51.188.17]:36602) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ppnZF-0003kl-S9 for submit@debbugs.gnu.org; Fri, 21 Apr 2023 06:00:38 -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 1ppnZF-0004wp-Aw for bug-auctex@gnu.org; Fri, 21 Apr 2023 06:00:37 -0400 Received: from www3186.sakura.ne.jp ([49.212.207.226]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1ppnZC-0007tc-QD for bug-auctex@gnu.org; Fri, 21 Apr 2023 06:00:37 -0400 Received: from fsav115.sakura.ne.jp (fsav115.sakura.ne.jp [27.133.134.242]) by www3186.sakura.ne.jp (8.16.1/8.16.1) with ESMTP id 33LA0Rh2071762 for ; Fri, 21 Apr 2023 19:00:27 +0900 (JST) (envelope-from nishida@rsworks.jp) Received: from www3186.sakura.ne.jp (49.212.207.226) by fsav115.sakura.ne.jp (F-Secure/fsigk_smtp/550/fsav115.sakura.ne.jp); Fri, 21 Apr 2023 19:00:27 +0900 (JST) X-Virus-Status: clean(F-Secure/fsigk_smtp/550/fsav115.sakura.ne.jp) Received: from smtpclient.apple (nat-12.kuins.kyoto-u.ac.jp [133.3.201.140] (may be forged)) (authenticated bits=0) by www3186.sakura.ne.jp (8.16.1/8.16.1) with ESMTPSA id 33LA0QQX071752 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO) for ; Fri, 21 Apr 2023 19:00:27 +0900 (JST) (envelope-from nishida@rsworks.jp) From: Yuki Nishida Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Mime-Version: 1.0 (Mac OS X Mail 16.0 \(3696.120.41.1.1\)) Subject: 13.1.10; LaTeX-xparse-macro-parse in xparse.el fails when opening a LaTeX file Message-Id: <7D9C4164-FE16-477B-B097-E90C6B80D44C@rsworks.jp> Date: Fri, 21 Apr 2023 19:00:26 +0900 To: bug-auctex@gnu.org X-Mailer: Apple Mail (2.3696.120.41.1.1) Received-SPF: pass client-ip=49.212.207.226; envelope-from=nishida@rsworks.jp; helo=www3186.sakura.ne.jp X-Spam_score_int: -18 X-Spam_score: -1.9 X-Spam_bar: - X-Spam_report: (-1.9 / 5.0 requ) BAYES_00=-1.9, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no X-Spam_action: no action X-Spam-Score: -1.3 (-) X-Debbugs-Envelope-To: submit X-Mailman-Approved-At: Fri, 21 Apr 2023 11:04:44 -0400 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 (--) In a particular environment, opening a LaTeX file for the first time = fails with the *Backtrace* buffer that says LaTeX-xparse-macro-parse = fails with (scan-error =E2=80=9CUnbalanced parentheses=E2=80=9D ...) It seems to be caused by an xparse macro definition containing '(' as a = token in an argument's specification like: \NewDocumentCommand\FOO{>{\SplitArgument{1}{(}}m} I suspect the implementation interprets '(}' as balanced parentheses and = causes the scan-error. Best regards, Yuki Emacs : GNU Emacs 28.2 (build 1, x86_64-apple-darwin18.7.0, NS = appkit-1671.60 Version 10.14.6 (Build 18G95)) of 2022-09-13 Package: 13.1.10 current state: =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D (setq AUCTeX-date "2023-03-05" window-system 'ns LaTeX-version "2e" TeX-style-path '("/usr/local/var/auctex" = "/Users/nishida/.emacs.d/elpa/auctex-13.1.10/style" "/Users/nishida/.emacs.d/auctex/auto" = "/Users/nishida/.emacs.d/auctex/style" "auto" "style") TeX-auto-save t TeX-parse-self t TeX-master nil TeX-command-list '(("Latexmk" "latexmk %t" TeX-run-TeX nil (latex-mode) = :help "Run Latexmk") ("Make" "make -j" TeX-run-TeX nil t) ("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 %(output-dir) %s" TeX-run-Biber nil (plain-tex-mode latex-mode doctex-mode ams-tex-mode = texinfo-mode) :help "Run Biber") ("Texindex" "texindex %s.??" TeX-run-command nil = (texinfo-mode) :help "Run Texindex") ("Texi2dvi" "%(PDF)texi2dvi %t" TeX-run-command nil = (texinfo-mode) :help "Run Texi2dvi or Texi2pdf") ("View" "%V" TeX-run-discard-or-function t t :help = "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 -o %(O?pdf) %d" = 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 %(d-dir) %s" = TeX-run-command nil (plain-tex-mode latex-mode doctex-mode ams-tex-mode = texinfo-mode) :help "Run makeglossaries to create glossary 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 debbugs-submit-bounces@debbugs.gnu.org Fri Apr 21 14:29:36 2023 Received: (at 62997) by debbugs.gnu.org; 21 Apr 2023 18:29:36 +0000 Received: from localhost ([127.0.0.1]:41121 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ppvVo-0000aU-5Z for submit@debbugs.gnu.org; Fri, 21 Apr 2023 14:29:36 -0400 Received: from eggs.gnu.org ([209.51.188.92]:39546) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ppvVj-0000aF-5c for 62997@debbugs.gnu.org; Fri, 21 Apr 2023 14:29:35 -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 1ppvVc-0003w2-9D; Fri, 21 Apr 2023 14:29:24 -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=SakaUagNCKw0GfkR/OsRPYF13N3n9rnT0G8rbuoR5Ig=; b=bzkw/LzrIM3RE5ZMw7/A zoYebo60f32EL+C50D2nEqa9UKJccIoKAfBFFvdgOCXQKTKNeJiGR8Ha37wdifqawdGa5jwSm1Xsk AtreMgoWsRuePc044065Bo7dVOg0RTni2eHepnNCqCW8tEdS24+fY3nJVM7vPYLWK9BTaXFSHuqD4 40puy+0qzGp+QCHIZWbAyIGPcgmobE/AkANRWn8bF6KMuvV4AoXc3vWsslAVZMVzh/Qf1Xtj5LuF9 b4OuDwudJpl7PtnmCjv5wj2EThjxhvwepbi0RSksb/0KQJVYrYuvCzCUOtY+U17YX/ORIzPATlcy7 +QD/UaXKVP9u2A==; Received: from pd9fb7539.dip0.t-ipconnect.de ([217.251.117.57] helo=MUTANT) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1ppvVU-0003Fz-HQ; Fri, 21 Apr 2023 14:29:22 -0400 From: Arash Esbati To: Yuki Nishida Subject: Re: bug#62997: 13.1.10; LaTeX-xparse-macro-parse in xparse.el fails when opening a LaTeX file In-Reply-To: <7D9C4164-FE16-477B-B097-E90C6B80D44C@rsworks.jp> (Yuki Nishida's message of "Fri, 21 Apr 2023 19:00:26 +0900") References: <7D9C4164-FE16-477B-B097-E90C6B80D44C@rsworks.jp> Date: Fri, 21 Apr 2023 20:28:43 +0200 Message-ID: <86a5z1rsx0.fsf@gnu.org> 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: 62997 Cc: 62997@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 (---) Yuki Nishida writes: > In a particular environment, opening a LaTeX file for the first time > fails with the *Backtrace* buffer that says LaTeX-xparse-macro-parse > fails with (scan-error =E2=80=9CUnbalanced parentheses=E2=80=9D ...) > > It seems to be caused by an xparse macro definition containing '(' as > a token in an argument's specification like: > > \NewDocumentCommand\FOO{>{\SplitArgument{1}{(}}m} > > I suspect the implementation interprets '(}' as balanced parentheses > and causes the scan-error. Thanks for the report. Can you please apply this patch to xparse.el and report back if it solves the issue? --8<---------------cut here---------------start------------->8--- diff --git a/style/xparse.el b/style/xparse.el index 397a0c4b..ca70fd68 100644 --- a/style/xparse.el +++ b/style/xparse.el @@ -128,7 +128,8 @@ TYPE is one of the symbols mac or env." ;; over [>=3D] and a balanced {} ((looking-at-p "[>=3D]") (forward-char 1) - (forward-sexp)) + (with-syntax-table (TeX-search-syntax-table ?\{ ?\}) + (forward-sexp))) ;; Mandatory arguments: ;; m: Ask for input with "Text" as prompt ((looking-at-p "m") --8<---------------cut here---------------end--------------->8--- TIA. Best, Arash From debbugs-submit-bounces@debbugs.gnu.org Mon Apr 24 03:59:04 2023 Received: (at 62997-done) by debbugs.gnu.org; 24 Apr 2023 07:59:04 +0000 Received: from localhost ([127.0.0.1]:47411 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pqr6F-0003e5-V6 for submit@debbugs.gnu.org; Mon, 24 Apr 2023 03:59:04 -0400 Received: from eggs.gnu.org ([209.51.188.92]:40110) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pqr6E-0003dW-H4 for 62997-done@debbugs.gnu.org; Mon, 24 Apr 2023 03:59:03 -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 1pqr68-0000FA-5k; Mon, 24 Apr 2023 03:58:56 -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=69IwApFiRVwMXFObsCuaJ/+bBZ6kOsa7HNXdE5U5gKk=; b=Q9NUfS5eYr+b81DPYDyH HBDT+Hbg0QBn44ayWyZojsGrCcw39nSPRB/8A5Dp/4hB2QwJbmNOJR4XTek5WSI8bk2ZPEwzVb1p9 LRYdyRs48GwlKJi+MM1E60W5PlqqY8NgFqMnlset7r21sER/Wr/LYwvaMAhJpFhN16kNelmF2Zhgx ZKozoNWmGxGxQbunXeGlziA38xoWKx6Rz4QGBLip7HSP7elQdGTzpfLTG80zJp7J3sQm5lnz/1AdR JQjaRUeycK0rx9O73s+cqh/m6gqyZ6YBcnEo3ZUywMKZmkT45OaQ3b9NKe5c17/95id2OQW5Qzcqe as+Zd896yBae9A==; Received: from pd9fb7539.dip0.t-ipconnect.de ([217.251.117.57] helo=MUTANT) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pqr67-0004iL-1B; Mon, 24 Apr 2023 03:58:55 -0400 From: Arash Esbati To: Yuki Nishida Subject: Re: bug#62997: 13.1.10; LaTeX-xparse-macro-parse in xparse.el fails when opening a LaTeX file In-Reply-To: (Yuki Nishida's message of "Mon, 24 Apr 2023 09:59:51 +0900") References: <7D9C4164-FE16-477B-B097-E90C6B80D44C@rsworks.jp> <86a5z1rsx0.fsf@gnu.org> Date: Mon, 24 Apr 2023 09:58:36 +0200 Message-ID: <86h6t5vhhv.fsf@gnu.org> 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: 62997-done Cc: 62997-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 (---) Yuki Nishida writes: > The patch works. The issue is solved. > Many thanks for the fix. Thanks for testing and your feedback. I've installed that change; therefore I'm closing this report. Best, Arash P.S. In future, please keep ###@debbugs.gnu.org in CC when replying. Thanks. From unknown Fri Jun 20 18:07:18 2025 Received: (at fakecontrol) by fakecontrolmessage; To: internal_control@debbugs.gnu.org From: Debbugs Internal Request Subject: Internal Control Message-Id: bug archived. Date: Mon, 22 May 2023 11:24:15 +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