From unknown Sun Jun 22 00:05:56 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#2881 <2881@debbugs.gnu.org> To: bug#2881 <2881@debbugs.gnu.org> Subject: Status: 23.0.91; inconsistent regexps with "explicitly numbered group" Reply-To: bug#2881 <2881@debbugs.gnu.org> Date: Sun, 22 Jun 2025 07:05:56 +0000 retitle 2881 23.0.91; inconsistent regexps with "explicitly numbered group" reassign 2881 emacs submitter 2881 Joe Corneli severity 2881 normal thanks From holtzermann17@gmail.com Fri Apr 3 12:15:10 2009 Received: (at submit) by emacsbugs.donarmstrong.com; 3 Apr 2009 19:15:11 +0000 X-Spam-Checker-Version: SpamAssassin 3.2.5-bugs.debian.org_2005_01_02 (2008-06-10) on rzlab.ucr.edu X-Spam-Level: X-Spam-Bayes: score:0.5 Bayes not run. spammytokens:Tokens not available. hammytokens:Tokens not available. X-Spam-Status: No, score=0.1 required=4.0 tests=FOURLA autolearn=no version=3.2.5-bugs.debian.org_2005_01_02 Received: from fencepost.gnu.org (fencepost.gnu.org [140.186.70.10]) by rzlab.ucr.edu (8.13.8/8.13.8/Debian-3) with ESMTP id n33JF5Qq029156 for ; Fri, 3 Apr 2009 12:15:06 -0700 Received: from mx10.gnu.org ([199.232.76.166]:39665) by fencepost.gnu.org with esmtp (Exim 4.67) (envelope-from ) id 1Lpor2-00089k-LU for emacs-pretest-bug@gnu.org; Fri, 03 Apr 2009 15:15:04 -0400 Received: from Debian-exim by monty-python.gnu.org with spam-scanned (Exim 4.60) (envelope-from ) id 1Lpor0-0003Gh-Ju for emacs-pretest-bug@gnu.org; Fri, 03 Apr 2009 15:15:04 -0400 Received: from yx-out-1718.google.com ([74.125.44.157]:35160) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1Lpor0-0003GX-9h for emacs-pretest-bug@gnu.org; Fri, 03 Apr 2009 15:15:02 -0400 Received: by yx-out-1718.google.com with SMTP id 3so827102yxi.66 for ; Fri, 03 Apr 2009 12:15:01 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:date:message-id:subject :from:to:content-type:content-transfer-encoding; bh=j1aMhIEGrqEDuoyF+/EPPnGr4RaAmBNwFfrlQenVWz8=; b=u7VxDlqgTwcmYB/NdlPugdWEfUgWeoI2WrbuKktbf8w7EPrHf96q0Y9ZbMqor67miu hZXzZls2obNeC7V1OGvCi7xlRQXF+9htc+usQbf5R5DDxtf1mFp6d7ncIOduIz9ElrT4 vaDCOBhBUhBM2frh1elNJyaoOsR8p/gpvPAXA= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:date:message-id:subject:from:to:content-type :content-transfer-encoding; b=mUFsxrftPI2ExcM3LEJZ6ZbxE7sfx6JOlcIvNMKuLXJLxb8/RzYm+zzqt1D/u08jOx R3eMsyLV45C/nS9DRCbeUrwamZSbPyEir2bNw0Tm7SComm3eykCGf8L13w5kvf/9x1v2 pcwkelHInb/5UzYDx9zgHH2wHVhlU71kZEY+c= MIME-Version: 1.0 Received: by 10.150.156.9 with SMTP id d9mr2729204ybe.108.1238786101207; Fri, 03 Apr 2009 12:15:01 -0700 (PDT) Date: Fri, 3 Apr 2009 15:15:01 -0400 Message-ID: Subject: 23.0.91; inconsistent regexps with "explicitly numbered group" From: Joe Corneli To: emacs-pretest-bug@gnu.org Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6 (newer, 2) Please execute the following forms with C-x C-e. Form 1 and Form 3 return `t' (Yes, we are looking at the indicated regular expression), whereas Form 2 returns `nil' (even though from the Elisp reference page "34.3.1.3 Backslash Constructs in Regular Expressions", it appears that this form ought to return `t' like the others). For comparison's sake, Form 4 and Form 5 show different inconsistent behavior when using `search-forward-regexp'. Form 4 only finds part of the match, whereas Form 5 finds the full match. Form #1. (let ((possible-environments "\\(1?:lisp\\|idea\\|common\\)")) (looking-at (concat "\n*?\\\\begin{" possible-environments "}"))) \begin{idea} Form #2. (let ((possible-environments "\\(?1:lisp\\)\\|\\(?1:idea\\)\\|\\(?1:common\\)") ) (looking-at (concat "\n*?\\\\begin{" possible-environments "}"))) \begin{idea} Form #3. (let ((possible-environments "\\(?1:lisp\\)\\|\\(?1:idea\\)\\|\\(?1:common\\)") ) (looking-at (concat "\n*?\\\\begin{" possible-environments "}"))) \begin{lisp} Form #4. (let ((possible-environments "\\(?1:lisp\\)\\|\\(?1:idea\\)\\|\\(?1:common\\)") ) (search-forward-regexp (concat "\n*?\\\\begin{" possible-environments "}"))) \begin{lisp} Form #5. (let ((possible-environments "\\(?1:lisp\\)\\|\\(?1:idea\\)\\|\\(?1:common\\)") ) (search-forward-regexp (concat "\n*?\\\\begin{" possible-environments "}"))) \begin{common} If Emacs crashed, and you have the Emacs process in the gdb debugger, please include the output from the following gdb commands: `bt full' and `xbacktrace'. If you would like to further debug the crash, please read the file /Users/planetmath/emacs/etc/DEBUG for instructions. In GNU Emacs 23.0.91.1 (i386-apple-darwin8.11.1, GTK+ Version 2.14.7) of 2009-03-31 on planet-maths-computer.local Windowing system distributor `The XFree86 Project, Inc', version 11.0.40400000 configured using `configure '--infodir=${prefix}/share/info' '--mandir=${prefix}/share/man' '--libexecdir=${prefix}/lib'' Important settings: value of $LC_ALL: nil value of $LC_COLLATE: nil value of $LC_CTYPE: nil value of $LC_MESSAGES: nil value of $LC_MONETARY: nil value of $LC_NUMERIC: nil value of $LC_TIME: nil value of $LANG: nil value of $XMODIFIERS: nil locale-coding-system: nil default-enable-multibyte-characters: t Major mode: Lisp Interaction Minor modes in effect: shell-dirtrack-mode: t show-paren-mode: t tooltip-mode: t mouse-wheel-mode: t file-name-shadow-mode: t global-font-lock-mode: t font-lock-mode: t global-auto-composition-mode: t auto-composition-mode: t auto-encryption-mode: t auto-compression-mode: t line-number-mode: t transient-mark-mode: 1 Recent input: M-\ C-SPC M-w M-> C-y ) \ \ b e g j i n { } i d e a C-e C-e C-x C-e C-e M-< M-< C-x C-f m a r x a n - m g C-s i m p o r t - c o d C-s C-s C-a C-e C-SPC C-a M-w C-x b * s c M-> C-y M-f M-f M-f M-b C-SPC M-w C-y M-b M-b M-f M-f c o m m o n C-SPC C-a M-w M-> C-y C-e ) C-e C-e C-e C-e ) M-> C-e C-x C-e C-SPC C-a M-w M-> C-y l i s p C-e C-x C-e C-SPC C-a M-w M-x r e p o r Recent messages: t Mark set [2 times] Making completion list... Mark saved where search started Mark set [9 times] nil Mark set [3 times] t Mark set Making completion list... From whitebox@nefkom.net Fri Apr 3 12:55:56 2009 Received: (at submit) by emacsbugs.donarmstrong.com; 3 Apr 2009 19:55:56 +0000 X-Spam-Checker-Version: SpamAssassin 3.2.5-bugs.debian.org_2005_01_02 (2008-06-10) on rzlab.ucr.edu X-Spam-Level: X-Spam-Bayes: score:0.5 Bayes not run. spammytokens:Tokens not available. hammytokens:Tokens not available. X-Spam-Status: No, score=-2.0 required=4.0 tests=GMAIL,HAS_BUG_NUMBER autolearn=unavailable version=3.2.5-bugs.debian.org_2005_01_02 Received: from fencepost.gnu.org (fencepost.gnu.org [140.186.70.10]) by rzlab.ucr.edu (8.13.8/8.13.8/Debian-3) with ESMTP id n33JtrXh008190 for ; Fri, 3 Apr 2009 12:55:54 -0700 Received: from mail.gnu.org ([199.232.76.166]:41061 helo=mx10.gnu.org) by fencepost.gnu.org with esmtp (Exim 4.67) (envelope-from ) id 1LppUW-0000oY-Ah for emacs-pretest-bug@gnu.org; Fri, 03 Apr 2009 15:55:52 -0400 Received: from Debian-exim by monty-python.gnu.org with spam-scanned (Exim 4.60) (envelope-from ) id 1LppUT-0007G9-1m for emacs-pretest-bug@gnu.org; Fri, 03 Apr 2009 15:55:51 -0400 Received: from mail-out.m-online.net ([212.18.0.10]:39866) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1LppUS-0007Fy-OC for emacs-pretest-bug@gnu.org; Fri, 03 Apr 2009 15:55:48 -0400 Received: from mail01.m-online.net (mail.m-online.net [192.168.3.149]) by mail-out.m-online.net (Postfix) with ESMTP id 0D4851C000A3; Fri, 3 Apr 2009 21:55:42 +0200 (CEST) Received: from localhost (dynscan2.mnet-online.de [192.168.1.215]) by mail.m-online.net (Postfix) with ESMTP id 7017190177; Fri, 3 Apr 2009 21:55:45 +0200 (CEST) X-Virus-Scanned: amavisd-new at mnet-online.de Received: from mail.mnet-online.de ([192.168.3.149]) by localhost (dynscan2.mnet-online.de [192.168.1.215]) (amavisd-new, port 10024) with ESMTP id 3dstXJpWLLbs; Fri, 3 Apr 2009 21:55:43 +0200 (CEST) Received: from igel.home (DSL01.83.171.154.133.ip-pool.NEFkom.net [83.171.154.133]) by mail.mnet-online.de (Postfix) with ESMTP; Fri, 3 Apr 2009 21:55:43 +0200 (CEST) Received: by igel.home (Postfix, from userid 501) id D1A3310D9E6; Fri, 3 Apr 2009 21:55:42 +0200 (CEST) From: Andreas Schwab To: Joe Corneli Cc: 2881@debbugs.gnu.org, emacs-pretest-bug@gnu.org Subject: Re: bug#2881: 23.0.91; inconsistent regexps with "explicitly numbered group" References: X-Yow: TAILFINS!! ...click... Date: Fri, 03 Apr 2009 21:55:42 +0200 In-Reply-To: (Joe Corneli's message of "Fri, 3 Apr 2009 15:15:01 -0400") Message-ID: User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.0.92 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6, seldom 2.4 (older, 4) Joe Corneli writes: > Please execute the following forms with C-x C-e. Form 1 > and Form 3 return `t' (Yes, we are looking at the > indicated regular expression), whereas Form 2 returns > `nil' (even though from the Elisp reference page "34.3.1.3 > Backslash Constructs in Regular Expressions", it appears > that this form ought to return `t' like the others). `\|' applies to the largest possible surrounding expressions. Only a surrounding `\( ... \)' grouping can limit the grouping power of `\|'. > (let ((possible-environments > "\\(?1:lisp\\)\\|\\(?1:idea\\)\\|\\(?1:common\\)") ) > (looking-at > (concat "\n*?\\\\begin{" > possible-environments > "}"))) The three alternatives of this regexp are "\n*?\\\\begin{\\(?1:lisp\\)", "\\(?1:idea\\)" and "\\(?1:common\\)". Andreas. -- Andreas Schwab, schwab@linux-m68k.org GPG Key fingerprint = 58CA 54C7 6D53 942B 1756 01D3 44D5 214B 8276 4ED5 "And now for something completely different." From holtzermann17@gmail.com Fri Apr 3 13:41:45 2009 Received: (at submit) by emacsbugs.donarmstrong.com; 3 Apr 2009 20:41:45 +0000 X-Spam-Checker-Version: SpamAssassin 3.2.5-bugs.debian.org_2005_01_02 (2008-06-10) on rzlab.ucr.edu X-Spam-Level: X-Spam-Bayes: score:0.5 Bayes not run. spammytokens:Tokens not available. hammytokens:Tokens not available. X-Spam-Status: No, score=-2.0 required=4.0 tests=GMAIL,HAS_BUG_NUMBER autolearn=ham version=3.2.5-bugs.debian.org_2005_01_02 Received: from fencepost.gnu.org (fencepost.gnu.org [140.186.70.10]) by rzlab.ucr.edu (8.13.8/8.13.8/Debian-3) with ESMTP id n33KfgEk020956 for ; Fri, 3 Apr 2009 13:41:43 -0700 Received: from mx10.gnu.org ([199.232.76.166]:42787) by fencepost.gnu.org with esmtp (Exim 4.67) (envelope-from ) id 1LpqCr-0002QZ-DC for emacs-pretest-bug@gnu.org; Fri, 03 Apr 2009 16:41:41 -0400 Received: from Debian-exim by monty-python.gnu.org with spam-scanned (Exim 4.60) (envelope-from ) id 1LpqCq-0003kt-OU for emacs-pretest-bug@gnu.org; Fri, 03 Apr 2009 16:41:41 -0400 Received: from yx-out-1718.google.com ([74.125.44.156]:60048) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1LpqCq-0003kl-8e for emacs-pretest-bug@gnu.org; Fri, 03 Apr 2009 16:41:40 -0400 Received: by yx-out-1718.google.com with SMTP id 3so854701yxi.66 for ; Fri, 03 Apr 2009 13:41:39 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:in-reply-to:references :date:message-id:subject:from:to:cc:content-type :content-transfer-encoding; bh=DrUFBL5zWBI44IttVD6P09LTN7wXELJ3NVAx0tPo/6w=; b=kK5OSXwNl/+HpMumU4muB6H3MwLaeKkJaQTdhQe29Onmy1BcERKhdFcH1iKdSukZ75 3VUkoBtDt5JPcdcph5ypr1TNeqjDsh/EhhmpGNzjgcgJLnoXgTvgr0lyOWwSMyf15TFT HeDJkfISKR4HsyhV3KpXnv8XUXD+mCgiGitUY= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type:content-transfer-encoding; b=JuPR5KKRtCPLDJ/Qcf3fgWN0iYwvjTv5wYk/lcYu3NPCesbSJyHOj17yEnHibbyWVf XWKsFMGnklSJwEwaJUQ/mjmtekOZUXmHxemRZaLM3KnRmnu1o8w3eaX9lYzoEcEkeYNe JZmT666BO5orFN2Ws+NhhkwGq2mtSS50/Mv14= MIME-Version: 1.0 Received: by 10.150.133.13 with SMTP id g13mr2842617ybd.198.1238791299697; Fri, 03 Apr 2009 13:41:39 -0700 (PDT) In-Reply-To: References: Date: Fri, 3 Apr 2009 16:41:39 -0400 Message-ID: Subject: Re: bug#2881: 23.0.91; inconsistent regexps with "explicitly numbered group" From: Joe Corneli To: Andreas Schwab Cc: 2881@debbugs.gnu.org, emacs-pretest-bug@gnu.org Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6 (newer, 2) What about the comparison between Form 4 and Form 5, which seems to not only go against the description of `\|' you quoted, but to contain another internal inconsistency (whether or not the final `}' is matched)? On Fri, Apr 3, 2009 at 3:55 PM, Andreas Schwab wrot= e: > Joe Corneli writes: > >> Please execute the following forms with C-x C-e. =A0Form 1 >> and Form 3 return `t' (Yes, we are looking at the >> indicated regular expression), whereas Form 2 returns >> `nil' (even though from the Elisp reference page "34.3.1.3 >> Backslash Constructs in Regular Expressions", it appears >> that this form ought to return `t' like the others). > > =A0 =A0 `\|' applies to the largest possible surrounding expressions. > =A0 =A0 Only a surrounding `\( ... \)' grouping can limit the grouping > =A0 =A0 power of `\|'. > >> (let ((possible-environments >> =A0 =A0 =A0 =A0"\\(?1:lisp\\)\\|\\(?1:idea\\)\\|\\(?1:common\\)") ) >> =A0 =A0 =A0 (looking-at >> =A0 =A0 =A0 =A0 =A0 =A0 (concat "\n*?\\\\begin{" >> =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 possible-environments >> =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 "}"))) > > > The three alternatives of this regexp are "\n*?\\\\begin{\\(?1:lisp\\)", > "\\(?1:idea\\)" and "\\(?1:common\\)". > > Andreas. > > -- > Andreas Schwab, schwab@linux-m68k.org > GPG Key fingerprint =3D 58CA 54C7 6D53 942B 1756 =A001D3 44D5 214B 8276 4= ED5 > "And now for something completely different." > From whitebox@nefkom.net Fri Apr 3 14:32:09 2009 Received: (at submit) by emacsbugs.donarmstrong.com; 3 Apr 2009 21:32:09 +0000 X-Spam-Checker-Version: SpamAssassin 3.2.5-bugs.debian.org_2005_01_02 (2008-06-10) on rzlab.ucr.edu X-Spam-Level: X-Spam-Bayes: score:0.5 Bayes not run. spammytokens:Tokens not available. hammytokens:Tokens not available. X-Spam-Status: No, score=-2.0 required=4.0 tests=GMAIL,HAS_BUG_NUMBER autolearn=ham version=3.2.5-bugs.debian.org_2005_01_02 Received: from fencepost.gnu.org (fencepost.gnu.org [140.186.70.10]) by rzlab.ucr.edu (8.13.8/8.13.8/Debian-3) with ESMTP id n33LW64u002696 for ; Fri, 3 Apr 2009 14:32:07 -0700 Received: from mx10.gnu.org ([199.232.76.166]:44988) by fencepost.gnu.org with esmtp (Exim 4.67) (envelope-from ) id 1Lpqzd-0003aH-TZ for emacs-pretest-bug@gnu.org; Fri, 03 Apr 2009 17:32:06 -0400 Received: from Debian-exim by monty-python.gnu.org with spam-scanned (Exim 4.60) (envelope-from ) id 1Lpqzc-0000qT-QL for emacs-pretest-bug@gnu.org; Fri, 03 Apr 2009 17:32:05 -0400 Received: from mail-out.m-online.net ([212.18.0.10]:59434) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1Lpqzc-0000q8-Ey for emacs-pretest-bug@gnu.org; Fri, 03 Apr 2009 17:32:04 -0400 Received: from mail01.m-online.net (mail.m-online.net [192.168.3.149]) by mail-out.m-online.net (Postfix) with ESMTP id 8C6851C00164; Fri, 3 Apr 2009 23:32:00 +0200 (CEST) Received: from localhost (dynscan2.mnet-online.de [192.168.1.215]) by mail.m-online.net (Postfix) with ESMTP id 2684E90188; Fri, 3 Apr 2009 23:32:03 +0200 (CEST) X-Virus-Scanned: amavisd-new at mnet-online.de Received: from mail.mnet-online.de ([192.168.3.149]) by localhost (dynscan2.mnet-online.de [192.168.1.215]) (amavisd-new, port 10024) with ESMTP id WVth22shIHP1; Fri, 3 Apr 2009 23:32:02 +0200 (CEST) Received: from igel.home (DSL01.83.171.154.133.ip-pool.NEFkom.net [83.171.154.133]) by mail.mnet-online.de (Postfix) with ESMTP; Fri, 3 Apr 2009 23:32:01 +0200 (CEST) Received: by igel.home (Postfix, from userid 501) id 5F18E10D9E6; Fri, 3 Apr 2009 23:32:01 +0200 (CEST) From: Andreas Schwab To: 2881@debbugs.gnu.org Cc: Joe Corneli , emacs-pretest-bug@gnu.org Subject: Re: bug#2881: 23.0.91; inconsistent regexps with "explicitly numbered group" References: X-Yow: The entire CHINESE WOMEN'S VOLLEYBALL TEAM all share ONE personality -- and have since BIRTH!! Date: Fri, 03 Apr 2009 23:32:01 +0200 In-Reply-To: (Andreas Schwab's message of "Fri, 03 Apr 2009 21:55:42 +0200") Message-ID: User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.0.92 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6, seldom 2.4 (older, 4) Andreas Schwab writes: > Joe Corneli writes: > >> Please execute the following forms with C-x C-e. Form 1 >> and Form 3 return `t' (Yes, we are looking at the >> indicated regular expression), whereas Form 2 returns >> `nil' (even though from the Elisp reference page "34.3.1.3 >> Backslash Constructs in Regular Expressions", it appears >> that this form ought to return `t' like the others). > > `\|' applies to the largest possible surrounding expressions. > Only a surrounding `\( ... \)' grouping can limit the grouping > power of `\|'. > >> (let ((possible-environments >> "\\(?1:lisp\\)\\|\\(?1:idea\\)\\|\\(?1:common\\)") ) >> (looking-at >> (concat "\n*?\\\\begin{" >> possible-environments >> "}"))) > > > The three alternatives of this regexp are "\n*?\\\\begin{\\(?1:lisp\\)", > "\\(?1:idea\\)" and "\\(?1:common\\)". The last one is "\\(?1:common\\)}", of course. Andreas. -- Andreas Schwab, schwab@linux-m68k.org GPG Key fingerprint = 58CA 54C7 6D53 942B 1756 01D3 44D5 214B 8276 4ED5 "And now for something completely different." From holtzermann17@gmail.com Fri Apr 3 14:38:35 2009 Received: (at submit) by emacsbugs.donarmstrong.com; 3 Apr 2009 21:38:36 +0000 X-Spam-Checker-Version: SpamAssassin 3.2.5-bugs.debian.org_2005_01_02 (2008-06-10) on rzlab.ucr.edu X-Spam-Level: X-Spam-Bayes: score:0.5 Bayes not run. spammytokens:Tokens not available. hammytokens:Tokens not available. X-Spam-Status: No, score=-2.0 required=4.0 tests=GMAIL,HAS_BUG_NUMBER autolearn=unavailable version=3.2.5-bugs.debian.org_2005_01_02 Received: from fencepost.gnu.org (fencepost.gnu.org [140.186.70.10]) by rzlab.ucr.edu (8.13.8/8.13.8/Debian-3) with ESMTP id n33LcWhh004100 for ; Fri, 3 Apr 2009 14:38:33 -0700 Received: from mx10.gnu.org ([199.232.76.166]:45303) by fencepost.gnu.org with esmtp (Exim 4.67) (envelope-from ) id 1Lpr5r-0003kC-Tj for emacs-pretest-bug@gnu.org; Fri, 03 Apr 2009 17:38:32 -0400 Received: from Debian-exim by monty-python.gnu.org with spam-scanned (Exim 4.60) (envelope-from ) id 1Lpr5r-00021c-FM for emacs-pretest-bug@gnu.org; Fri, 03 Apr 2009 17:38:31 -0400 Received: from yw-out-1718.google.com ([74.125.46.157]:5627) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1Lpr5r-00021Q-4i for emacs-pretest-bug@gnu.org; Fri, 03 Apr 2009 17:38:31 -0400 Received: by yw-out-1718.google.com with SMTP id 9so872076ywk.66 for ; Fri, 03 Apr 2009 14:38:30 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:in-reply-to:references :date:message-id:subject:from:to:cc:content-type :content-transfer-encoding; bh=402Xdjd8kQzoEKU9Dy/riDITz9NDpyL8u62MILYYW68=; b=rOxnVfZj09oGge94yUbNOqvn34UL3mTZEGV5WESCy7yCSFN5dzQOxzV3ZkC/fQyq6d wJcdWreiUez/ELZL/VcIThoSizj1Otli+vDze1ahkwtYYW0Jr7fTbgtmnYfQdzyT80ph 6mNeAjRc2u4riwcCi3wJTi76V1RUm9flIhsWU= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type:content-transfer-encoding; b=iPYnXiqlSWXkhyKufP2bw0nM06YqqEc2ynVzNqlN0HYwTIT2LhuI1N1Ss+UGeOB438 bnu86TSkjyhxnDBsY6XwMOJz8aR53vWr6Z5UEExupmvr7miJcVb3RMbVM+7ehOiapqV/ erv4SLkqy51yk423DJRNEJjTazWf8GlI1++b4= MIME-Version: 1.0 Received: by 10.151.47.7 with SMTP id z7mr2913436ybj.203.1238794710416; Fri, 03 Apr 2009 14:38:30 -0700 (PDT) In-Reply-To: References: Date: Fri, 3 Apr 2009 17:38:30 -0400 Message-ID: Subject: Re: bug#2881: 23.0.91; inconsistent regexps with "explicitly numbered group" From: Joe Corneli To: Andreas Schwab Cc: 2881@debbugs.gnu.org, emacs-pretest-bug@gnu.org Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6 (newer, 2) Oh, OK, I see! Never mind! On Fri, Apr 3, 2009 at 5:32 PM, Andreas Schwab wrot= e: > Andreas Schwab writes: > >> Joe Corneli writes: >> >>> Please execute the following forms with C-x C-e. =A0Form 1 >>> and Form 3 return `t' (Yes, we are looking at the >>> indicated regular expression), whereas Form 2 returns >>> `nil' (even though from the Elisp reference page "34.3.1.3 >>> Backslash Constructs in Regular Expressions", it appears >>> that this form ought to return `t' like the others). >> >> =A0 =A0 =A0`\|' applies to the largest possible surrounding expressions. >> =A0 =A0 =A0Only a surrounding `\( ... \)' grouping can limit the groupin= g >> =A0 =A0 =A0power of `\|'. >> >>> (let ((possible-environments >>> =A0 =A0 =A0 =A0"\\(?1:lisp\\)\\|\\(?1:idea\\)\\|\\(?1:common\\)") ) >>> =A0 =A0 =A0 (looking-at >>> =A0 =A0 =A0 =A0 =A0 =A0 (concat "\n*?\\\\begin{" >>> =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 possible-environments >>> =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 "}"))) >> >> >> The three alternatives of this regexp are "\n*?\\\\begin{\\(?1:lisp\\)", >> "\\(?1:idea\\)" and "\\(?1:common\\)". > > The last one is "\\(?1:common\\)}", of course. > > Andreas. > > -- > Andreas Schwab, schwab@linux-m68k.org > GPG Key fingerprint =3D 58CA 54C7 6D53 942B 1756 =A001D3 44D5 214B 8276 4= ED5 > "And now for something completely different." > From monnier@IRO.UMontreal.CA Fri Apr 3 14:43:41 2009 Received: (at 2881-done) by emacsbugs.donarmstrong.com; 3 Apr 2009 21:43:42 +0000 X-Spam-Checker-Version: SpamAssassin 3.2.5-bugs.debian.org_2005_01_02 (2008-06-10) on rzlab.ucr.edu X-Spam-Level: X-Spam-Bayes: score:0.5 Bayes not run. spammytokens:Tokens not available. hammytokens:Tokens not available. X-Spam-Status: No, score=-3.0 required=4.0 tests=HAS_BUG_NUMBER autolearn=ham version=3.2.5-bugs.debian.org_2005_01_02 Received: from chene.dit.umontreal.ca (chene.dit.umontreal.ca [132.204.246.20]) by rzlab.ucr.edu (8.13.8/8.13.8/Debian-3) with ESMTP id n33Lhcdd005489 for <2881-done@emacsbugs.donarmstrong.com>; Fri, 3 Apr 2009 14:43:39 -0700 Received: from faina.iro.umontreal.ca (faina.iro.umontreal.ca [132.204.26.177]) by chene.dit.umontreal.ca (8.14.1/8.14.1) with ESMTP id n33LhbDO023249; Fri, 3 Apr 2009 17:43:37 -0400 Received: by faina.iro.umontreal.ca (Postfix, from userid 20848) id CE5F980CBE; Fri, 3 Apr 2009 17:43:37 -0400 (EDT) From: Stefan Monnier To: Joe Corneli Cc: 2881-done@debbugs.gnu.org Subject: Re: bug#2881: 23.0.91; inconsistent regexps with "explicitly numbered group" Message-ID: References: Date: Fri, 03 Apr 2009 17:43:37 -0400 In-Reply-To: (Joe Corneli's message of "Fri, 3 Apr 2009 16:41:39 -0400") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.0.92 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-NAI-Spam-Score: 0 X-NAI-Spam-Rules: 1 Rules triggered RV3246=0 > What about the comparison between Form 4 and Form 5, > which seems to not only go against the description of `\|' > you quoted, but to contain another internal inconsistency > (whether or not the final `}' is matched)? Still quite expected. Your regexp is: "\n*?\\\\begin{\\(?1:lisp\\)\\|\\(?1:idea\\)\\|\\(?1:common\\)}" i.e. "\n*?\\\\begin{\\(?1:lisp\\)" or "\\(?1:idea\\)" or "\\(?1:common\\)}" Clearly, the "lisp" alternative doesn't match a closing } Stefan From unknown Sun Jun 22 00:05:56 2025 Received: (at fakecontrol) by fakecontrolmessage; To: internal_control@debbugs.gnu.org From: $requester Subject: Internal Control Message-Id: bug archived. Date: Sat, 02 May 2009 14:24:08 +0000 User-Agent: Fakemail v42.6.9 # A New Hope # A log time ago, in a galaxy far, far away # something happened. # # Magically this resulted in the following # action being taken, but this fake control # message doesn't tell you why it happened # # The action: # bug archived. thanks # This fakemail brought to you by your local debbugs # administrator