Hi Paul, Paul Nelson <[email protected]> writes:
> Thanks, your comments were very helpful. I implemented them (with > mild modification). You're welcome. > Your suggestion about incorporating the numbers into CAPF features > seems worth pursuing. I didn't quickly spot a way to hook into > TeX-complete-symbol without rewriting it, but was able to add > annotations for M-x completion-at-point. If you're curious, see the > updated file at https://github.com/ultronozm/tex-numbers.el. Hmm, I was more thinking about plugging something into `LaTeX-completion-label-annotation-function' which makes the addition. So basically what you do now with `tex-numbers-label-annotation-function'. That is probably easier, I think. > Maybe such annotations are what you had in mind, but I find it much > more useful in practice to be able to narrow the completions using > (vertico/orderless/... and) the label number itself. The interface > would thus be to start completing, and then type "(1.1)" to narrow the > completions to those featuring the label number (1.1). I did hack > something like this together using consult (see around > https://github.com/ultronozm/czm-tex-ref.el/blob/91b824b62507471585331af15d3c78cc4b5c3c01/czm-tex-ref.el#L206 > and attached), but don't know how to incorporate it directly into > CAPF. I can't tell either. Maybe you want to ask on help-gnu-emacs. > 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? > Yes, I just like the balanced look of cond in minor-mode definitions. > I stole the idea from the source code of eglot. 👍 Best, Arash
