GNU bug report logs - #75910
31; Deprecate minibuffer-completing-file-name

Previous Next

Package: emacs;

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

Date: Tue, 28 Jan 2025 14:29:02 UTC

Severity: normal

Full log


View this message in rfc822 format

From: Michael Albinus <michael.albinus <at> gmx.de>
To: Daniel Mendler <mail <at> daniel-mendler.de>
Cc: "75910 <at> debbugs.gnu.org" <75910 <at> debbugs.gnu.org>, Stefan Monnier <monnier <at> iro.umontreal.ca>, Drew Adams <drew.adams <at> oracle.com>
Subject: bug#75910: 31; Deprecate minibuffer-completing-file-name
Date: Wed, 29 Jan 2025 09:09:14 +0100
Daniel Mendler <mail <at> daniel-mendler.de> writes:

Hi Daniel,

>>> I propose to deprecate `minibuffer-completing-file-name', since the
>>> completion category as part of the completion metadata acts as
>>> generalization for this variable. Similarly `minibuffer-completing-
>>> symbols' has been deprecated and removed a while ago.
>>>
>>> Instead of checking `minibuffer-completing-file-name' one can use
>>> (minibuffer-category-p 'file) given the following predicate function:
>>>
>>> (defun minibuffer-category-p (cat)
>>>   (eq (completion-metadata-get
>>>        (completion-metadata
>>>         (buffer-substring-no-properties
>>>          (minibuffer-prompt-end) (point))
>>>         minibuffer-completion-table
>>>         minibuffer-completion-predicate)
>>>        'category)
>>>       cat))
>>
>> That you don't use something isn't evidence
>> that it isn't used.
>
> The variable is not widely used. You can grep the Emacs code base.

This variable is essential for Tramp method / user name / host name completion.

> Also the completion category metadata has been designed as a general
> replacement. I think it should be removed like
> `minibuffer-completing-symbol' which has already been removed.

The function above doesn't exist (yet). And we will run into the
backward compatibility circus then.

I don't understand what's the glaring argument for removing that
variable. IIRC, it was requested already a while ago, and this was
rejected. What's the change now for doing so?

> Daniel

Best regards, Michael.




This bug report was last modified 136 days ago.

Previous Next


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