[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
AUCTeX and in-buffer completion
From: |
Arash Esbati |
Subject: |
AUCTeX and in-buffer completion |
Date: |
Fri, 14 Oct 2022 12:54:08 +0200 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 |
Hi all,
AUCTeX is known to do minibuffer query and completion when adding new
macros or environments incl. arguments. One thing missing is when one
wants to add/change keyval or other elements to existing constructs in
the buffer -- there is no in-buffer completion.
I was thinking about how to use the current information available in
`TeX-symbol-list' and `LaTeX-environment-list' in order to provide
in-buffer completion. The result is attached and looks like this (with
company-mode which I use):
The implementation solely relies on Emacs and should work with Corfu,
Company etc. In order to use the library, put the file somewhere, load
your .tex file, do
M-x load-library RET /pathto/latex-capf.el RET
and paste this in your .tex file and eval it:
(add-hook 'completion-at-point-functions
#'LaTeX-arguments-completion-at-point t t)
There is also a git branch feature/capf with the latest version.
Is it worth to integrate this into AUCTeX? It will need some effort to
adjust latex.el and the styles we have in order to make them work with
the ideas here, so the question is, if this is a needed feature?
Any comments welcome.
Best, Arash
latex-capf.el
Description: application/emacs-lisp
- AUCTeX and in-buffer completion,
Arash Esbati <=
- Re: AUCTeX and in-buffer completion, Uwe Brauer, 2022/10/14
- Re: AUCTeX and in-buffer completion, Arash Esbati, 2022/10/14
- Re: AUCTeX and in-buffer completion, Uwe Brauer, 2022/10/14
- Re: AUCTeX and in-buffer completion, Arash Esbati, 2022/10/14
- Re: AUCTeX and in-buffer completion, Uwe Brauer, 2022/10/14
- Re: AUCTeX and in-buffer completion, Arash Esbati, 2022/10/14
- Re: AUCTeX and in-buffer completion, Uwe Brauer, 2022/10/14
- Re: AUCTeX and in-buffer completion, Uwe Brauer, 2022/10/14
Re: AUCTeX and in-buffer completion, Ikumi Keita, 2022/10/18