GNU bug report logs - #79409
31.0.50; project.el uses define-completion-category but depends on 26.1

Previous Next

Package: emacs;

Reported by: Daniel Mendler <mail <at> daniel-mendler.de>

Date: Mon, 8 Sep 2025 13:51:01 UTC

Severity: normal

Found in version 31.0.50

Full log


Message #32 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Daniel Mendler <mail <at> daniel-mendler.de>
To: Dmitry Gutov <dmitry <at> gutov.dev>
Cc: "Daniel Mendler via Bug reports for GNU Emacs,
 the Swiss army knife of text editors" <bug-gnu-emacs <at> gnu.org>,
 Eshel Yaron <me <at> eshelyaron.com>, 79409 <at> debbugs.gnu.org
Subject: Re: bug#79409: 31.0.50; project.el uses define-completion-category
 but depends on 26.1
Date: Mon, 08 Sep 2025 21:19:18 +0200
Dmitry Gutov <dmitry <at> gutov.dev> writes:

> On 08/09/2025 19:18, Daniel Mendler wrote:
>> Eshel Yaron<me <at> eshelyaron.com> writes:
>> 
>>> Daniel Mendler writes:
>>>
>>>> Since a few days ago project.el uses define-completion-category which is
>>>> not yet available on old Emacs versions. project.el is published on ELPA
>>>> and depends on Emacs 26.1.
>>> Right, thanks, should now be fixed on master (with commit 6b6cfa8e40b).
>> Thanks, I didn't see that you've already sent a mail to devel a short
>> while before my report. I wonder if some fallback code is needed, such
>> that project-buffer is treated like the buffer completion category on
>> older Emacs versions?
>
> Thanks for the report.
>
> I've asked what Stefan thinks about a fallback route in this case.
>
> Maybe it would be a good use for the 'compat' dependency, in addition to the FR
> in bug#79327.

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. 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.

(buffer-match-p from the other bug report has been ported back, so this
can be used.)

Daniel





This bug report was last modified 5 days ago.

Previous Next


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