GNU bug report logs -
#12331
24.1; completing-read when COLLECTION has exactly one element
Previous Next
Reported by: "Roland Winkler" <winkler <at> gnu.org>
Date: Sun, 2 Sep 2012 01:40:02 UTC
Severity: normal
Found in version 24.1
Fixed in version 24.3
Done: "Roland Winkler" <winkler <at> gnu.org>
Bug is archived. No further changes may be made.
Full log
View this message in rfc822 format
On Mon Sep 3 2012 Stefan Monnier wrote:
> > chosen it deliberately. If nonethless we ask the user what he or she
> > wants even though there is only one choice available, it much
> > reminds of one of my least favorite operating systems.
>
> The motivation sounds good, but the minibuffer prompt always offers one
> more choice, i.e. C-g. So accepting the only choice without prompting
> might end up being a bit too eager in some cases.
Sure, under any circumstances I would not want to make this a
default for completing-read. I merely suggest that there are
scenarios where shortcutting the invocation of the minibuffer can be
reasonable. And I hope you don't mind we give this a try for the
particular example of ibuffer-switch-to-saved-filter-groups
described in my previous email.
> I think so, yes. So I suggest you look for callers where that could be
> used, and if they are common enough, we could consider adding a special
> value of `require-match' which would allow such a short-circuiting.
The least questionable examples are, in my opinion, those cases
where the elements in the list COLLECTION reflect a choice the user
made earlier (such as COLLECTION being a user variable defaulting to
nil).
I'll see whether I'll find more cases of that kind.
Roland
This bug report was last modified 12 years and 248 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.