all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: "Roland Winkler" <winkler@gnu.org>
To: 12331@debbugs.gnu.org
Subject: bug#12331: 24.1; completing-read when COLLECTION has exactly one element
Date: Sat, 01 Sep 2012 20:38:23 -0500	[thread overview]
Message-ID: <87k3wdqk4w.fsf@gnu.org> (raw)

Suggestion:

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?

The specific situation that made me think about this was the command
ibuffer-switch-to-saved-filter-groups when
ibuffer-saved-filter-groups is a list with one element. Of course,
the surrounding code could also shortcut the call of completing-read
in such a case. But completing-read is possibly the better place to
implement such a behavior, say via a particular value of
REQUIRE-MATCH.


In GNU Emacs 24.1.1 (x86_64-unknown-linux-gnu, GTK+ Version 2.20.1)
 of 2012-06-10 on regnitz
Windowing system distributor `The X.Org Foundation', version 11.0.10706000
Configured using:
 `configure '--prefix=/home/winkler/emacs/24.1''






             reply	other threads:[~2012-09-02  1:38 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-09-02  1:38 Roland Winkler [this message]
2012-09-02  2:49 ` bug#12331: 24.1; completing-read when COLLECTION has exactly one element Drew Adams
2012-09-02 16:25   ` Roland Winkler
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=87k3wdqk4w.fsf@gnu.org \
    --to=winkler@gnu.org \
    --cc=12331@debbugs.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 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.