[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Feature request: Show the characters corresponding to the LaTeX comm
From: |
Hongyi Zhao |
Subject: |
Re: Feature request: Show the characters corresponding to the LaTeX commands displayed in minibuffer. |
Date: |
Tue, 21 Dec 2021 12:20:02 +0800 |
On Mon, Dec 20, 2021 at 8:32 PM Hongyi Zhao <hongyi.zhao@gmail.com> wrote:
>
> On Sun, Dec 19, 2021 at 10:29 PM Tassilo Horn <tsdh@gnu.org> wrote:
> >
> > Tassilo Horn <tsdh@gnu.org> writes:
> >
> > > Or are you asking if that will make that work for all standard AUCTeX
> > > completion functions. I guess so, although just setting
> > >
> > > (setq-local completion-extra-properties
> > > '(:annotation-function
> > > (lambda (x) (message "AF: %S" x) "foo")))
> > >
> > > or let-binding it around the `completing-read' call in
> > > `TeX-insert-macro' had no effect. The function has never been called.
> >
> > I think the reason is that we use just a list as completion table
> > whereas the feature requires a function-valued completion table. That
> > should be doable with `completion-table-dynamic'. Feel free to play
> > with it.
>
> Could someone here give a minimal working example for the question
> discussed here with `completion-table-dynamic'?
I found an example here [1], but I still can't figure out how to
modify it to meet the problems discussed in this topic:
;;; begin
(defun my-completion-function (prefix)
;; You can just ignore the prefix
'("Chewbacca" "C3-PO" "Calrissian"))
(completing-read "Chose one: "
(completion-table-dynamic #'my-completion-function))
;;; end
If someone can provide me with an example of this problem, then I can
try to extend it to all similar situations of the problem discussed
here.
[1] https://emacs.stackexchange.com/a/54707
Regards,
HZ
- Feature request: Show the characters corresponding to the LaTeX commands displayed in minibuffer., Hongyi Zhao, 2021/12/18
- Re: Feature request: Show the characters corresponding to the LaTeX commands displayed in minibuffer., Tassilo Horn, 2021/12/19
- Re: Feature request: Show the characters corresponding to the LaTeX commands displayed in minibuffer., Hongyi Zhao, 2021/12/19
- Re: Feature request: Show the characters corresponding to the LaTeX commands displayed in minibuffer., Tassilo Horn, 2021/12/19
- Re: Feature request: Show the characters corresponding to the LaTeX commands displayed in minibuffer., Hongyi Zhao, 2021/12/19
- Re: Feature request: Show the characters corresponding to the LaTeX commands displayed in minibuffer., Tassilo Horn, 2021/12/19
- Re: Feature request: Show the characters corresponding to the LaTeX commands displayed in minibuffer., Tassilo Horn, 2021/12/19
- Re: Feature request: Show the characters corresponding to the LaTeX commands displayed in minibuffer., Hongyi Zhao, 2021/12/20
- Re: Feature request: Show the characters corresponding to the LaTeX commands displayed in minibuffer.,
Hongyi Zhao <=
- Re: Feature request: Show the characters corresponding to the LaTeX commands displayed in minibuffer., Tassilo Horn, 2021/12/21
- Re: Feature request: Show the characters corresponding to the LaTeX commands displayed in minibuffer., Tassilo Horn, 2021/12/21
- Re: Feature request: Show the characters corresponding to the LaTeX commands displayed in minibuffer., Hongyi Zhao, 2021/12/21
- Re: Feature request: Show the characters corresponding to the LaTeX commands displayed in minibuffer., Hongyi Zhao, 2021/12/21
- Re: Feature request: Show the characters corresponding to the LaTeX commands displayed in minibuffer., Hongyi Zhao, 2021/12/21
- Re: Feature request: Show the characters corresponding to the LaTeX commands displayed in minibuffer., Tassilo Horn, 2021/12/21
- Re: Feature request: Show the characters corresponding to the LaTeX commands displayed in minibuffer., Ikumi Keita, 2021/12/21
- Re: Feature request: Show the characters corresponding to the LaTeX commands displayed in minibuffer., Hongyi Zhao, 2021/12/21
- Re: Feature request: Show the characters corresponding to the LaTeX commands displayed in minibuffer., Ikumi Keita, 2021/12/21
- Re: Feature request: Show the characters corresponding to the LaTeX commands displayed in minibuffer., Tassilo Horn, 2021/12/21