[Top][All Lists]

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

Re: [AUCTeX-devel] RefTeX reference format selection window

From: Tassilo Horn
Subject: Re: [AUCTeX-devel] RefTeX reference format selection window
Date: Tue, 30 Jul 2013 14:31:23 +0200
User-agent: Gnus/5.130008 (Ma Gnus v0.8) Emacs/24.3.50 (gnu/linux)

Mosè Giordano <address@hidden> writes:

Hi Mosè,

> in recent RefTeX versions has been introduced a new reference format
> selection window when one runs `C-c )'.  Personally, I don't like it
> very much because I find in most cases it just adds a useless step,
> but I can disable it and it's fine with me.
> It it's enabled, this window appears also when one runs, e. g., `C-c
> C-m ref RET' and I don't think this is the expected behavior: if one
> explicitly insert a reference macro probably don't want to select
> another time the reference format.  Moreover, in this case it's
> completely useless since the selected format is ignored.

Indeed, that's annoying and wrong.

> What I suggest is to define a new function which let-binds
> `reftex-ref-macro-prompt' to nil and then call `TeX-arg-label'.
> Currently `TeX-arg-ref' is an alias for `TeX-arg-label', we could
> redefine it something like
> (defun TeX-arg-ref (optional &optional prompt definition)
>   "Let-bind `reftex-ref-macro-prompt' to nil and pass arguments
> to `TeX-arg-label'.
> See the documentation of `TeX-arg-label' for details on the
>   (let ((reftex-ref-macro-prompt nil))
>     (TeX-arg-label optional prompt definition)))
> Then, this should became the function actually called by the macros,
> instead of `TeX-arg-label'.  Comments?

Sounds good to me.  I've evaluated `TeX-arg-ref' above, and now `C-c )'
still has the format selection while `C-c RET ref RET' just inserts \ref
completing only the label with no format selection.  So it seems to just
work with defining that function (and removing the alias), but you
should probably check if there are other places where `TeX-arg-ref' and
`TeX-arg-label' are called, and then decide what's the right one for
each occurence.


reply via email to

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