bug-gnu-emacs
[Top][All Lists]
Advanced

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

bug#39600: [PATCH] Fix handling of non-exclusive non-prefix completion f


From: Stefan Monnier
Subject: bug#39600: [PATCH] Fix handling of non-exclusive non-prefix completion functions
Date: Sat, 08 Aug 2020 17:58:39 -0400
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux)

>> Currently, with non-exclusive completion functions, Emacs will do
>> `try-completion` on the current text, and decide whether to try next
>> completion function based on that. This makes completion functions that
>> can do non-prefix completions fails when the current text only occurs in
>> the middle of the candidates. This is a problem I found in a FIXME in
>> the code.
>>
>> # How does this work?
>>
>> I use `completion-all-completions` instead. As far as I know, this
>> respects the `completion-styles`.
> [...]
> Stefan, how does this patch look to you?

I think it replaces one set of problems with another.

Within the completion-at-point-function we shouldn't call anything like
`try-completion`: we should only decide which completion table to use
but we shouldn't look inside those completion tables.

So a better solution is to build a new completion table which combines
(e.g. with `completion-table-in-turn`) the current one with that of "the
rest".  [ The tricky (but still doable) case being when when the current
completion table and that of the rest don't use the same BEG and END.  ]


        Stefan






reply via email to

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