From: "Roland Winkler" <winkler@gnu.org>
To: "Drew Adams" <drew.adams@oracle.com>
Cc: 12331@debbugs.gnu.org
Subject: bug#12331: 24.1; completing-read when COLLECTION has exactly one element
Date: Sun, 2 Sep 2012 11:25:29 -0500 [thread overview]
Message-ID: <20547.34937.775201.718134@gargle.gargle.HOWL> (raw)
In-Reply-To: <F10E0E3A774F40D4A7D24942C8D90663@us.oracle.com>
On Sat Sep 1 2012 Drew Adams wrote:
> > If the arg COLLECTION of completing-read is a list with exactly one
> > element and REQUIRE-MATCH is t, it can be quite redundant to go via
> > the minibuffer. Would it make sense if in such a case
> > completing-read could skip the minibuffer completely and simply
> > return the car of COLLECTION?
>
> `completing-read' offers possible candidates, but for lax
> completion it does not require you to choose any of them - you can
> enter anything you like. So this would make sense only for strict
> completion.
I only have in mind a situation where one has something like
REQUIRE-MATCH being t, see above.
In the particular context that triggered my report (i.e., the
command ibuffer-switch-to-saved-filter-groups) COLLECTION is the
user variable ibuffer-saved-filter-groups that defaults to nil. So
any non-nil value is something where we may assume the user has
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.
But maybe such a scenario is all in all not too common in the world
of Emacs to justify a modification of completing-read. So if nobody
else gets excited about my proposal (and nobody disagrees with the
following either), I'll merely shortcut the call of completing-read
in ibuffer-switch-to-saved-filter-groups if the list
ibuffer-saved-filter-groups has just one element. Then I'll close
this bug report.
next prev parent reply other threads:[~2012-09-02 16:25 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-09-02 1:38 bug#12331: 24.1; completing-read when COLLECTION has exactly one element Roland Winkler
2012-09-02 2:49 ` Drew Adams
2012-09-02 16:25 ` Roland Winkler [this message]
2012-09-03 13:42 ` Stefan Monnier
2012-09-03 16:26 ` Roland Winkler
2012-09-03 18:47 ` Stefan Monnier
2012-09-04 3:38 ` Stefan Monnier
2012-09-23 12:55 ` Roland Winkler
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20547.34937.775201.718134@gargle.gargle.HOWL \
--to=winkler@gnu.org \
--cc=12331@debbugs.gnu.org \
--cc=drew.adams@oracle.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.