Thanks, I'll take a look at your suggestion regarding customizing the
annotation function directly.



> > A similar problem would be to provide an interface for dynamically
> > restricting CAPF inside \ref{...} to just lemma environments, or just
> > theorem environments.
>
> I'm not sure if I understand what you're looking after with the above.
> Can you please elabrate a bit?


Sure.  The problem is to decouple
- the string that completing-read completes, and
- the string that completing-read returns.

For example, I would like a variant of the following that returns "foo" or
"bar" (rather than "foo-1" or "bar-2"):

  (completing-read "test: " '(("foo-1" . "foo") ("bar-2" . "bar")))

One could do this by (cdr (assoc (completing-read ...) ...)), but I'd like
to be able to do it just by providing a suitable
completion-at-point-function.  The usefulness would be to sort the tex
label completion candidates according to their number.

Maybe there's a built-in way to do this, but I wasn't able to find one
after several looks through the manual.

Reply via email to