auctex-devel
[Top][All Lists]
Advanced

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

Re: tex-numbers.el


From: Paul Nelson
Subject: Re: tex-numbers.el
Date: Wed, 17 Apr 2024 10:27:53 +0200

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

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