GNU bug report logs - #34089
27.0.50; Substring icomplete broken for M-x switch-to-buffer

Previous Next

Package: emacs;

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):

From: Stefan Monnier <monnier <at> IRO.UMontreal.CA>
To: João Távora <joaotavora <at> gmail.com>
Cc: 34089 <at> debbugs.gnu.org
Subject: Re: 27.0.50; Substring icomplete broken for M-x switch-to-buffer
Date: Tue, 15 Jan 2019 21:02:59 -0500
> 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.