GNU bug report logs -
#34089
27.0.50; Substring icomplete broken for M-x switch-to-buffer
Previous Next
Reported by: João Távora <joaotavora <at> gmail.com>
Date: Wed, 16 Jan 2019 00:12:02 UTC
Severity: normal
Found in version 27.0.50
Done: João Távora <joaotavora <at> gmail.com>
Bug is archived. No further changes may be made.
Full log
Message #8 received at 34089 <at> debbugs.gnu.org (full text, mbox):
> Now type "M". The minibuffer suggest the buffer "Messages", but what
> about "*Messages"? Why isn't it considered?
Your (setq completion-styles '(substring)) is ignored by `C-x b`
because that command uses category `buffer` which has
a setting in completion-category-defaults of (styles basic substring),
so before trying `substring` it tries `basic`.
IOW, by default C-x b first tries prefix match and when that fails falls
back on `substring` and if you want to use `substring` without using
`basic` before, you'll need
(add-to-list 'completion-category-overrides '(buffer (styles substring)))
Arguably this is a bug: the purpose of this completion-category-defaults
settings is to add substring after the global default `basic` style, so
if the global default starts with `substring` the better behavior would
be to just use the global default.
Not sure how to write the code that combines category-default-styles and
global styles in order to get that behavior.
Stefan
This bug report was last modified 6 years and 122 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.