GNU bug report logs -
#51468
reftex-ref-style-alist in amsmath.el
Previous Next
To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 51468 in the body.
You can then email your comments to 51468 AT debbugs.gnu.org in the normal way.
Toggle the display of automated, internal messages from the tracker.
Report forwarded
to
bug-auctex <at> gnu.org
:
bug#51468
; Package
auctex
.
(Thu, 28 Oct 2021 20:31:02 GMT)
Full text and
rfc822 format available.
Acknowledgement sent
to
Gustavo Barros <gusbrs.2016 <at> gmail.com>
:
New bug report received and forwarded. Copy sent to
bug-auctex <at> gnu.org
.
(Thu, 28 Oct 2021 20:31:02 GMT)
Full text and
rfc822 format available.
Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):
Hi All,
`reftex-vars.el' defines the user option `reftex-ref-style-alist' and
includes the "AMSmath" style among the default ones, the same as with
other package specific reference commands. The activation of each of
these entries is controlled by `LaTeX-reftex-ref-style-auto-activate'.
And users can set `reftex-ref-style-alist' so that they choose which
styles may potentially get activated, according to loaded packages in
the style files.
However, `amsmath.el' goes a little further and adds (again) the
"AMSmath" ref style to `reftex-ref-style-alist'. Hence, if an user had
removed it from the variable, the style file overrides that
customization, and the only way to disable this ref style, while keeping
`LaTeX-reftex-ref-style-auto-activate' to `t', is to add an empty
"AMSmath" ref style instead.
But doesn't this re-adding of the ref style in `amsmath.el' defeat the
purpose of the interplay between `reftex-ref-style-alist' and
`LaTeX-reftex-ref-style-auto-activate'? As far as I can tell,
`amsmath.el' is the only style file from the ones included by default in
`reftex-ref-style-alist' which does this. I'd expect it not to do it.
Best regards,
Gustavo.
Information forwarded
to
bug-auctex <at> gnu.org
:
bug#51468
; Package
auctex
.
(Fri, 29 Oct 2021 09:32:02 GMT)
Full text and
rfc822 format available.
Message #8 received at 51468 <at> debbugs.gnu.org (full text, mbox):
Hi Gustavo.
Gustavo Barros <gusbrs.2016 <at> gmail.com> writes:
> `reftex-vars.el' defines the user option `reftex-ref-style-alist' and
> includes the "AMSmath" style among the default ones, the same as with
> other package specific reference commands. The activation of each of
> these entries is controlled by
> `LaTeX-reftex-ref-style-auto-activate'. And users can set
> `reftex-ref-style-alist' so that they choose which styles may
> potentially get activated, according to loaded packages in the style
> files.
>
> However, `amsmath.el' goes a little further and adds (again) the
> "AMSmath" ref style to `reftex-ref-style-alist'. Hence, if an user
> had removed it from the variable, the style file overrides that
> customization, and the only way to disable this ref style, while
> keeping `LaTeX-reftex-ref-style-auto-activate' to `t', is to add an
> empty "AMSmath" ref style instead.
My understanding of `reftex-ref-style-alist' being a custom variable is
that you can toggle the keys for the reference macros if you want to.
The reference styles get activated:
a) in RefTeX without AUCTeX: If you add an entry to
`reftex-ref-style-default-list'
,----[ C-h v reftex-ref-style-default-list RET ]
| reftex-ref-style-default-list is a variable defined in ‘reftex-vars.el’.
|
| Its value is ("Default")
|
| List of reference styles to be activated by default.
| The order is significant and controls the order in which macros
| can be cycled in the buffer for selecting a label. The entries
| in the list have to match the respective reference style names
| used in the variable ‘reftex-ref-style-alist’.
`----
b) in AUCTeX: When you have set `LaTeX-reftex-ref-style-auto-activate'
to t.
So deleting an entry in `reftex-ref-style-alist' isn't intended to
prevent a reference style from being activated.
> But doesn't this re-adding of the ref style in `amsmath.el' defeat the
> purpose of the interplay between `reftex-ref-style-alist' and
> `LaTeX-reftex-ref-style-auto-activate'? As far as I can tell,
> `amsmath.el' is the only style file from the ones included by default
> in `reftex-ref-style-alist' which does this. I'd expect it not to do
> it.
Re-adding the entry is due to supporting older Emacs'en. The entry for
"AMSmath" was not present as the variable was introduced[1]. That entry
was added in 2018 and amsmath.el tries to fill the gap.
I think the bottom line is set `LaTeX-reftex-ref-style-auto-activate' to
nil if you don't want AUCTeX to activate that reference style.
,----[ C-h v LaTeX-reftex-ref-style-auto-activate RET ]
| LaTeX-reftex-ref-style-auto-activate is a variable defined in ‘tex-style.el’.
|
| Its value is t
|
| Whether to activate automatically RefTeX reference styles.
`----
Best, Arash
Footnotes:
[1] http://git.savannah.gnu.org/cgit/emacs.git/commit/lisp/textmodes/reftex-vars.el?id=4f595e1504dfbb6f81e04fb98aa4b033dd5398a4
Information forwarded
to
bug-auctex <at> gnu.org
:
bug#51468
; Package
auctex
.
(Fri, 29 Oct 2021 10:52:02 GMT)
Full text and
rfc822 format available.
Message #11 received at 51468 <at> debbugs.gnu.org (full text, mbox):
Hi Arash,
On Fri, 29 Oct 2021 at 11:31, Arash Esbati <arash <at> gnu.org> wrote:
> My understanding of `reftex-ref-style-alist' being a custom variable
> is
> that you can toggle the keys for the reference macros if you want to.
> The reference styles get activated:
>
> a) in RefTeX without AUCTeX: If you add an entry to
> `reftex-ref-style-default-list'
>
> ,----[ C-h v reftex-ref-style-default-list RET ]
> | reftex-ref-style-default-list is a variable defined in
> ‘reftex-vars.el’.
> |
> | Its value is ("Default")
> |
> | List of reference styles to be activated by default.
> | The order is significant and controls the order in which macros
> | can be cycled in the buffer for selecting a label. The entries
> | in the list have to match the respective reference style names
> | used in the variable ‘reftex-ref-style-alist’.
> `----
>
> b) in AUCTeX: When you have set `LaTeX-reftex-ref-style-auto-activate'
> to t.
>
> So deleting an entry in `reftex-ref-style-alist' isn't intended to
> prevent a reference style from being activated.
Understood. I was aware of `reftex-ref-style-default-list', but the
only way to keep the ref styles responsive to the loaded packages is the
AUCTeX way, leaving `LaTeX-reftex-ref-style-auto-activate' to t.
> Re-adding the entry is due to supporting older Emacs'en. The entry
> for
> "AMSmath" was not present as the variable was introduced[1]. That
> entry
> was added in 2018 and amsmath.el tries to fill the gap.
That's a good point, I hadn't thought of it. And explains the
difference to "Varioref", "Cleveref", "Hyperref" etc. too.
> I think the bottom line is set `LaTeX-reftex-ref-style-auto-activate'
> to
> nil if you don't want AUCTeX to activate that reference style.
>
> ,----[ C-h v LaTeX-reftex-ref-style-auto-activate RET ]
> | LaTeX-reftex-ref-style-auto-activate is a variable defined in
> ‘tex-style.el’.
> |
> | Its value is t
> |
> | Whether to activate automatically RefTeX reference styles.
> `----
Well, I do like what `LaTeX-reftex-ref-style-auto-activate' does for me,
I just don't use `\eqref' enough to grant it an entry there. But, no
worries, it is easy to keep an `("AMSmath" "amsmath" nil)' in
`reftex-ref-style-alist' just as well.
Thanks for considering and for the thoughtful answer.
Best,
Gustavo.
Information forwarded
to
bug-auctex <at> gnu.org
:
bug#51468
; Package
auctex
.
(Fri, 29 Oct 2021 14:25:01 GMT)
Full text and
rfc822 format available.
Message #14 received at 51468 <at> debbugs.gnu.org (full text, mbox):
close 51468
tags 51468 notabug
thanks
Gustavo Barros <gusbrs.2016 <at> gmail.com> writes:
> Well, I do like what `LaTeX-reftex-ref-style-auto-activate' does for
> me, I just don't use `\eqref' enough to grant it an entry there. But,
> no worries, it is easy to keep an `("AMSmath" "amsmath" nil)' in
> `reftex-ref-style-alist' just as well.
>
> Thanks for considering and for the thoughtful answer.
Glad we have this sorted out. I'm closing this report.
Best, Arash
bug closed, send any further explanations to
51468 <at> debbugs.gnu.org and Gustavo Barros <gusbrs.2016 <at> gmail.com>
Request was from
Arash Esbati <arash <at> gnu.org>
to
control <at> debbugs.gnu.org
.
(Fri, 29 Oct 2021 14:25:02 GMT)
Full text and
rfc822 format available.
Added tag(s) notabug.
Request was from
Arash Esbati <arash <at> gnu.org>
to
control <at> debbugs.gnu.org
.
(Fri, 29 Oct 2021 14:25:02 GMT)
Full text and
rfc822 format available.
bug archived.
Request was from
Debbugs Internal Request <help-debbugs <at> gnu.org>
to
internal_control <at> debbugs.gnu.org
.
(Sat, 27 Nov 2021 12:24:06 GMT)
Full text and
rfc822 format available.
This bug report was last modified 3 years and 202 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.