From unknown Mon Aug 18 09:09:18 2025 X-Loop: owner@emacsbugs.donarmstrong.com Subject: bug#5189: BibTeX mode problems: non-existent directories, faulty regexp-opt Reply-To: Michael Ernst , 5189@debbugs.gnu.org Resent-From: Michael Ernst Resent-To: bug-submit-list@lists.donarmstrong.com Resent-CC: Emacs Bugs 2Resent-Date: Sat, 12 Dec 2009 06:50:03 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-Emacs-PR-Message: report 5189 X-Emacs-PR-Package: emacs X-Emacs-PR-Keywords: Received: via spool by submit@emacsbugs.donarmstrong.com id=B.126060003111590 (code B ref -1); Sat, 12 Dec 2009 06:50:03 +0000 Received: (at submit) by emacsbugs.donarmstrong.com; 12 Dec 2009 06:40:31 +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.0 required=4.0 tests=MURPHY_DRUGS_REL8 autolearn=ham version=3.2.5-bugs.debian.org_2005_01_02 Received: from lists.gnu.org (lists.gnu.org [199.232.76.165]) by rzlab.ucr.edu (8.14.3/8.14.3/Debian-5) with ESMTP id nBC6eTV4011587 for ; Fri, 11 Dec 2009 22:40:30 -0800 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1NJLeW-0001zl-Um for bug-gnu-emacs@gnu.org; Sat, 12 Dec 2009 01:40:28 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1NJLeR-0001u1-GU for bug-gnu-emacs@gnu.org; Sat, 12 Dec 2009 01:40:27 -0500 Received: from [199.232.76.173] (port=32926 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1NJLeR-0001tl-7E for bug-gnu-emacs@gnu.org; Sat, 12 Dec 2009 01:40:23 -0500 Received: from mail-yw0-f172.google.com ([209.85.211.172]:40985) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1NJLeQ-0002Mb-Tt for bug-gnu-emacs@gnu.org; Sat, 12 Dec 2009 01:40:23 -0500 Received: by ywh2 with SMTP id 2so1676386ywh.27 for ; Fri, 11 Dec 2009 22:40:21 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:date:message-id:to:cc:subject :from:mime-version:content-type:content-transfer-encoding; bh=hlEf65lnogmIIkZj9ptVGUD1xj5uRmzOX0eoVBZka2g=; b=C6un1PQKYDRyZgQQ+5nRwivAqveionau1dnWIcqFkI0TLniS04h39h6Ke1Yc6oIa99 UVLLD6BYfuMYgkA6nGJ2c/U5aURbuF/cMajXfdfNJEfr7LHs2K7Wnz1KPHwcnOolm9Dq vdanMIMM+F6ZyC3z3Ca2waw4c6LSESuwOjidM= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=date:message-id:to:cc:subject:from:mime-version:content-type :content-transfer-encoding; b=DkhEN/gnk4bQo/kEOAlfULbRPeAWZ7vMvBoQ+SMOHBJ6wxZZ05HIIQr7wJiUO1JylR c+lR0b18p6W33DHYtxpQjJwWFu9tGjN55rqeX1Yb0xJol5n6Jqj0HbjR1kvYjBqiVbWD psE+/9PV3EzEPYNMnm4I1rTNcq1Y99SeArbDI= Received: by 10.150.245.31 with SMTP id s31mr3921535ybh.128.1260600021933; Fri, 11 Dec 2009 22:40:21 -0800 (PST) Received: from localhost (c-98-225-1-133.hsd1.wa.comcast.net [98.225.1.133]) by mx.google.com with ESMTPS id 36sm1186911yxh.13.2009.12.11.22.40.19 (version=TLSv1/SSLv3 cipher=RC4-MD5); Fri, 11 Dec 2009 22:40:21 -0800 (PST) Date: Fri, 11 Dec 2009 22:40:14 -0800 (PST) Message-Id: <20091211.224014.140377569.michael.ernst@gmail.com> To: Roland Winkler cc: bug-gnu-emacs From: Michael Ernst Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6 (newer, 2) bibtex.el uses regexp-opt, which introduces new capturing parentheses that throw off variables like bibtex-type-in-head, which is a regexp subexpression number. (Really, regexp-opt should be rewritten to only use non-capturing parentheses!) The below patch corrects the problem. -Michael Ernst My patches are against: GNU Emacs 23.1.1 (i486-pc-linux-gnu, GTK+ Version 2.18.3) of 2009-11-10 on vernadsky, modified by Debian but the problem also exists in the Emacs CVS repository. ChangeLog entry: 2009-12-11 Michael Ernst * bibtex.el (bibtex-entry-type): Remove regexp-opt, which throws off regexp subexpression numbering. diff -u /home/mernst/emacs/fixes/bibtex.el-orig /home/mernst/emacs/fixes/bibtex.el --- /home/mernst/emacs/fixes/bibtex.el-orig 2009-12-11 22:13:59.000000000 -0800 +++ /home/mernst/emacs/fixes/bibtex.el 2009-12-11 22:15:28.000000000 -0800 @@ -1219,7 +1219,7 @@ (defvar bibtex-entry-type (concat "@[ \t]*\\(?:" - (regexp-opt (mapcar 'car bibtex-entry-field-alist)) "\\)") + (mapconcat 'car bibtex-entry-field-alist "\\|") "\\)") "Regexp matching the type of a BibTeX entry.") (defvar bibtex-entry-head From unknown Mon Aug 18 09:09:18 2025 X-Loop: owner@emacsbugs.donarmstrong.com Subject: bug#5189: BibTeX mode problems: non-existent directories, faulty regexp-opt Reply-To: "Roland Winkler" , 5189@debbugs.gnu.org Resent-From: "Roland Winkler" Resent-To: bug-submit-list@lists.donarmstrong.com Resent-CC: Emacs Bugs 2Resent-Date: Sat, 12 Dec 2009 16:00:04 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-Emacs-PR-Message: followup 5189 X-Emacs-PR-Package: emacs X-Emacs-PR-Keywords: Received: via spool by 5189-submit@emacsbugs.donarmstrong.com id=B5189.126063321610493 (code B ref 5189); Sat, 12 Dec 2009 16:00:04 +0000 Received: (at 5189) by emacsbugs.donarmstrong.com; 12 Dec 2009 15:53: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=-0.4 required=4.0 tests=AWL,MURPHY_SEX_L4 autolearn=no version=3.2.5-bugs.debian.org_2005_01_02 Received: from tfkpsv.physik.uni-erlangen.de (tfkpsv.physik.uni-erlangen.de [131.188.164.197]) by rzlab.ucr.edu (8.14.3/8.14.3/Debian-5) with ESMTP id nBCFrY8J010490 for <5189@emacsbugs.donarmstrong.com>; Sat, 12 Dec 2009 07:53:35 -0800 Received: from regnitz.physics.niu.edu (adsl-68-77-29-151.dsl.emhril.ameritech.net [68.77.29.151]) by tfkpsv.physik.uni-erlangen.de (Postfix) with ESMTP id A204885575; Sat, 12 Dec 2009 16:53:28 +0100 (CET) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Message-ID: <19235.48239.805276.873424@regnitz.physics.niu.edu> Date: Sat, 12 Dec 2009 09:53:19 -0600 From: "Roland Winkler" To: Michael Ernst Cc: 5189@debbugs.gnu.org, Stefan Monnier In-Reply-To: <20091211.224014.140377569.michael.ernst@gmail.com> References: <20091211.224014.140377569.michael.ernst@gmail.com> X-Mailer: VM 8.2 trial under 23.1.50.1 (i686-pc-linux-gnu) Hi Michael Thanks for the bug report! First of all, I am including an email I recently got from Stefan Monnier as it applies to your bug report, too. (Oh well, you are not the only one doing this...) (And I am CC'ing this email to 5189@debbugs.gnu.org so that hopefully we do not get yet more bug reports.) On Sun Dec 6 2009 Stefan Monnier wrote: > Please, please, pretty please don't ever Cc: to > emacs-pretest-bug@gnu.org or bug-gnu-emacs@gnu.org: instead, send your > email directly there and nowhere else. > > It's not your fault, but this leads to messed up bug-reports if people > reply to the message they got (and then Cc emacs-pretest-bug@gnu.org or > bug-gnu-emacs@gnu.org along the way as well, thus creating more > bug-reports in the tracker). > > Hopefully we'll figure some way to address this brain-damage, but for > now, we have to live with this restriction, Now on your report: > bibtex.el uses regexp-opt, which introduces new capturing > parentheses that throw off variables like bibtex-type-in-head, > which is a regexp subexpression number. (Really, regexp-opt should > be rewritten to only use non-capturing parentheses!) I cannot reproduce this. For me, regexp-opt does give "shy group" constructs \(?: ... \) that work fine with subexpression numbers like bibtex-type-in-head. Can you give a more specific test case based on emacs --no-init-file that gives you incorrect behavior? It appears to me that you might load some code that redefines regexp-opt before loading bibtex-mode. Also the subject line of your report mentions "non-existent directories". Can you be more specific? Roland From rgm@gnu.org Mon Dec 14 09:17:34 2009 Received: (at control) by emacsbugs.donarmstrong.com; 14 Dec 2009 17:17:34 +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=-5.1 required=4.0 tests=AWL,ONEWORD,VALID_BTS_CONTROL, X_DEBBUGS_NO_ACK 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.14.3/8.14.3/Debian-5) with ESMTP id nBEHHXId010621 for ; Mon, 14 Dec 2009 09:17:34 -0800 Received: from rgm by fencepost.gnu.org with local (Exim 4.69) (envelope-from ) id 1NKEY7-00009e-Fs; Mon, 14 Dec 2009 12:17:31 -0500 MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Message-ID: <19238.29483.461258.852673@fencepost.gnu.org> Date: Mon, 14 Dec 2009 12:17:31 -0500 From: Glenn Morris To: control Subject: control X-Attribution: GM X-Mailer: VM (www.wonderworks.com/vm), GNU Emacs (www.gnu.org/software/emacs) X-Hue: magenta X-Ran: I2fFS!SyB2u;cv-Rg)rxb"GY98Ip/4@pJWIdJBb[f,H=dr8.^!63KQP*#G2$7{[2mAvc*P X-Debbugs-No-Ack: yes tags 5190 moreinfo unreproducible tags 5189 moreinfo unreproducible reassign 5199 spam reassign 5200 spam reassign 5201 spam reassign 5203 spam reassign 5205 spam reassign 5206 emacs,ns reassign 5207 spam reassign 5209 emacs,cc-mode reassign 5210 spam reassign 5212 spam From unknown Mon Aug 18 09:09:18 2025 MIME-Version: 1.0 X-Mailer: MIME-tools 5.427 (Entity 5.427) X-Loop: help-debbugs@gnu.org From: help-debbugs@gnu.org (GNU bug Tracking System) To: Michael Ernst Subject: bug#5189: closed (Re: bug#5189: BibTeX mode problems: non-existent directories, faulty regexp-opt) Message-ID: References: <20091211.224014.140377569.michael.ernst@gmail.com> X-Gnu-PR-Message: they-closed 5189 X-Gnu-PR-Package: emacs X-Gnu-PR-Keywords: unreproducible moreinfo Reply-To: 5189@debbugs.gnu.org Date: Sun, 10 Jul 2011 01:32:03 +0000 Content-Type: multipart/mixed; boundary="----------=_1310261523-1388-1" This is a multi-part message in MIME format... ------------=_1310261523-1388-1 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" Your bug report #5189: BibTeX mode problems: non-existent directories, faulty regexp-opt which was filed against the emacs package, has been closed. The explanation is attached below, along with your original report. If you require more details, please reply to 5189@debbugs.gnu.org. --=20 5189: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=3D5189 GNU Bug Tracking System Contact help-debbugs@gnu.org with problems ------------=_1310261523-1388-1 Content-Type: message/rfc822 Content-Disposition: inline Content-Transfer-Encoding: 7bit Received: (at 5189-done) by debbugs.gnu.org; 10 Jul 2011 01:32:02 +0000 Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1QfisK-0000MA-Oo for submit@debbugs.gnu.org; Sat, 09 Jul 2011 21:32:01 -0400 Received: from fencepost.gnu.org ([140.186.70.10]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1QfisI-0000Lw-KQ for 5189-done@debbugs.gnu.org; Sat, 09 Jul 2011 21:31:59 -0400 Received: from localhost ([127.0.0.1]:56213) by fencepost.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QfisD-0004Zi-0u; Sat, 09 Jul 2011 21:31:53 -0400 From: Glenn Morris To: 5189-done@debbugs.gnu.org Subject: Re: bug#5189: BibTeX mode problems: non-existent directories, faulty regexp-opt References: <20091211.224014.140377569.michael.ernst@gmail.com> <19235.48239.805276.873424@regnitz.physics.niu.edu> X-Spook: Watergate Uzbekistan SHA warfare BLU-114/B Leuken-Baden X-Ran: ?|S+6`W47XcNi-.NU(':b09`FG>:9F6tAs.b*+7r&h2KJqfLbNOa%|Yx,$dhAnB/\uneE0 X-Hue: magenta X-Attribution: GM Date: Sat, 09 Jul 2011 21:31:52 -0400 In-Reply-To: <19235.48239.805276.873424@regnitz.physics.niu.edu> (Roland Winkler's message of "Sat, 12 Dec 2009 09:53:19 -0600") Message-ID: User-Agent: Gnus (www.gnus.org), GNU Emacs (www.gnu.org/software/emacs/) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Spam-Score: -6.4 (------) X-Debbugs-Envelope-To: 5189-done X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -6.4 (------) This bug is being closed because it could not be reproduced and there was no response to a request for more information. If you reply with the requested information it can be reopened. You can view the whole report at http://debbugs.gnu.org/BUGNUMBER "Roland Winkler" wrote: > I cannot reproduce this. For me, regexp-opt does give "shy group" > constructs \(?: ... \) that work fine with subexpression numbers > like bibtex-type-in-head. Can you give a more specific test case > based on emacs --no-init-file that gives you incorrect behavior? > It appears to me that you might load some code that redefines > regexp-opt before loading bibtex-mode. > > Also the subject line of your report mentions "non-existent > directories". Can you be more specific? ------------=_1310261523-1388-1 Content-Type: message/rfc822 Content-Disposition: inline Content-Transfer-Encoding: 7bit Received: (at submit) by emacsbugs.donarmstrong.com; 12 Dec 2009 06:40:31 +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.0 required=4.0 tests=MURPHY_DRUGS_REL8 autolearn=ham version=3.2.5-bugs.debian.org_2005_01_02 Received: from lists.gnu.org (lists.gnu.org [199.232.76.165]) by rzlab.ucr.edu (8.14.3/8.14.3/Debian-5) with ESMTP id nBC6eTV4011587 for ; Fri, 11 Dec 2009 22:40:30 -0800 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1NJLeW-0001zl-Um for bug-gnu-emacs@gnu.org; Sat, 12 Dec 2009 01:40:28 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1NJLeR-0001u1-GU for bug-gnu-emacs@gnu.org; Sat, 12 Dec 2009 01:40:27 -0500 Received: from [199.232.76.173] (port=32926 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1NJLeR-0001tl-7E for bug-gnu-emacs@gnu.org; Sat, 12 Dec 2009 01:40:23 -0500 Received: from mail-yw0-f172.google.com ([209.85.211.172]:40985) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1NJLeQ-0002Mb-Tt for bug-gnu-emacs@gnu.org; Sat, 12 Dec 2009 01:40:23 -0500 Received: by ywh2 with SMTP id 2so1676386ywh.27 for ; Fri, 11 Dec 2009 22:40:21 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:date:message-id:to:cc:subject :from:mime-version:content-type:content-transfer-encoding; bh=hlEf65lnogmIIkZj9ptVGUD1xj5uRmzOX0eoVBZka2g=; b=C6un1PQKYDRyZgQQ+5nRwivAqveionau1dnWIcqFkI0TLniS04h39h6Ke1Yc6oIa99 UVLLD6BYfuMYgkA6nGJ2c/U5aURbuF/cMajXfdfNJEfr7LHs2K7Wnz1KPHwcnOolm9Dq vdanMIMM+F6ZyC3z3Ca2waw4c6LSESuwOjidM= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=date:message-id:to:cc:subject:from:mime-version:content-type :content-transfer-encoding; b=DkhEN/gnk4bQo/kEOAlfULbRPeAWZ7vMvBoQ+SMOHBJ6wxZZ05HIIQr7wJiUO1JylR c+lR0b18p6W33DHYtxpQjJwWFu9tGjN55rqeX1Yb0xJol5n6Jqj0HbjR1kvYjBqiVbWD psE+/9PV3EzEPYNMnm4I1rTNcq1Y99SeArbDI= Received: by 10.150.245.31 with SMTP id s31mr3921535ybh.128.1260600021933; Fri, 11 Dec 2009 22:40:21 -0800 (PST) Received: from localhost (c-98-225-1-133.hsd1.wa.comcast.net [98.225.1.133]) by mx.google.com with ESMTPS id 36sm1186911yxh.13.2009.12.11.22.40.19 (version=TLSv1/SSLv3 cipher=RC4-MD5); Fri, 11 Dec 2009 22:40:21 -0800 (PST) Date: Fri, 11 Dec 2009 22:40:14 -0800 (PST) Message-Id: <20091211.224014.140377569.michael.ernst@gmail.com> To: Roland Winkler cc: bug-gnu-emacs Subject: BibTeX mode problems: non-existent directories, faulty regexp-opt From: Michael Ernst Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6 (newer, 2) bibtex.el uses regexp-opt, which introduces new capturing parentheses that throw off variables like bibtex-type-in-head, which is a regexp subexpression number. (Really, regexp-opt should be rewritten to only use non-capturing parentheses!) The below patch corrects the problem. -Michael Ernst My patches are against: GNU Emacs 23.1.1 (i486-pc-linux-gnu, GTK+ Version 2.18.3) of 2009-11-10 on vernadsky, modified by Debian but the problem also exists in the Emacs CVS repository. ChangeLog entry: 2009-12-11 Michael Ernst * bibtex.el (bibtex-entry-type): Remove regexp-opt, which throws off regexp subexpression numbering. diff -u /home/mernst/emacs/fixes/bibtex.el-orig /home/mernst/emacs/fixes/bibtex.el --- /home/mernst/emacs/fixes/bibtex.el-orig 2009-12-11 22:13:59.000000000 -0800 +++ /home/mernst/emacs/fixes/bibtex.el 2009-12-11 22:15:28.000000000 -0800 @@ -1219,7 +1219,7 @@ (defvar bibtex-entry-type (concat "@[ \t]*\\(?:" - (regexp-opt (mapcar 'car bibtex-entry-field-alist)) "\\)") + (mapconcat 'car bibtex-entry-field-alist "\\|") "\\)") "Regexp matching the type of a BibTeX entry.") (defvar bibtex-entry-head ------------=_1310261523-1388-1--