GNU bug report logs -
#48841
fido-mode is slower than ido-mode with similar settings
Previous Next
Reported by: Dmitry Gutov <dgutov <at> yandex.ru>
Date: Sat, 5 Jun 2021 01:40:01 UTC
Severity: normal
Done: João Távora <joaotavora <at> gmail.com>
Bug is archived. No further changes may be made.
Full log
Message #128 received at 48841 <at> debbugs.gnu.org (full text, mbox):
[Message part 1 (text/plain, inline)]
On 8/11/21 6:11 PM, Daniel Mendler wrote:
> 2. In `completion--nth-completion' set `completion--filter-completions'
> to nil, unless `(memq style '(emacs21 emacs22 basic
> partial-completion initials flex))' such that custom completion
> styles which wrap the completion functions don't see the new return
> value format, except if the custom style opts in explicitly by
> binding `completion--filter-completions'. An alternative criterion is
> `(memq fun '(completion-emacs22-all-completions) ...)'. Unfortunately
> this approach will still not work if the user has advised a
> `completion-x-all-completions' function. The only 100% safe approach
> seems to transparently redirect calls to
> `completion-x-all-completions' to `completion--x-filter-completions',
> which returns the results in the new format.
I attached two patch variants which can be placed on top of my previous
patch to improve the backward compatibility of the internal API.
Variant 1: Set 'completion--return-alist-flag' only for the existing
completion styles, such that they transparently upgrade to the alist
return format. If the variable is not set, the completion styles return
the result as plain list retaining backward compatibility. The variable
is purely for internal use, new completion styles should return their
results as an alist on Emacs 28 and newer.
Variant 2: Add an optional argument FILTER to each of the completion
styles 'all' functions, e.g., 'completion-basic-all-completions'. In
'completion--nth-completion' try to call the function with the
additional FILTER argument to upgrade to the alist return format. If
this fails with a 'wrong-number-of-arguments' error, retry again without
the argument.
Daniel
[variant1-restrict.el (text/plain, attachment)]
[variant2-argument.el (text/plain, attachment)]
This bug report was last modified 3 years and 350 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.