From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: "Roland Winkler" Newsgroups: gmane.emacs.bugs Subject: bug#12331: 24.1; completing-read when COLLECTION has exactly one element Date: Mon, 3 Sep 2012 11:26:07 -0500 Message-ID: <20548.55839.962974.918916@gargle.gargle.HOWL> References: <87k3wdqk4w.fsf@gnu.org> <20547.34937.775201.718134@gargle.gargle.HOWL> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Trace: ger.gmane.org 1346689601 14595 80.91.229.3 (3 Sep 2012 16:26:41 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Mon, 3 Sep 2012 16:26:41 +0000 (UTC) Cc: 12331@debbugs.gnu.org To: Stefan Monnier Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Mon Sep 03 18:26:41 2012 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1T8ZU0-0006nl-5U for geb-bug-gnu-emacs@m.gmane.org; Mon, 03 Sep 2012 18:26:40 +0200 Original-Received: from localhost ([::1]:45560 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1T8ZTx-00043R-AQ for geb-bug-gnu-emacs@m.gmane.org; Mon, 03 Sep 2012 12:26:37 -0400 Original-Received: from eggs.gnu.org ([208.118.235.92]:42019) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1T8ZTu-000432-Gh for bug-gnu-emacs@gnu.org; Mon, 03 Sep 2012 12:26:35 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1T8ZTp-0003XT-7o for bug-gnu-emacs@gnu.org; Mon, 03 Sep 2012 12:26:34 -0400 Original-Received: from debbugs.gnu.org ([140.186.70.43]:55237) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1T8ZTp-0003XP-4N for bug-gnu-emacs@gnu.org; Mon, 03 Sep 2012 12:26:29 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.72) (envelope-from ) id 1T8ZVK-0001au-3S for bug-gnu-emacs@gnu.org; Mon, 03 Sep 2012 12:28:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: "Roland Winkler" Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Mon, 03 Sep 2012 16:28:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 12331 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 12331-submit@debbugs.gnu.org id=B12331.13466896676091 (code B ref 12331); Mon, 03 Sep 2012 16:28:02 +0000 Original-Received: (at 12331) by debbugs.gnu.org; 3 Sep 2012 16:27:47 +0000 Original-Received: from localhost ([127.0.0.1]:36544 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1T8ZV4-0001aB-NZ for submit@debbugs.gnu.org; Mon, 03 Sep 2012 12:27:46 -0400 Original-Received: from fencepost.gnu.org ([208.118.235.10]:49626) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1T8ZV2-0001a4-Fj for 12331@debbugs.gnu.org; Mon, 03 Sep 2012 12:27:45 -0400 Original-Received: from adsl-68-77-23-91.dsl.emhril.ameritech.net ([68.77.23.91]:44111 helo=regnitz) by fencepost.gnu.org with esmtpsa (TLS1.0:DHE_RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1T8ZTW-00055K-BV; Mon, 03 Sep 2012 12:26:10 -0400 In-Reply-To: X-Mailer: VM 8.2 trial under 24.1.1 (x86_64-unknown-linux-gnu) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 2) X-Received-From: 140.186.70.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:63713 Archived-At: 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