From unknown Sun Jun 22 04:11:02 2025 X-Loop: help-debbugs@gnu.org Subject: bug#21259: Regex of (this)pagestyle in TeX-complete-list Resent-From: Arash Esbati Original-Sender: "Debbugs-submit" Resent-CC: bug-auctex@gnu.org Resent-Date: Fri, 14 Aug 2015 20:14:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 21259 X-GNU-PR-Package: auctex X-GNU-PR-Keywords: To: 21259@debbugs.gnu.org X-Debbugs-Original-To: bug-auctex@gnu.org Received: via spool by submit@debbugs.gnu.org id=B.143958320028863 (code B ref -1); Fri, 14 Aug 2015 20:14:02 +0000 Received: (at submit) by debbugs.gnu.org; 14 Aug 2015 20:13:20 +0000 Received: from localhost ([127.0.0.1]:56039 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1ZQLLr-0007VS-M9 for submit@debbugs.gnu.org; Fri, 14 Aug 2015 16:13:20 -0400 Received: from eggs.gnu.org ([208.118.235.92]:50977) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1ZQLLp-0007VK-GU for submit@debbugs.gnu.org; Fri, 14 Aug 2015 16:13:17 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ZQLLo-00067w-2y for submit@debbugs.gnu.org; Fri, 14 Aug 2015 16:13:17 -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.0 required=5.0 tests=BAYES_20,FREEMAIL_FROM autolearn=disabled version=3.3.2 Received: from lists.gnu.org ([2001:4830:134:3::11]:52448) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZQLLn-00067s-WC for submit@debbugs.gnu.org; Fri, 14 Aug 2015 16:13:16 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:60972) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZQLLm-0002sd-Ts for bug-auctex@gnu.org; Fri, 14 Aug 2015 16:13:15 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ZQLLj-000676-M3 for bug-auctex@gnu.org; Fri, 14 Aug 2015 16:13:14 -0400 Received: from mo6-p05-ob.smtp.rzone.de ([2a01:238:20a:202:5305::1]:61435) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZQLLj-00066U-Eg for bug-auctex@gnu.org; Fri, 14 Aug 2015 16:13:11 -0400 X-RZG-AUTH: :LX4FZkiIfuylNuAdMHQ4lncSR35KjR0W31pc2hVA+gGKUOTh72G2Oi9uV6AHbQ== X-RZG-CLASS-ID: mo05 Received: from mutant (pD9F93413.dip0.t-ipconnect.de [217.249.52.19]) by smtp.strato.de (RZmta 37.9 DYNA|AUTH) with ESMTPA id n01f69r7EJWu4aI for ; Fri, 14 Aug 2015 21:32:56 +0200 (CEST) From: Arash Esbati Date: Fri, 14 Aug 2015 21:32:04 +0200 Message-ID: <86egj5mzt7.fsf@gmx.de> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.5 MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). X-Received-From: 2001:4830:134:3::11 X-Spam-Score: -4.1 (----) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 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.1 (----) --=-=-= Content-Type: text/plain Hi all, if I start emacs with `emacs --eval '(setq debug-on-error t)' &' type the following a tex file: \thispagestyle{`C-M-i' I get this error: --8<---------------cut here---------------start------------->8--- Debugger entered--Lisp error: (error "Can't find completion for \"\\thispagestyle{\"") signal(error ("Can't find completion for \"\\thispagestyle{\"")) error("Can't find completion for \"%s\"" "\\thispagestyle{") TeX-complete-symbol() call-interactively(TeX-complete-symbol nil nil) command-execute(TeX-complete-symbol) --8<---------------cut here---------------end--------------->8--- It is due to a bug in the definition of `TeX-complete-list' in `latex.el' (line 5913): --8<---------------cut here---------------start------------->8--- (setq TeX-complete-list (append '(;; snipped ("\\\\\\(this\\)?pagestyle{\\([A-Za-z]*\\)" 1 LaTeX-pagestyle-list "}")) TeX-complete-list)) --8<---------------cut here---------------end--------------->8--- The number refers to the wrong subgroup in the regex. There are two ways to fix this: Make `\\(this\\)' a shy-group or replace `1' with `2'. Please find attached a patch going the second route since it looks more coherent to the rest of definitions in `TeX-complete-list'. As always, any comments welcome. Best, Arash --=-=-= Content-Type: text/x-patch Content-Disposition: attachment; filename=0001-Fix-the-subgroup-number-in-a-regex.patch >From afbf77a3be746542ca210d8ef7c1f9db16ca9acf Mon Sep 17 00:00:00 2001 From: Arash Esbati Date: Fri, 14 Aug 2015 21:10:23 +0200 Subject: [PATCH] Fix the subgroup number in a regex. * latex.el (LaTeX-common-initialization): Fix the subgroup number in the regex for `\\(this\\)?pagestyle' --- ChangeLog | 5 +++++ latex.el | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index 5ccb448..2e1516b 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2015-08-14 Arash Esbati + + * latex.el (LaTeX-common-initialization): Fix the subgroup number + in the regex for `\\(this\\)?pagestyle' + 2015-08-10 Tassilo Horn * latex.el (TeX-latex-mode): Call LaTeX-preview-setup only if its diff --git a/latex.el b/latex.el index 5a0200a..8561535 100644 --- a/latex.el +++ b/latex.el @@ -5931,7 +5931,7 @@ i.e. you do _not_ have to cater for this yourself by adding \\\\' or $." ("\\\\renewenvironment\\*?{\\([A-Za-z]*\\)" 1 LaTeX-environment-list-filtered "}") ("\\\\\\(this\\)?pagestyle{\\([A-Za-z]*\\)" - 1 LaTeX-pagestyle-list "}")) + 2 LaTeX-pagestyle-list "}")) TeX-complete-list)) (LaTeX-add-environments -- 2.5.0 --=-=-=-- From unknown Sun Jun 22 04:11:02 2025 MIME-Version: 1.0 X-Mailer: MIME-tools 5.503 (Entity 5.503) X-Loop: help-debbugs@gnu.org From: help-debbugs@gnu.org (GNU bug Tracking System) To: Arash Esbati Subject: bug#21259: closed (Re: bug#21259: Regex of (this)pagestyle in TeX-complete-list) Message-ID: References: <86egj5mzt7.fsf@gmx.de> X-Gnu-PR-Message: they-closed 21259 X-Gnu-PR-Package: auctex Reply-To: 21259@debbugs.gnu.org Date: Sat, 15 Aug 2015 13:21:03 +0000 Content-Type: multipart/mixed; boundary="----------=_1439644863-29440-1" This is a multi-part message in MIME format... ------------=_1439644863-29440-1 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" Your bug report #21259: Regex of (this)pagestyle in TeX-complete-list 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 21259@debbugs.gnu.org. --=20 21259: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=3D21259 GNU Bug Tracking System Contact help-debbugs@gnu.org with problems ------------=_1439644863-29440-1 Content-Type: message/rfc822 Content-Disposition: inline Content-Transfer-Encoding: 7bit Received: (at 21259-done) by debbugs.gnu.org; 15 Aug 2015 13:20:09 +0000 Received: from localhost ([127.0.0.1]:56294 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1ZQbNZ-0007dV-4G for submit@debbugs.gnu.org; Sat, 15 Aug 2015 09:20:09 -0400 Received: from eggs.gnu.org ([208.118.235.92]:41866) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1ZQbNW-0007dN-MX for 21259-done@debbugs.gnu.org; Sat, 15 Aug 2015 09:20:07 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ZQbNT-0008Fd-2n for 21259-done@debbugs.gnu.org; Sat, 15 Aug 2015 09:20:06 -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,T_RP_MATCHES_RCVD autolearn=disabled version=3.3.2 Received: from fencepost.gnu.org ([2001:4830:134:3::e]:48255) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZQbNS-0008FD-Vs for 21259-done@debbugs.gnu.org; Sat, 15 Aug 2015 09:20:03 -0400 Received: from mail-io0-f178.google.com ([209.85.223.178]:33839) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_ARCFOUR_SHA1:128) (Exim 4.82) (envelope-from ) id 1ZQbNS-0005Qk-Ig for 21259-done@debbugs.gnu.org; Sat, 15 Aug 2015 09:20:02 -0400 Received: by iodb91 with SMTP id b91so109538235iod.1 for <21259-done@debbugs.gnu.org>; Sat, 15 Aug 2015 06:20:01 -0700 (PDT) X-Received: by 10.107.34.147 with SMTP id i141mr46150833ioi.59.1439644801824; Sat, 15 Aug 2015 06:20:01 -0700 (PDT) MIME-Version: 1.0 Received: by 10.36.31.201 with HTTP; Sat, 15 Aug 2015 06:19:22 -0700 (PDT) In-Reply-To: <86egj5mzt7.fsf@gmx.de> References: <86egj5mzt7.fsf@gmx.de> From: =?UTF-8?Q?Mos=C3=A8_Giordano?= Date: Sat, 15 Aug 2015 15:19:22 +0200 Message-ID: Subject: Re: bug#21259: Regex of (this)pagestyle in TeX-complete-list To: Arash Esbati Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). X-Received-From: 2001:4830:134:3::e X-Spam-Score: -5.0 (-----) X-Debbugs-Envelope-To: 21259-done Cc: 21259-done@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 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: -5.0 (-----) Hi Arash, 2015-08-14 21:32 GMT+02:00 Arash Esbati : > Hi all, > > if I start emacs with `emacs --eval '(setq debug-on-error t)' &' type > the following a tex file: > > \thispagestyle{`C-M-i' > > I get this error: > > --8<---------------cut here---------------start------------->8--- > Debugger entered--Lisp error: (error "Can't find completion for \"\\thisp= agestyle{\"") > signal(error ("Can't find completion for \"\\thispagestyle{\"")) > error("Can't find completion for \"%s\"" "\\thispagestyle{") > TeX-complete-symbol() > call-interactively(TeX-complete-symbol nil nil) > command-execute(TeX-complete-symbol) > --8<---------------cut here---------------end--------------->8--- > > It is due to a bug in the definition of `TeX-complete-list' in > `latex.el' (line 5913): > > --8<---------------cut here---------------start------------->8--- > (setq TeX-complete-list > (append '(;; snipped > ("\\\\\\(this\\)?pagestyle{\\([A-Za-z]*\\)" > 1 LaTeX-pagestyle-list "}")) > TeX-complete-list)) > --8<---------------cut here---------------end--------------->8--- > > The number refers to the wrong subgroup in the regex. There are two > ways to fix this: Make `\\(this\\)' a shy-group or replace `1' with `2'. > > Please find attached a patch going the second route since it looks more > coherent to the rest of definitions in `TeX-complete-list'. Agreed. Patch installed, thanks! Bye, Mos=C3=A8 ------------=_1439644863-29440-1 Content-Type: message/rfc822 Content-Disposition: inline Content-Transfer-Encoding: 7bit Received: (at submit) by debbugs.gnu.org; 14 Aug 2015 20:13:20 +0000 Received: from localhost ([127.0.0.1]:56039 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1ZQLLr-0007VS-M9 for submit@debbugs.gnu.org; Fri, 14 Aug 2015 16:13:20 -0400 Received: from eggs.gnu.org ([208.118.235.92]:50977) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1ZQLLp-0007VK-GU for submit@debbugs.gnu.org; Fri, 14 Aug 2015 16:13:17 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ZQLLo-00067w-2y for submit@debbugs.gnu.org; Fri, 14 Aug 2015 16:13:17 -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.0 required=5.0 tests=BAYES_20,FREEMAIL_FROM autolearn=disabled version=3.3.2 Received: from lists.gnu.org ([2001:4830:134:3::11]:52448) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZQLLn-00067s-WC for submit@debbugs.gnu.org; Fri, 14 Aug 2015 16:13:16 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:60972) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZQLLm-0002sd-Ts for bug-auctex@gnu.org; Fri, 14 Aug 2015 16:13:15 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ZQLLj-000676-M3 for bug-auctex@gnu.org; Fri, 14 Aug 2015 16:13:14 -0400 Received: from mo6-p05-ob.smtp.rzone.de ([2a01:238:20a:202:5305::1]:61435) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZQLLj-00066U-Eg for bug-auctex@gnu.org; Fri, 14 Aug 2015 16:13:11 -0400 X-RZG-AUTH: :LX4FZkiIfuylNuAdMHQ4lncSR35KjR0W31pc2hVA+gGKUOTh72G2Oi9uV6AHbQ== X-RZG-CLASS-ID: mo05 Received: from mutant (pD9F93413.dip0.t-ipconnect.de [217.249.52.19]) by smtp.strato.de (RZmta 37.9 DYNA|AUTH) with ESMTPA id n01f69r7EJWu4aI for ; Fri, 14 Aug 2015 21:32:56 +0200 (CEST) From: Arash Esbati To: bug-auctex@gnu.org Subject: Regex of (this)pagestyle in TeX-complete-list Date: Fri, 14 Aug 2015 21:32:04 +0200 Message-ID: <86egj5mzt7.fsf@gmx.de> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.5 MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). X-Received-From: 2001:4830:134:3::11 X-Spam-Score: -4.1 (----) X-Debbugs-Envelope-To: submit X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 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.1 (----) --=-=-= Content-Type: text/plain Hi all, if I start emacs with `emacs --eval '(setq debug-on-error t)' &' type the following a tex file: \thispagestyle{`C-M-i' I get this error: --8<---------------cut here---------------start------------->8--- Debugger entered--Lisp error: (error "Can't find completion for \"\\thispagestyle{\"") signal(error ("Can't find completion for \"\\thispagestyle{\"")) error("Can't find completion for \"%s\"" "\\thispagestyle{") TeX-complete-symbol() call-interactively(TeX-complete-symbol nil nil) command-execute(TeX-complete-symbol) --8<---------------cut here---------------end--------------->8--- It is due to a bug in the definition of `TeX-complete-list' in `latex.el' (line 5913): --8<---------------cut here---------------start------------->8--- (setq TeX-complete-list (append '(;; snipped ("\\\\\\(this\\)?pagestyle{\\([A-Za-z]*\\)" 1 LaTeX-pagestyle-list "}")) TeX-complete-list)) --8<---------------cut here---------------end--------------->8--- The number refers to the wrong subgroup in the regex. There are two ways to fix this: Make `\\(this\\)' a shy-group or replace `1' with `2'. Please find attached a patch going the second route since it looks more coherent to the rest of definitions in `TeX-complete-list'. As always, any comments welcome. Best, Arash --=-=-= Content-Type: text/x-patch Content-Disposition: attachment; filename=0001-Fix-the-subgroup-number-in-a-regex.patch >From afbf77a3be746542ca210d8ef7c1f9db16ca9acf Mon Sep 17 00:00:00 2001 From: Arash Esbati Date: Fri, 14 Aug 2015 21:10:23 +0200 Subject: [PATCH] Fix the subgroup number in a regex. * latex.el (LaTeX-common-initialization): Fix the subgroup number in the regex for `\\(this\\)?pagestyle' --- ChangeLog | 5 +++++ latex.el | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index 5ccb448..2e1516b 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2015-08-14 Arash Esbati + + * latex.el (LaTeX-common-initialization): Fix the subgroup number + in the regex for `\\(this\\)?pagestyle' + 2015-08-10 Tassilo Horn * latex.el (TeX-latex-mode): Call LaTeX-preview-setup only if its diff --git a/latex.el b/latex.el index 5a0200a..8561535 100644 --- a/latex.el +++ b/latex.el @@ -5931,7 +5931,7 @@ i.e. you do _not_ have to cater for this yourself by adding \\\\' or $." ("\\\\renewenvironment\\*?{\\([A-Za-z]*\\)" 1 LaTeX-environment-list-filtered "}") ("\\\\\\(this\\)?pagestyle{\\([A-Za-z]*\\)" - 1 LaTeX-pagestyle-list "}")) + 2 LaTeX-pagestyle-list "}")) TeX-complete-list)) (LaTeX-add-environments -- 2.5.0 --=-=-=-- ------------=_1439644863-29440-1--