[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: |
Tue, 16 Apr 2024 23:50:50 +0200 |
Hi Arash,
Thanks, your comments were very helpful. I implemented them (with
mild modification).
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.
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. A similar problem would be to provide an interface for
dynamically restricting CAPF inside \ref{...} to just lemma
environments, or just theorem environments.
> I think this is a matter of taste, but
>
> (cond (clause true)
> (t rest))
>
> is the same as
>
> (if clause
> (progn true)
> rest)
>
> right?
Yes, I just like the balanced look of cond in minor-mode definitions.
I stole the idea from the source code of eglot.
Thanks, best,
Paul
numbers.png
Description: PNG image
- tex-numbers.el, Paul Nelson, 2024/04/16
- Re: tex-numbers.el, Uwe Brauer, 2024/04/16
- Re: tex-numbers.el, Arash Esbati, 2024/04/16
- Re: tex-numbers.el,
Paul Nelson <=
- Re: tex-numbers.el, Arash Esbati, 2024/04/17
- Re: tex-numbers.el, Paul Nelson, 2024/04/17
- Re: tex-numbers.el, Paul Nelson, 2024/04/17
- Re: tex-numbers.el, Arash Esbati, 2024/04/17
- Re: tex-numbers.el, Paul Nelson, 2024/04/17
- Re: tex-numbers.el, Arash Esbati, 2024/04/17