auctex-devel
[Top][All Lists]
Advanced

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

Re: [AUCTeX-devel] reftex patch to support resolved labels


From: Ralf Angeli
Subject: Re: [AUCTeX-devel] reftex patch to support resolved labels
Date: Sun, 26 Oct 2008 15:01:43 +0100

* Tim Toolan (2008-10-21) writes:

> Attached is a patch which adds support for resolved labels as they
> appear the typeset document to the reftex-reference command.  It
> places them where the counter used to be, and enables interactive
> filtering based on these resolved labels.  It makes selecting labels
> significantly more efficient when looking at typeset document.

I finally had some time to look into your patch.

This looks like an interesting feature.  Something like that might also
be useful when displaying labels in the table of contents (`C-c =').

> To reference a label, run reftex-reference "C-c )", then enter the
> number as it appears in the typeset document (ie. "1.2", "IV", "123").  If
> there is more than one exact match, such as section 3, equation 3, and
> figure 3, press tab to cycle between these choices.

While the display of typeset label numbers might be a good hint when
trying to identify the right label, I think the primary way to select
them should still be based on labels as they are written in the LaTeX
sources.  First, a user should not be required to run LaTeX or look at
the typeset document to identify a label, second, the label name in the
sources often carries more information than the typeset one and third,
the selection from a list (<n>, <p>, <RET> or point and click) is mostly
more convenient than having to type a string with completion.  (The
latter argument is obviously subjective and represents my personal
preference.)  In the label selection process at it is now one can
activate a prompt for typing a label name with completion by pressing
<TAB>.  One could either allow completion on typeset labels here as well
or provide a key to activate a dedicated prompt for asking for the
typeset label name.

> When in this filtering mode, any special commands that are printable
> characters (like "f" to toggle follow mode) must be preceded by a
> "C-c" prefix.  At any time, press the delete key to toggle between
> filter mode and the previous behavior for reftex-reference.

As hinted at above, such a change of behavior might be too drastic.  A
lot of people already have the selection process in their muscle memory.

> It is currently setup to disable prompting for reference macro type
> and label type by default, and going directly to the filter selection
> process.  To revert to the old behavior, set the variables:
>    (setq reftex-ref-type-prompt t)
>    (setq reftex-ref-start-in-filter-mode nil)
>    (setq reftex-ref-macro-prompt t)

Why would you want to change these defaults?

The patch also contained some changes where I am not sure if they are
necessary or good, like commented `message' calls or `defvar' statements
to silence the byte compiler.  But before talking about those (and me
looking deeper into the code) we should agree on the user interface.

-- 
Ralf




reply via email to

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