Subject: Re: bug#27158: 25.2; Eliminating old usage of completing-read from built-in files

From: Dmitry Gutov <[email-masked]>
Date: Thu, 1 Jun 2017 01:41:14 +0300

On 5/31/17 6:44 PM, Ryan Thompson wrote:

> The problem is that there is no one solution that floats everyone's 
> boat. Whatever you choose, someone sinks (i.e. has broken completion). 
> The only way to float everyone's boat is for the completion function to 
> check which function called it and then change its behavior based on 
> prior knowledge of what each caller expects.

Or ask the "sane" callers to call a different, new function.

I think we should change the calling convention of 
completion-read-function (while keeping completing-read the same, it 
will call completing-read-function passing (or DEF "") as the default).

The new completing-read-function can choose to get rid of the legacy 
behavior; this variable is not as encumbered by backward compatibility 
requirement as completing-read itself. Hopefully updating 
completing-read-default won't be too difficult.

Then we introduce completing-read-strict (as one naming example) which 
calls completing-read-function without the implicit default.

Going back to the beginning of this bug report, the new patch would 
convert all uses of completing-read that don't expect "" as the default 
to use completing-read-strict.

See also this previous discussion: 
http://lists.gnu.org/archive/html/emacs-devel/2016-01/msg01682.html