Subject: Re: bug#79409: 31.0.50; project.el uses define-completion-category but depends on 26.1

From: Daniel Mendler <[email-masked]>
Date: Mon, 08 Sep 2025 21:41:38 +0200

Dmitry Gutov <[email-masked]> writes:

> On 08/09/2025 22:19, Daniel Mendler wrote:
>> I don't think we can use Compat here, since we cannot replace the
>> completion-metadata-get function such that callers magically learn about
>> category inheritance.
>
> Huh, right.
>
> I guess Compat could do that with advice and such, but that way lies trouble.

Yes, we've excluded advices early on during the development of Compat.

>> We could provide a poor implementation for
>> define-completion-category which either does nothing or which copies the
>> completion category overrides and defaults from the parent to the
>> inherited category, but as such would behave differently than the new
>> mechanism. Neither is a satisfactory solution.
>
> That probably means there's little point for project.el to add any shims.
> Thanks.

You could add a project-buffer category to completion-category-defaults
to give the same effect as category inheritance as long as the user
doesn't override the settings.

Otoh you could also just leave things as is. This is not a big deal,
since it will just result in a minor difference in completion styles
settings and users could always override if they bother.

Daniel