GNU bug report logs - #22324
25.0.50; completion-category-defaults style doesn't override completion-styles (gets prepended instead)

Previous Next

Package: emacs;

Reported by: Dmitry Gutov <dgutov <at> yandex.ru>

Date: Thu, 7 Jan 2016 20:28:01 UTC

Severity: normal

Merged with 38101

Found in version 25.0.50

Fixed in version 29.1

Full log


View this message in rfc822 format

From: Stefan Monnier <monnier <at> iro.umontreal.ca>
To: Daniel Mendler <mail <at> daniel-mendler.de>
Cc: Lars Ingebrigtsen <larsi <at> gnus.org>, 22324 <at> debbugs.gnu.org, Dmitry Gutov <dgutov <at> yandex.ru>
Subject: bug#22324: 25.0.50; completion-category-defaults style doesn't override completion-styles (gets prepended instead)
Date: Wed, 26 Jan 2022 17:57:33 -0500
>> No, because `ignore` will return nil and so we'll just keep going to the
>> next style.  We need try/all-completion functions for this style to
>> return a non-nil value but that is like "no completion".
>> 
>> I suspect it can't be done quite right without changing `minibuffer.el`,
>> but we can probably get close enough to be tolerable with older Emacsen.
>> 
>> E.g. for the try-completion case, I think we can return (STRING . POINT)
>> and for all-completions maybe returning `0` will do the trick.
>
> Okay, right. This makes the proposal a bit less appealing to be honest,
> since we end up with a hack, where the result is something like a
> non-nil invalid completion result. Hmm.

I think it should be easy enough to make the various UIs handle it (in
the worst case, add an advice to `completion-try-completion` and
`completion-all-completions`).

Of course it's a hack, but only one needed during the transition.
Like my gym coach used to say when we had an injury: you won't remember
it in 10 years.

> So maybe we shouldn't do this and fix the problem at the root?
> Remove the failover mechanism?

Not sure how that'll help with Emacs<29 ;-)

> My cheap proposal would be the removal of `completion-category-defaults`
> and the removal of the failover mechanism of
> `completion-category-overrides`. Then the user can adjust the
> `completion-styles` entirely in their configuration.

The purpose of `completion-category-defaults` is to improve the OOTB
behavior for those who don't customize very much.
Those who do customize heavily can easily set it to nil or override it
with `completion-category-overrides`.


        Stefan





This bug report was last modified 3 years and 105 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.