GNU bug report logs - #5189
BibTeX mode problems: non-existent directories, faulty regexp-opt

Previous Next

Package: emacs;

Reported by: Michael Ernst <michael.ernst <at> gmail.com>

Date: Sat, 12 Dec 2009 06:50:03 UTC

Severity: normal

Tags: moreinfo, unreproducible

Done: Glenn Morris <rgm <at> gnu.org>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: help-debbugs <at> gnu.org (GNU bug Tracking System)
To: Glenn Morris <rgm <at> gnu.org>
Cc: tracker <at> debbugs.gnu.org
Subject: bug#5189: closed (BibTeX mode problems:  non-existent
 directories, faulty regexp-opt)
Date: Sun, 10 Jul 2011 01:32:02 +0000
[Message part 1 (text/plain, inline)]
Your message dated Sat, 09 Jul 2011 21:31:52 -0400
with message-id <un39ieex9z.fsf <at> fencepost.gnu.org>
and subject line Re: bug#5189: BibTeX mode problems:  non-existent directories, faulty regexp-opt
has caused the GNU bug report #5189,
regarding BibTeX mode problems:  non-existent directories, faulty regexp-opt
to be marked as done.

(If you believe you have received this mail in error, please contact
help-debbugs <at> gnu.org.)


-- 
5189: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=5189
GNU Bug Tracking System
Contact help-debbugs <at> gnu.org with problems
[Message part 2 (message/rfc822, inline)]
From: Michael Ernst <michael.ernst <at> gmail.com>
To: Roland Winkler <roland.winkler <at> physik.uni-erlangen.de>
Cc: bug-gnu-emacs <bug-gnu-emacs <at> gnu.org>
Subject: BibTeX mode problems:  non-existent directories, faulty regexp-opt
Date: Fri, 11 Dec 2009 22:40:14 -0800 (PST)
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  <mernst <at> alum.mit.edu>

	* 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



[Message part 3 (message/rfc822, inline)]
From: Glenn Morris <rgm <at> gnu.org>
To: 5189-done <at> debbugs.gnu.org
Subject: Re: bug#5189: BibTeX mode problems:  non-existent directories,
	faulty regexp-opt
Date: Sat, 09 Jul 2011 21:31:52 -0400
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?


This bug report was last modified 14 years and 15 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.