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: Dmitry Gutov <dgutov <at> yandex.ru>
To: Daniel Mendler <mail <at> daniel-mendler.de>, Stefan Monnier <monnier <at> iro.umontreal.ca>
Cc: Lars Ingebrigtsen <larsi <at> gnus.org>, 22324 <at> debbugs.gnu.org
Subject: bug#22324: 25.0.50; completion-category-defaults style doesn't override completion-styles (gets prepended instead)
Date: Fri, 28 Jan 2022 04:35:13 +0200
On 26.01.2022 20:59, Daniel Mendler wrote:
> On 1/26/22 18:19, Stefan Monnier wrote:
>> 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. So maybe we shouldn't do this
> and fix the problem at the root? Remove the failover mechanism? I am not
> fond of introducing a hack to work around the problematic failover design.

Let's remove it, I think.

IMHO, backward compatibility hacks are the reason of >50% of existing 
CAPF's problems: you add one special case, then another, then another.

Each step isn't bad by itself (just like Stefan's current suggestion 
sounds workable), but every one of them complicates reading the code, 
and writing code to it, even if by a little.

If we were designing it from the ground up, we probably wouldn't add an 
'ignore' style. We could have added a special value like 't' which would 
mean the opposite (*do* the fallback, for those users who would want 
their configs to be just a little bit more terse), just like in the 
local values of hook variables. But I'm not sure how kludgy the 
implementation of this will turn out either, and terseness is not the 
primary end goal for this part of user customization, I think.




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.