Subject: bug#75910: 31; Deprecate minibuffer-completing-file-name

From: Drew Adams <[email-masked]>
Date: Wed, 29 Jan 2025 20:10:12 +0000

> The completion category mechanism is a generalization of various old
> `minibuffer-completing-*' variables. Completion tables like the file
> completion table already provide the category, so
> `minibuffer-completing-file-name' is a redundancy. Minibuffer-related
> variables are often let-bound around a completion call, which is not
> correct in a strict sense, since the variable should only hold inside
> the minibuffer and not for nested completion sessions. 

So it's _not_ really a redundancy.

If what you _want_ for a given completion call
is to affect everything that transpires during
that call, i.e., including "nested completions"
(recursive edits), then binding a dynamic var
around the call gets you what you want, simply.

> The completion metadata including the category
> does not have this problem.

Or this advantage/possibility.

(I do agree that this deep dynamic-var behavior
is usually not needed or desirable during
completion.)

> Furthermore
> completion tables can specify categories per completion field. This
> means that the category can change during completion, for example when
> completing $environment variables as part of a path. In this sense,
> the category is more precise. 

Yes.

> The completion category is used at various
> places in the completion machinery and enables the user to customize
> behavior per completion category. See for example the customization
> variable `completion-category-overrides'. These features and advantages
> are not offered by the old `minibuffer-completing-*' variables, and
> these are the reasons for the addition of the category mechanism as I
> understand. 

Agreed.

> The deprecation of `minibuffer-completing-file-name' is just
> one step in the transition to the category mechanism. As I have
> mentioned the variable `minibuffer-completing-symbol' had been
> deprecated and has even been removed already.

Meme combat, oui. ;-) Shouldn't have been removed.
(Also not redundant, for the same reason.)