bug-auctex
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Bug-AUCTeX] RefTeX: alpha-numeric BibTeX types ignored


From: Eric J Haywiser
Subject: [Bug-AUCTeX] RefTeX: alpha-numeric BibTeX types ignored
Date: Wed, 28 Mar 2007 17:41:24 -0400 (EDT)

Bibtypes in ones BibTeX database that are alpha-numeric e.g.

@style3report{key,
        title={A report of on the state of RefTeX},
        author={R.T. Fix},
        year={2007}
}

are valid from the BibTeX perspecitve but are ignored in RefTeX. I believe this relates to a problem with some of the regular expressions in
reftex-cite.el which use [a-zA-Z] rather than \\w+ when matching the type.

The following simple change resolves this issue, but may have other
side effects.  Perhaps a knowledgable party could perform a proper fix?

Kind regards and many thanks for this otherwise wonderful tool.

-Eric

*** reftex-cite.el~     2007-03-27 22:15:42.000000000 -0400
--- reftex-cite.el      2007-03-27 22:25:34.000000000 -0400
***************
*** 100,106 ****
    (let* ((re
          (if item
              (concat "\\\\bibitem\\(\\[[^]]*\\]\\)?{" (regexp-quote key) "}")
!           (concat "@[a-zA-Z]+[ \t\n\r]*[{(][ \t\n\r]*" (regexp-quote key)
                    "[, \t\r\n}]")))
         (buffer-conf (current-buffer))
           file buf pos)
--- 100,106 ----
    (let* ((re
          (if item
              (concat "\\\\bibitem\\(\\[[^]]*\\]\\)?{" (regexp-quote key) "}")
!           (concat "@\\w+[ \t\n\r]*[{(][ \t\n\r]*" (regexp-quote key)
                    "[, \t\r\n}]")))
         (buffer-conf (current-buffer))
           file buf pos)
***************
*** 199,205 ****
                (catch 'search-again
                  (setq key-point (point))
                  (unless (re-search-backward
!                          "\\(\\`\\|[\n\r]\\)[ address@hidden([a-zA-Z]+\\)[ 
\t\n\r]*[{(]" nil t)
                    (throw 'search-again nil))
                  (setq start-point (point))
                  (goto-char (match-end 0))
--- 199,205 ----
                (catch 'search-again
                  (setq key-point (point))
                  (unless (re-search-backward
!                          "\\(\\`\\|[\n\r]\\)[ address@hidden(\\w+\\)[ 
\t\n\r]*[{(]" nil t)
                    (throw 'search-again nil))
                  (setq start-point (point))
                  (goto-char (match-end 0))




reply via email to

[Prev in Thread] Current Thread [Next in Thread]