|
From: | Daniel Mendler |
Subject: | Re: [External] : Improvement proposals for `completing-read' |
Date: | Fri, 9 Apr 2021 13:47:14 +0200 |
On 4/9/21 1:19 PM, Jean Louis wrote:
* Drew Adams <drew.adams@oracle.com> [2021-04-08 20:21]:Why is it even a use case? Why disable history when `completing-read' against the history? Maybe you have a good reason - what is it?This way, though the documentation does not say something about it, but I do not see any history and I do not need to have history variable, but function thinks there is history: (completing-read "Choose: " '("Jane" "Joe") nil nil nil t) So it is effectively "disabled".
This is actually illegal and will break `completion-all-sorted-completions`. My proposal is to explicitly allow this, the value `t` for the HIST argument. Please take a look at my original mail.
Maybe it was meant here to disable the general minibuffer history, but that is obviously easy to do. Other way to disable would be to encompass `completing-read' with one `let': (let ((history)) (completing-read "Choose: " '("Jane" "Joe") nil nil nil 'history))
Sure there are workarounds. Note that the history variable must be dynamically bound. Then the history variable may also end up in the savehist. It is better to fix this properly.
Daniel Mendler
[Prev in Thread] | Current Thread | [Next in Thread] |