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: Sun, 2 Sep 2012 11:25:29 -0500 Message-ID: <20547.34937.775201.718134@gargle.gargle.HOWL> References: <87k3wdqk4w.fsf@gnu.org> 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 1346603201 17274 80.91.229.3 (2 Sep 2012 16:26:41 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sun, 2 Sep 2012 16:26:41 +0000 (UTC) Cc: 12331@debbugs.gnu.org To: "Drew Adams" Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Sun Sep 02 18:26:42 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 1T8D0S-0000po-WB for geb-bug-gnu-emacs@m.gmane.org; Sun, 02 Sep 2012 18:26:41 +0200 Original-Received: from localhost ([::1]:51265 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1T8D0Q-00049I-BT for geb-bug-gnu-emacs@m.gmane.org; Sun, 02 Sep 2012 12:26:38 -0400 Original-Received: from eggs.gnu.org ([208.118.235.92]:42773) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1T8D0N-000490-It for bug-gnu-emacs@gnu.org; Sun, 02 Sep 2012 12:26:36 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1T8D0M-00008u-Jk for bug-gnu-emacs@gnu.org; Sun, 02 Sep 2012 12:26:35 -0400 Original-Received: from debbugs.gnu.org ([140.186.70.43]:53378) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1T8D0M-00008n-GD for bug-gnu-emacs@gnu.org; Sun, 02 Sep 2012 12:26:34 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.72) (envelope-from ) id 1T8D1l-0007Aa-IB for bug-gnu-emacs@gnu.org; Sun, 02 Sep 2012 12:28:01 -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: Sun, 02 Sep 2012 16:28:01 +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.134660322627496 (code B ref 12331); Sun, 02 Sep 2012 16:28:01 +0000 Original-Received: (at 12331) by debbugs.gnu.org; 2 Sep 2012 16:27:06 +0000 Original-Received: from localhost ([127.0.0.1]:34691 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1T8D0p-00079O-1K for submit@debbugs.gnu.org; Sun, 02 Sep 2012 12:27:05 -0400 Original-Received: from fencepost.gnu.org ([208.118.235.10]:51731) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1T8D0m-00078z-FQ for 12331@debbugs.gnu.org; Sun, 02 Sep 2012 12:27:01 -0400 Original-Received: from adsl-68-77-23-91.dsl.emhril.ameritech.net ([68.77.23.91]:42754 helo=regnitz) by fencepost.gnu.org with esmtpsa (TLS1.0:DHE_RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1T8CzM-00079A-25; Sun, 02 Sep 2012 12:25:32 -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:63679 Archived-At: 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.