unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Stefan Monnier <monnier@iro.umontreal.ca>
To: "Roland Winkler" <winkler@gnu.org>
Cc: 12331@debbugs.gnu.org
Subject: bug#12331: 24.1; completing-read when COLLECTION has exactly one element
Date: Mon, 03 Sep 2012 09:42:34 -0400	[thread overview]
Message-ID: <jwvligr5irq.fsf-monnier+emacs@gnu.org> (raw)
In-Reply-To: <20547.34937.775201.718134@gargle.gargle.HOWL> (Roland Winkler's message of "Sun, 2 Sep 2012 11:25:29 -0500")

> 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.

> But maybe such a scenario is all in all not too common in the world
> of Emacs to justify a modification of completing-read.

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.


        Stefan





  reply	other threads:[~2012-09-03 13:42 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
2012-09-03 13:42     ` Stefan Monnier [this message]
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

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=jwvligr5irq.fsf-monnier+emacs@gnu.org \
    --to=monnier@iro.umontreal.ca \
    --cc=12331@debbugs.gnu.org \
    --cc=winkler@gnu.org \
    /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 public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).