Subject: Re: bug#38258: 12.2.0; reftex-view-crossref on citation pre- and postnotes

From: Arash Esbati <[email-masked]>
Date: Tue, 25 Aug 2020 22:11:50 +0200

Gustavo Barros <[email-masked]> writes:

> But my point is not that it should work outside of the key argument,
> which is, as you noted, documented behavior.

Ok, sorry for getting this wrong.

> The point is that the command will do a bibfile search when it is not
> on the key argument, and on top of that, gives the user the wrong
> error message of "no such database argument", when it should be giving
> "Not on a crossref macro argument".

If I take your example and put point on the optional argument [45] and
hit `C-c &', RefTeX says:

    No BibTeX entry with citation key \cite[45]

which makes sense.

> Besides, one does not even need to call it to get the spurious echo of
> "no such database entry", by just leaving point on a prenote/postnote.

True.  You can disable this by setting the variable
`reftex-auto-view-crossref':

,----[ C-h v reftex-auto-view-crossref RET ]
| reftex-auto-view-crossref is a variable defined in ‘reftex-vars.el’.
| Its value is t
| 
|   You can customize this variable.
|   Probably introduced at or before Emacs version 20.4.
| 
| Documentation:
| Non-nil means, initially turn automatic viewing of crossref info on.
| Automatic viewing of crossref info normally uses the echo area.
| Whenever point is idle for more than ‘reftex-idle-time’ seconds on the
| argument of a \ref or \cite macro, and no other message is being
| displayed, the echo area will display information about that cross
| reference.  You can also set the variable to the symbol ‘window’.  In
| this case a small temporary window is used for the display.
| This feature can be turned on and off from the menu
| (Ref->Options).
`----

> (Disclaimer: I haven't tested the current state of things, I'm relying
> on my old report.)

It is safe to assume that nothing groundbreaking happened to RefTeX
during the last 10 months or so :-)

Best, Arash