On Tue, 24 Jun 2025 16:00:51 -0400 Stefan Monnier wrote: > BTW, if we want to fix the problem with a user-config, there is one part > that would make sense to be user-configurable, which is whether > `substring` completion should try and complete suffixes at all: > Depending on your habits and typing style, having a suffix inserted > after point can be a hindrance rather than a help because it can be > easier for you to type that suffix than to skip over it. > The "right" way to make this configurable (IMO) would be to have a new > completion style that's like `substring` but without the insertion of > common suffixes. > [ In my ideal UI, completion styles would not be limited to symbols, so > you could have `(substring nil)` and `(substring t)` be the two > alternatives, where `substring` would be a style that takes an > (optional) `inhibit-common-suffixes` arg. ] Building on my previous patch, I've implemented a new style (but not your ideal UI...) called, for want of a better shortish name, `substring-emacs30'. You can see the difference between the current substring style and the new style by hitting TAB twice after each of the inputs "C-x f //" and "C-x f //us" when you start emacs as follows: For the current substring style: emacs -Q --eval "(custom-set-variables '(completion-category-overrides '((file (styles substring)))))" For the proposed new style: emacs -Q --eval "(custom-set-variables '(completion-category-overrides '((file (styles substring-emacs30)))))" I expect you'll consider the implementation an ugly hack, but it does seem to yield the results I want, and with my limited understanding of the completion code, I couldn't think of anything better; but no doubt you or someone else who knows the code well can. The patch is attached. Steve Berman