GNU bug report logs - #39600
[PATCH] Fix handling of non-exclusive non-prefix completion functions

Previous Next

Package: emacs;

Reported by: Amai Kinono <amaikinono <at> gmail.com>

Date: Fri, 14 Feb 2020 15:08:02 UTC

Severity: normal

Full log


View this message in rfc822 format

From: Stefan Monnier <monnier <at> iro.umontreal.ca>
To: Lars Ingebrigtsen <larsi <at> gnus.org>
Cc: 39600 <at> debbugs.gnu.org, Amai Kinono <amaikinono <at> gmail.com>
Subject: bug#39600: [PATCH] Fix handling of non-exclusive non-prefix completion functions
Date: Sat, 08 Aug 2020 17:58:39 -0400
>> 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





This bug report was last modified 4 years and 306 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.