[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [AUCTeX-devel] RefTeX: Create BibTeX file misses citations
From: |
Ralf Angeli |
Subject: |
Re: [AUCTeX-devel] RefTeX: Create BibTeX file misses citations |
Date: |
Sun, 01 Mar 2009 16:04:40 +0100 |
* Wolfgang Mayer (2009-02-25) writes:
> reftex-all-used-citation-keys extracts only the cite keys that appear
> in the last \cite{} command in a line, but skips other \cite{}'s on
> the same line.
>
> Enclosed are:
> * a test case to demonstrate the problem (.tex and .bib file) (tested
> using Emacs 22.3.1, today's CVS checkout, reftex-cite.el revision
> 1.52)
> * a patch to fix it.
Thanks! I've applied the patch.
> - (while (re-search-forward
> "^[^%\n\r]*\\\\\\(bibentry\\|[a-zA-Z]*cite[a-zA-Z]*\\)\\(\\[[^\\]]*\\]\\)?{\\([^}]+\\)}"
> nil t)
> + (while (re-search-forward
> "\\(?:^\\|\\=\\)[^%\n\r]*?\\\\\\(bibentry\\|[a-zA-Z]*cite[a-zA-Z]*\\)\\(\\[[^\\]]*\\]\\)?{\\([^}]+\\)}"
> nil t)
Just as a random thought: Using \= here is a smart way to prevent the
regexp from matching in %-based comments. Should we ever want to use
RefTeX for modes with other comment starters, we might have to think
about doing things like this with `reftex-in-comment'.
--
Ralf
- Re: [AUCTeX-devel] RefTeX: Create BibTeX file misses citations,
Ralf Angeli <=