From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Joe Corneli Newsgroups: gmane.emacs.bugs,gmane.emacs.pretest.bugs Subject: bug#2881: 23.0.91; inconsistent regexps with "explicitly numbered group" Date: Fri, 3 Apr 2009 16:41:39 -0400 Message-ID: References: Reply-To: Joe Corneli , 2881@emacsbugs.donarmstrong.com NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable X-Trace: ger.gmane.org 1238792715 11545 80.91.229.12 (3 Apr 2009 21:05:15 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Fri, 3 Apr 2009 21:05:15 +0000 (UTC) Cc: emacs-pretest-bug@gnu.org, 2881@emacsbugs.donarmstrong.com To: Andreas Schwab Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Fri Apr 03 23:06:33 2009 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1Lpqan-00008Q-Rw for geb-bug-gnu-emacs@m.gmane.org; Fri, 03 Apr 2009 23:06:26 +0200 Original-Received: from localhost ([127.0.0.1]:40276 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1LpqZM-0007eT-On for geb-bug-gnu-emacs@m.gmane.org; Fri, 03 Apr 2009 17:04:56 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1LpqYN-0007QV-2q for bug-gnu-emacs@gnu.org; Fri, 03 Apr 2009 17:03:55 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1LpqYJ-0007QA-1R for bug-gnu-emacs@gnu.org; Fri, 03 Apr 2009 17:03:54 -0400 Original-Received: from [199.232.76.173] (port=57847 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1LpqYI-0007Pu-Ey for bug-gnu-emacs@gnu.org; Fri, 03 Apr 2009 17:03:50 -0400 Original-Received: from rzlab.ucr.edu ([138.23.92.77]:35875) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1LpqYH-0006KE-OI for bug-gnu-emacs@gnu.org; Fri, 03 Apr 2009 17:03:50 -0400 Original-Received: from rzlab.ucr.edu (rzlab.ucr.edu [127.0.0.1]) by rzlab.ucr.edu (8.13.8/8.13.8/Debian-3) with ESMTP id n33L3lnH026538; Fri, 3 Apr 2009 14:03:47 -0700 Original-Received: (from debbugs@localhost) by rzlab.ucr.edu (8.13.8/8.13.8/Submit) id n33Kj3nf021172; Fri, 3 Apr 2009 13:45:03 -0700 X-Loop: owner@emacsbugs.donarmstrong.com Resent-From: Joe Corneli Resent-To: bug-submit-list@donarmstrong.com Resent-CC: Emacs Bugs Resent-Date: Fri, 03 Apr 2009 20:45:02 +0000 Resent-Message-ID: Resent-Sender: owner@emacsbugs.donarmstrong.com X-Emacs-PR-Message: followup 2881 X-Emacs-PR-Package: emacs X-Emacs-PR-Keywords: Original-Received: via spool by submit@emacsbugs.donarmstrong.com id=B.123879130520973 (code B ref -1); Fri, 03 Apr 2009 20:45:02 +0000 Original-Received: (at submit) by emacsbugs.donarmstrong.com; 3 Apr 2009 20:41:45 +0000 X-Spam-Bayes: score:0.5 Bayes not run. spammytokens:Tokens not available. hammytokens:Tokens not available. Original-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 Original-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 Original-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 Original-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 Original-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= Original-Received: by 10.150.133.13 with SMTP id g13mr2842617ybd.198.1238791299697; Fri, 03 Apr 2009 13:41:39 -0700 (PDT) In-Reply-To: X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6 (newer, 2) X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6 (newer, 3) Resent-Date: Fri, 03 Apr 2009 17:03:54 -0400 X-BeenThere: bug-gnu-emacs@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:26890 gmane.emacs.pretest.bugs:24228 Archived-At: 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." >