auctex-devel
[Top][All Lists]
Advanced

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

Re: [AUCTeX-devel] Feature Request


From: Tassilo Horn
Subject: Re: [AUCTeX-devel] Feature Request
Date: Fri, 18 Dec 2015 22:53:52 +0100
User-agent: Gnus/5.130014 (Ma Gnus v0.14) Emacs/25.0.50 (gnu/linux)

Tassilo Horn <address@hidden> writes:

>>>    > I have been recommended to mail the list with a feature request, I
>>>    > hope this is the right place.
>>>
>>>    > Currently if file.tex has \cite{ref2} and ref2 does not exist in the
>>>    > bib file, it displays no differently to \cite{ref1} which does.
>>>
>>>    > Is it possible to get some sort of visual indication that ref2
>>>    > does not exist in the bib file? A red squiggly line, highlight,
>>>    > different colour, something?
>
> This would be a very nice feature.  RefTeX basically has the
> functionality to know which citations are available in the bib file(s).
> See `reftex-extract-bib-entries' and
> `reftex-extract-bib-entries-from-thebibliography'.
>
> So we could add some variable like `reftex-known-bibtex-entry-keys'
> containing all known reftex entry keys.  I guess a hash-table would be
> best because we need a fast contains-check.

I just had a better idea: We could just collect the _undefined_
references and citations in `TeX-LaTeX-sentinel' and friends.  We
already parse LaTeX output of these forms

  LaTeX Warning: Reference `foolabel' on page 1 undefined on input line 6.
  LaTeX Warning: Citation `barcite' on page 1 undefined on input line 8.

just don't do much with that information except for noticing that we
have to run bibtex and latex again.

Then we could have that feature also without font-lock.  We know the
undefined labels and citations and the lines they are in, so we could
just use overlays (which would make the feature Emacs-specific) and
update them after a LaTeX run (or the last LaTeX run in
`TeX-command-run-all').

Additionally, we could have `TeX-undefined-refs-and-cites-overview' in
analogy to `TeX-error-overview'.  That would be really useful!

Bye,
Tassilo




reply via email to

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