Subject: 27.0.50; Substring icomplete broken for M-x switch-to-buffer
From: João Távora <[email-masked]>
To: [email-masked]
Cc: [email-masked]
Date: Wed, 16 Jan 2019 00:11:38 +0000
List-Id: <debbugs-submit.debbugs.gnu.org>

Hi maintainers,

In my newfound icomplete adventures, I've come across a very annoying
bug I just cannot catch:

    Emacs -Q
    M-x icomplete-mode
    M-: (setq completion-styles '(substring)) RET
    M-: (generate-new-buffer "Messages") RET
    C-x b

Now type "M".  The minibuffer suggest the buffer "Messages", but what
about "*Messages"?  Why isn't it considered?

If, instead of "M", I type "essa", then "Messages" and "*Messages*"
_are_ both considered, correctly.

Tracing completion-substring-try/all-completion shows that it is not
being called in the first situation: why???

João