GNU bug report logs - #12331
24.1; completing-read when COLLECTION has exactly one element

Previous Next

Package: emacs;

Reported by: "Roland Winkler" <winkler <at> gnu.org>

Date: Sun, 2 Sep 2012 01:40:02 UTC

Severity: normal

Found in version 24.1

Fixed in version 24.3

Done: "Roland Winkler" <winkler <at> gnu.org>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: help-debbugs <at> gnu.org (GNU bug Tracking System)
To: "Roland Winkler" <winkler <at> gnu.org>
Cc: tracker <at> debbugs.gnu.org
Subject: bug#12331: closed (24.1; completing-read when COLLECTION has
 exactly one element)
Date: Sun, 23 Sep 2012 12:58:02 +0000
[Message part 1 (text/plain, inline)]
Your message dated Sun, 23 Sep 2012 07:55:34 -0500
with message-id <20575.1734.589558.277391 <at> gargle.gargle.HOWL>
and subject line Re: bug#12331: 24.1; completing-read when COLLECTION has exactly one element
has caused the debbugs.gnu.org bug report #12331,
regarding 24.1; completing-read when COLLECTION has exactly one element
to be marked as done.

(If you believe you have received this mail in error, please contact
help-debbugs <at> gnu.org.)


-- 
12331: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=12331
GNU Bug Tracking System
Contact help-debbugs <at> gnu.org with problems
[Message part 2 (message/rfc822, inline)]
From: "Roland Winkler" <winkler <at> gnu.org>
To: bug-gnu-emacs <at> gnu.org
Subject: 24.1; completing-read when COLLECTION has exactly one element
Date: Sat, 01 Sep 2012 20:38:23 -0500
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''



[Message part 3 (message/rfc822, inline)]
From: "Roland Winkler" <winkler <at> gnu.org>
To: 12331-done <at> debbugs.gnu.org
Subject: Re: bug#12331: 24.1;
	completing-read when COLLECTION has exactly one element
Date: Sun, 23 Sep 2012 07:55:34 -0500
Version: 24.3

2012-09-23  Roland Winkler  <winkler <at> gnu.org>

	* ibuf-ext.el (ibuffer-switch-to-saved-filter-groups): If list
	ibuffer-saved-filter-groups has one element, shortcut the call of
	completing-read.  (Bug#12331)


This bug report was last modified 12 years and 248 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.