GNU bug report logs - #38258
12.2.0; reftex-view-crossref on citation pre- and postnotes

Previous Next

Package: auctex;

Reported by: Gustavo Barros <gusbrs.2016 <at> gmail.com>

Date: Mon, 18 Nov 2019 17:17:02 UTC

Severity: normal

Found in version 12.2.0

Done: Arash Esbati <arash <at> gnu.org>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: Gustavo Barros <gusbrs.2016 <at> gmail.com>
To: Arash Esbati <arash <at> gnu.org>
Cc: 38258 <at> debbugs.gnu.org
Subject: bug#38258: 12.2.0; reftex-view-crossref on citation pre- and postnotes
Date: Tue, 25 Aug 2020 17:42:46 -0300
Hi Arash,

On Tue, 25 Aug 2020 at 17:11, Arash Esbati <arash <at> gnu.org> wrote:

>> 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':
>

I know, Arash... I like `reftex-auto-view-crossref' and enable it, but 
the problem is not with the intended behavior, but with the not useful 
and annoying echo which comes when point is idle *outside* a key 
argument, if it happens to be in a pre/postnote.  And why should 
`reftex-view-crossref' behave differently when point is between "4" and 
"5", in the MWE, and when it is in the following line, outside the 
citation macro altogether?  Why run `reftex-view-cr-cite' when we 
already know we are not in a citation key, but in a postnote?

To be very explicit, the command in question is `reftex-view-crossref`, 
and it is also called by `reftex-view-crossref-when-idle' which is 
responsible for the echo message.  `reftex-view-crossref` checks if 
point is within a macro with `(car (reftex-what-macro-safe 1))', and 
later checks if it is a citation macro with `(string-match 
"\\`\\\\cite\\|cite\\([s*]\\|texts?\\)?\\'\\|bibentry" macro)'. My 
suggestion is just to add a further check to see if we are indeed in a 
mandatory argument (a citation key).

Best,
Gustavo.






This bug report was last modified 1 year and 36 days ago.

Previous Next


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