GNU bug report logs - #12916
24.2; Completion for "C-x b" does not include current buffer

Please note: This is a static page, with minimal formatting, updated once a day.
Click here to see this page with the latest information and nicer formatting.

Package: emacs; Reported by: Richard Copley <rcopley@HIDDEN>; merged with #9598; dated Sat, 17 Nov 2012 15:46:02 UTC; Maintainer for emacs is bug-gnu-emacs@HIDDEN.

Message received at 12916 <at> debbugs.gnu.org:


Received: (at 12916) by debbugs.gnu.org; 31 Jan 2016 16:18:25 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sun Jan 31 11:18:25 2016
Received: from localhost ([127.0.0.1]:43306 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1aPuhl-0004nP-H4
	for submit <at> debbugs.gnu.org; Sun, 31 Jan 2016 11:18:25 -0500
Received: from aserp1040.oracle.com ([141.146.126.69]:18997)
 by debbugs.gnu.org with esmtp (Exim 4.84)
 (envelope-from <drew.adams@HIDDEN>)
 id 1aPuhk-0004nA-0M; Sun, 31 Jan 2016 11:18:24 -0500
Received: from aserv0022.oracle.com (aserv0022.oracle.com [141.146.126.234])
 by aserp1040.oracle.com (Sentrion-MTA-4.3.2/Sentrion-MTA-4.3.2) with ESMTP id
 u0VGIHae003438
 (version=TLSv1 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK);
 Sun, 31 Jan 2016 16:18:17 GMT
Received: from aserv0121.oracle.com (aserv0121.oracle.com [141.146.126.235])
 by aserv0022.oracle.com (8.13.8/8.13.8) with ESMTP id u0VGIFmG031456
 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=FAIL);
 Sun, 31 Jan 2016 16:18:16 GMT
Received: from abhmp0016.oracle.com (abhmp0016.oracle.com [141.146.116.22])
 by aserv0121.oracle.com (8.13.8/8.13.8) with ESMTP id u0VGIFZ4030303;
 Sun, 31 Jan 2016 16:18:15 GMT
MIME-Version: 1.0
Message-ID: <db923765-d721-4cd7-bcc3-dfd12722eba7@default>
Date: Sun, 31 Jan 2016 08:18:14 -0800 (PST)
From: Drew Adams <drew.adams@HIDDEN>
To: Marcin Borkowski <mbork@HIDDEN>, bug#9598 <9598 <at> debbugs.gnu.org>
Subject: RE: bug#9598: Status: C-x b completion should also display current
 buffer.
References: <E1R7saj-00020h-QX@HIDDEN> <87oac1hldw.fsf@HIDDEN>
In-Reply-To: <87oac1hldw.fsf@HIDDEN>
X-Priority: 3
X-Mailer: Oracle Beehive Extensions for Outlook 2.0.1.9  (901082) [OL
 12.0.6691.5000 (x86)]
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: quoted-printable
X-Source-IP: aserv0022.oracle.com [141.146.126.234]
X-Spam-Score: -2.9 (--)
X-Debbugs-Envelope-To: 12916
Cc: 12916 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -2.9 (--)

> what to do with this bug report?  The behavior is still what

at least

> a few people (including RMS) dislike, it is easy to
> override it (although there is no mention of that in the manual, which
> is very bad IMHO!), it also seems to be solved in Ivy (I don't know
> about other completion frameworks - I would bet Icicles have a knob for
> that, because Icicles have a knob for everything; Helm anybody?).
>=20
> My personal suggestion would be either add a user option or (as a last
> resort) write about the hack mentioned here in the manual, in the node
> (info "(emacs)Select buffer").

Yes, the bug should be addressed properly.  The behavior should
be controlled by users - at least by option and preferably also
on the fly, during completion (by a toggle or other means).

At a minimum, whatever means are currently provided to give users
some control over this, however arcane, rudimentary, or hackish,
should be well documented.

(And yes, Icicles buffer-name completion has already been described
in this bug thread.)




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#12916; Package emacs. Full text available.

Message received at 12916 <at> debbugs.gnu.org:


Received: (at 12916) by debbugs.gnu.org; 31 Jan 2016 14:31:00 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sun Jan 31 09:31:00 2016
Received: from localhost ([127.0.0.1]:42581 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1aPt1n-00026L-Ry
	for submit <at> debbugs.gnu.org; Sun, 31 Jan 2016 09:31:00 -0500
Received: from mail.mojserwer.eu ([195.110.48.8]:43266)
 by debbugs.gnu.org with esmtp (Exim 4.84)
 (envelope-from <mbork@HIDDEN>)
 id 1aPt1m-00026B-KY; Sun, 31 Jan 2016 09:30:58 -0500
Received: from localhost (localhost [127.0.0.1])
 by mail.mojserwer.eu (Postfix) with ESMTP id 361BB9D2002;
 Sun, 31 Jan 2016 15:30:50 +0100 (CET)
X-Virus-Scanned: Debian amavisd-new at mail.mojserwer.eu
Received: from mail.mojserwer.eu ([127.0.0.1])
 by localhost (mail.mojserwer.eu [127.0.0.1]) (amavisd-new, port 10024)
 with ESMTP id ctsaLQX-93+o; Sun, 31 Jan 2016 15:30:24 +0100 (CET)
Received: from localhost (unknown [109.232.24.28])
 by mail.mojserwer.eu (Postfix) with ESMTPSA id 5F8909D2001;
 Sun, 31 Jan 2016 15:30:24 +0100 (CET)
From: Marcin Borkowski <mbork@HIDDEN>
To: bug#9598 <9598 <at> debbugs.gnu.org>
Subject: Re: Status: C-x b completion should also display current buffer.
Date: Sun, 31 Jan 2016 15:30:19 +0100
In-Reply-To: bug's message of "Sun\, 31 Jan 2016 14\:25\:30 +0000"
Message-ID: <87oac1hldw.fsf@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.1.50 (gnu/linux)
MIME-Version: 1.0
Content-Type: text/plain
X-Spam-Score: -0.7 (/)
X-Debbugs-Envelope-To: 12916
Cc: 12916 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -0.7 (/)

Hi all,

again the same question: what to do with this bug report?  The behavior
is still what a few people (including RMS) dislike, it is easy to
override it (although there is no mention of that in the manual, which
is very bad IMHO!), it also seems to be solved in Ivy (I don't know
about other completion frameworks - I would bet Icicles have a knob for
that, because Icicles have a knob for everything; Helm anybody?).

My personal suggestion would be either add a user option or (as a last
resort) write about the hack mentioned here in the manual, in the node
(info "(emacs)Select buffer").

Regards,

-- 
Marcin Borkowski
http://mbork.pl/en




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#12916; Package emacs. Full text available.

Message received at 12916 <at> debbugs.gnu.org:


Received: (at 12916) by debbugs.gnu.org; 21 Nov 2012 08:16:11 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Wed Nov 21 03:16:11 2012
Received: from localhost ([127.0.0.1]:57897 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.72)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1Tb5Tf-0002j7-EL
	for submit <at> debbugs.gnu.org; Wed, 21 Nov 2012 03:16:11 -0500
Received: from fencepost.gnu.org ([208.118.235.10]:35390)
	by debbugs.gnu.org with esmtp (Exim 4.72)
	(envelope-from <rms@HIDDEN>) id 1Tb5Td-0002iz-Ff
	for 12916 <at> debbugs.gnu.org; Wed, 21 Nov 2012 03:16:10 -0500
Received: from rms by fencepost.gnu.org with local (Exim 4.71)
	(envelope-from <rms@HIDDEN>)
	id 1Tb5SR-0008Rp-1p; Wed, 21 Nov 2012 03:14:55 -0500
Date: Wed, 21 Nov 2012 03:14:55 -0500
Message-Id: <E1Tb5SR-0008Rp-1p@HIDDEN>
Content-Type: text/plain; charset=ISO-8859-15
From: Richard Stallman <rms@HIDDEN>
To: Stefan Monnier <monnier@HIDDEN>
In-reply-to: <jwvlidx4rfo.fsf-monnier+emacs@HIDDEN> (message from Stefan
	Monnier on Mon, 19 Nov 2012 09:22:21 -0500)
Subject: Re: bug#12916: 24.2;
	Completion for "C-x b" does not include current buffer
References: <CAPM58ogXcBv+bXA09+Z_V=2ngsuJPgoo9ddH1_KH8OFwuZcDbA@HIDDEN>
	<jwvlidx4rfo.fsf-monnier+emacs@HIDDEN>
X-Spam-Score: -4.6 (----)
X-Debbugs-Envelope-To: 12916
Cc: rcopley@HIDDEN, 12916 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.13
Precedence: list
Reply-To: rms@HIDDEN
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <http://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>,
	<mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <http://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <http://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>,
	<mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Sender: debbugs-submit-bounces <at> debbugs.gnu.org
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
X-Spam-Score: -4.6 (----)

    I'm not sure this deserves such a customization variable.  But in any
    case, in the mean time, you can get back the previous behavior with the
    following hack:

       (defadvice internal-complete-buffer-except (around rc-all-buffers activate)
	 (setq ad-return-value #'internal-complete-buffer))

Thanks.  Must better!

-- 
Dr Richard Stallman
President, Free Software Foundation
51 Franklin St
Boston MA 02110
USA
www.fsf.org  www.gnu.org
Skype: No way! That's nonfree (freedom-denying) software.
  Use Ekiga or an ordinary phone call





Information forwarded to bug-gnu-emacs@HIDDEN:
bug#12916; Package emacs. Full text available.

Message received at 12916 <at> debbugs.gnu.org:


Received: (at 12916) by debbugs.gnu.org; 19 Nov 2012 21:33:22 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Mon Nov 19 16:33:22 2012
Received: from localhost ([127.0.0.1]:55665 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.72)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1TaYy1-0002S2-NF
	for submit <at> debbugs.gnu.org; Mon, 19 Nov 2012 16:33:22 -0500
Received: from fencepost.gnu.org ([208.118.235.10]:49347)
	by debbugs.gnu.org with esmtp (Exim 4.72)
	(envelope-from <rms@HIDDEN>) id 1TaYxz-0002Rv-08
	for 12916 <at> debbugs.gnu.org; Mon, 19 Nov 2012 16:33:19 -0500
Received: from rms by fencepost.gnu.org with local (Exim 4.71)
	(envelope-from <rms@HIDDEN>)
	id 1TaYws-0002rx-Nr; Mon, 19 Nov 2012 16:32:11 -0500
Date: Mon, 19 Nov 2012 16:32:10 -0500
Message-Id: <E1TaYws-0002rx-Nr@HIDDEN>
Content-Type: text/plain; charset=ISO-8859-15
From: Richard Stallman <rms@HIDDEN>
To: Stefan Monnier <monnier@HIDDEN>
In-reply-to: <jwvlidx4rfo.fsf-monnier+emacs@HIDDEN> (message from Stefan
	Monnier on Mon, 19 Nov 2012 09:22:21 -0500)
Subject: Re: bug#12916: 24.2;
	Completion for "C-x b" does not include current buffer
References: <CAPM58ogXcBv+bXA09+Z_V=2ngsuJPgoo9ddH1_KH8OFwuZcDbA@HIDDEN>
	<jwvlidx4rfo.fsf-monnier+emacs@HIDDEN>
X-Spam-Score: -4.6 (----)
X-Debbugs-Envelope-To: 12916
Cc: rcopley@HIDDEN, 12916 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.13
Precedence: list
Reply-To: rms@HIDDEN
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <http://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>,
	<mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <http://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <http://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>,
	<mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Sender: debbugs-submit-bounces <at> debbugs.gnu.org
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
X-Spam-Score: -4.6 (----)

    Hmm... I'd expect the user to know in which buffer she is when she hits
    C-x b.

I often switch to a buffer without noticing I am already in it.
I have not made a note of the specific circumstances.  If you really
want to know, I will start noting that down.

I think one case is after some other command that switched buffers,
such as C-x k, or C-c C-c in a mail buffer.  In that situation I start
typing C-x b R TAB RET before my mind recognizes which buffer it left
me in.

-- 
Dr Richard Stallman
President, Free Software Foundation
51 Franklin St
Boston MA 02110
USA
www.fsf.org  www.gnu.org
Skype: No way! That's nonfree (freedom-denying) software.
  Use Ekiga or an ordinary phone call





Information forwarded to bug-gnu-emacs@HIDDEN:
bug#12916; Package emacs. Full text available.

Message received at 12916 <at> debbugs.gnu.org:


Received: (at 12916) by debbugs.gnu.org; 19 Nov 2012 20:12:05 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Mon Nov 19 15:12:05 2012
Received: from localhost ([127.0.0.1]:55584 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.72)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1TaXhN-0000dK-3I
	for submit <at> debbugs.gnu.org; Mon, 19 Nov 2012 15:12:05 -0500
Received: from mail-ob0-f172.google.com ([209.85.214.172]:55362)
	by debbugs.gnu.org with esmtp (Exim 4.72)
	(envelope-from <rcopley@HIDDEN>) id 1TaXhK-0000dD-PJ
	for 12916 <at> debbugs.gnu.org; Mon, 19 Nov 2012 15:12:04 -0500
Received: by mail-ob0-f172.google.com with SMTP id ef5so4994437obb.3
	for <12916 <at> debbugs.gnu.org>; Mon, 19 Nov 2012 12:10:56 -0800 (PST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113;
	h=mime-version:in-reply-to:references:date:message-id:subject:from:to
	:content-type; bh=B4axDgkPuI7IwkCdWjGJO9rY/HH6Jad6Jgie2lEzBtM=;
	b=TKrRYKJO6GH6qiss3jXDC7HqbtYeEVRXF7ZPiGD0WDjiPcqsjuGm3dAR69zSyrrmmL
	gVsSoaNVobeLnQT0V6hghPZplDY+lfMEETrYLAF5Y/j6xbCwv8jmVTdwptrNr22zKJEi
	7Yn8VOXahNM0EwM+5Lqi0hBCBehSJI6c2/RR9L8rYATpSwQgt52j8zBqsoeaKsSn0RtX
	EcBZu1pBxFHkJ8xeJKpF2MY5IqaHUemkJuJE0pGKFqcvp6HpZHH2eWbPT23Sv8sfJncv
	pTx5kULdDEhXKZDxE8xA4q2VcnzUyP9gG4tbx0mmWfKA6JZ1gd4UQyEw5pqOvzTdKWEo
	sh/g==
MIME-Version: 1.0
Received: by 10.182.132.112 with SMTP id ot16mr11244573obb.69.1353355856818;
	Mon, 19 Nov 2012 12:10:56 -0800 (PST)
Received: by 10.182.43.34 with HTTP; Mon, 19 Nov 2012 12:10:56 -0800 (PST)
In-Reply-To: <CAPM58ogCn5hi6qskV9XTqJoqm23fanS661ajPkRdfES6_Hg=-A@HIDDEN>
References: <CAPM58ogXcBv+bXA09+Z_V=2ngsuJPgoo9ddH1_KH8OFwuZcDbA@HIDDEN>
	<jwvlidx4rfo.fsf-monnier+emacs@HIDDEN>
	<CAPM58ogCn5hi6qskV9XTqJoqm23fanS661ajPkRdfES6_Hg=-A@HIDDEN>
Date: Mon, 19 Nov 2012 20:10:56 +0000
Message-ID: <CAPM58oj3z8bjbsaNLjQNYLgkY-6H1WS+YA0EgKuZZrp3C3s7Yg@HIDDEN>
Subject: Fwd: bug#12916: 24.2;
	Completion for "C-x b" does not include current buffer
From: Richard Copley <rcopley@HIDDEN>
To: 12916 <at> debbugs.gnu.org
Content-Type: text/plain; charset=ISO-8859-1
X-Spam-Score: 0.1 (/)
X-Debbugs-Envelope-To: 12916
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.13
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <http://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>,
	<mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <http://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <http://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>,
	<mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Sender: debbugs-submit-bounces <at> debbugs.gnu.org
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
X-Spam-Score: 0.1 (/)

Stefan, sorry I replied to you personally without replying to the tracker.

On 19 November 2012 14:22, Stefan Monnier <monnier@HIDDEN> wrote:
>> In older Emacs versions (*), to switch buffer, I could type "C-x b",
>> followed by a unique prefix of the desired buffer's name, then "TAB
>> RET".  This routine no longer works.  Specifically, the completion fails
>> when the desired buffer is already the current buffer.  So before I can
>> switch, I first have to work out which window is selected and whether
>> its buffer is the one I want.
>
> Hmm... I'd expect the user to know in which buffer she is when she hits
> C-x b.  Can you give us a few more hints about your use-case to try and
> help me understand why you don't know in which buffer you are when you
> hit C-x b?

The short answer is, when I've just killed a buffer (and I'm reading
Wikipedia, talking to a co-worker and watching TV).

The longer answer is: when there are two windows visible, I've just
killed a buffer, the two windows are now showing the same buffer (and
by the way, who ordered that?!), I want both windows to show the same
buffer, and there's a family of ducklings walking past the window and
they're really cute.

My mental map of recently-used buffers is not per-window, so to me it
is now unpredictable what other buffer will be shown after I kill a
buffer. Now that I come to think about it, perhaps this is really my
problem.

>> In my opinion this was a bad decision, and I think we should go back
>> to using "B" as the interactive spec for switch-to-buffer.  Others
>> might disagree, so would it be possible to add a custom variable to
>> control whether the current buffer is included in the list of completions?
>
> I'm not sure this deserves such a customization variable. But in any
> case, in the mean time, you can get back the previous behavior with the
> following hack:
>
>    (defadvice internal-complete-buffer-except (around rc-all-buffers activate)
>      (setq ad-return-value #'internal-complete-buffer))
>
> Maybe a cleaner workaround might be:
>
>    (put 'switch-to-buffer 'interactive-form
>         '(interactive "BSwitch to buffer: "))

Thank you! That seems to behave just as I want.

> -- Stefan




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#12916; Package emacs. Full text available.

Message received at 12916 <at> debbugs.gnu.org:


Received: (at 12916) by debbugs.gnu.org; 19 Nov 2012 14:23:29 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Mon Nov 19 09:23:29 2012
Received: from localhost ([127.0.0.1]:54830 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.72)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1TaSG1-0006oT-AE
	for submit <at> debbugs.gnu.org; Mon, 19 Nov 2012 09:23:29 -0500
Received: from relais.videotron.ca ([24.201.245.36]:29020)
	by debbugs.gnu.org with esmtp (Exim 4.72)
	(envelope-from <monnier@HIDDEN>) id 1TaSFz-0006oM-Vj
	for 12916 <at> debbugs.gnu.org; Mon, 19 Nov 2012 09:23:28 -0500
MIME-version: 1.0
Content-transfer-encoding: 7BIT
Content-type: text/plain; CHARSET=US-ASCII
Received: from ceviche.home ([24.201.208.110]) by VL-VM-MR006.ip.videotron.ca
	(Oracle Communications Messaging Exchange Server 7u4-22.01 64bit
	(built Apr 21
	2011)) with ESMTP id <0MDQ004CYNXBOL10@HIDDEN> for
	12916 <at> debbugs.gnu.org; Mon, 19 Nov 2012 09:22:23 -0500 (EST)
Received: by ceviche.home (Postfix, from userid 20848)	id 88CBF660FF; Mon,
	19 Nov 2012 09:22:21 -0500 (EST)
From: Stefan Monnier <monnier@HIDDEN>
To: Richard Copley <rcopley@HIDDEN>
Subject: Re: bug#12916: 24.2; Completion for "C-x b" does not include current
	buffer
Message-id: <jwvlidx4rfo.fsf-monnier+emacs@HIDDEN>
References: <CAPM58ogXcBv+bXA09+Z_V=2ngsuJPgoo9ddH1_KH8OFwuZcDbA@HIDDEN>
Date: Mon, 19 Nov 2012 09:22:21 -0500
In-reply-to: <CAPM58ogXcBv+bXA09+Z_V=2ngsuJPgoo9ddH1_KH8OFwuZcDbA@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3.50 (gnu/linux)
X-Spam-Score: 1.5 (+)
X-Spam-Report: Spam detection software, running on the system "debbugs.gnu.org",
	has
	identified this incoming email as possible spam. The original message
	has been attached to this so you can view it (if it isn't spam) or
	label similar future email.  If you have any questions, see
	the administrator of that system for details.
	Content preview:  > In older Emacs versions (*), to switch buffer,
	I could type
	"C-x b", > followed by a unique prefix of the desired buffer's name,
	then "TAB > RET". This routine no longer works. Specifically,
	the completion fails
	> when the desired buffer is already the current buffer. So before I
	can > switch,
	I first have to work out which window is selected and whether >
	its buffer is the one I want. [...] 
	Content analysis details:   (1.5 points, 10.0 required)
	pts rule name              description
	---- ----------------------
	--------------------------------------------------
	0.7 SPF_SOFTFAIL SPF: sender does not match SPF record (softfail)
	0.8 BAYES_50               BODY: Bayes spam probability is 40 to 60%
	[score: 0.5000]
	-0.0 RCVD_IN_DNSWL_NONE RBL: Sender listed at http://www.dnswl.org/,
	no trust [24.201.245.36 listed in list.dnswl.org]
	0.0 T_HDRS_LCASE           Odd capitalization of message header
	0.0 T_MANY_HDRS_LCASE Odd capitalization of multiple message headers
X-Debbugs-Envelope-To: 12916
Cc: 12916 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.13
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <http://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>,
	<mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <http://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <http://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>,
	<mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Sender: debbugs-submit-bounces <at> debbugs.gnu.org
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
X-Spam-Score: 1.5 (+)
X-Spam-Report: Spam detection software, running on the system "debbugs.gnu.org", has
 identified this incoming email as possible spam.  The original message
 has been attached to this so you can view it (if it isn't spam) or label
 similar future email.  If you have any questions, see
 the administrator of that system for details.
 
 Content preview:  > In older Emacs versions (*), to switch buffer, I could type
    "C-x b", > followed by a unique prefix of the desired buffer's name, then
    "TAB > RET". This routine no longer works. Specifically, the completion fails
    > when the desired buffer is already the current buffer. So before I can
   > switch, I first have to work out which window is selected and whether >
   its buffer is the one I want. [...] 
 
 Content analysis details:   (1.5 points, 10.0 required)
 
  pts rule name              description
 ---- ---------------------- --------------------------------------------------
 -0.0 RCVD_IN_DNSWL_NONE     RBL: Sender listed at http://www.dnswl.org/, no
                             trust
                             [24.201.245.36 listed in list.dnswl.org]
  0.7 SPF_SOFTFAIL           SPF: sender does not match SPF record (softfail)
  0.8 BAYES_50               BODY: Bayes spam probability is 40 to 60%
                             [score: 0.5000]

> In older Emacs versions (*), to switch buffer, I could type "C-x b",
> followed by a unique prefix of the desired buffer's name, then "TAB
> RET".  This routine no longer works.  Specifically, the completion fails
> when the desired buffer is already the current buffer.  So before I can
> switch, I first have to work out which window is selected and whether
> its buffer is the one I want.

Hmm... I'd expect the user to know in which buffer she is when she hits
C-x b.  Can you give us a few more hints about your use-case to try and
help me understand why you don't know in which buffer you are when you
hit C-x b?

> In my opinion this was a bad decision, and I think we should go back
> to using "B" as the interactive spec for switch-to-buffer.  Others
> might disagree, so would it be possible to add a custom variable to
> control whether the current buffer is included in the list of completions?

I'm not sure this deserves such a customization variable.  But in any
case, in the mean time, you can get back the previous behavior with the
following hack:

   (defadvice internal-complete-buffer-except (around rc-all-buffers activate)
     (setq ad-return-value #'internal-complete-buffer))

Maybe a cleaner workaround might be:

   (put 'switch-to-buffer 'interactive-form
        '(interactive "BSwitch to buffer: "))


-- Stefan




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#12916; Package emacs. Full text available.
Merged 9598 12916. Request was from Glenn Morris <rgm@HIDDEN> to control <at> debbugs.gnu.org. Full text available.

Message received at submit <at> debbugs.gnu.org:


Received: (at submit) by debbugs.gnu.org; 17 Nov 2012 15:45:20 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sat Nov 17 10:45:20 2012
Received: from localhost ([127.0.0.1]:51027 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.72)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1TZka7-0004Kx-0C
	for submit <at> debbugs.gnu.org; Sat, 17 Nov 2012 10:45:19 -0500
Received: from eggs.gnu.org ([208.118.235.92]:41265)
	by debbugs.gnu.org with esmtp (Exim 4.72)
	(envelope-from <rcopley@HIDDEN>) id 1TZka4-0004Kp-FE
	for submit <at> debbugs.gnu.org; Sat, 17 Nov 2012 10:45:17 -0500
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <rcopley@HIDDEN>) id 1TZkZA-00008W-K6
	for submit <at> debbugs.gnu.org; Sat, 17 Nov 2012 10:44:23 -0500
Received: from lists.gnu.org ([208.118.235.17]:43294)
	by eggs.gnu.org with esmtp (Exim 4.71)
	(envelope-from <rcopley@HIDDEN>) id 1TZkZA-00008S-Gw
	for submit <at> debbugs.gnu.org; Sat, 17 Nov 2012 10:44:20 -0500
Received: from eggs.gnu.org ([208.118.235.92]:45104)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <rcopley@HIDDEN>) id 1TZkZ7-0000Bg-Dw
	for bug-gnu-emacs@HIDDEN; Sat, 17 Nov 2012 10:44:20 -0500
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <rcopley@HIDDEN>) id 1TZkZ4-000076-BR
	for bug-gnu-emacs@HIDDEN; Sat, 17 Nov 2012 10:44:17 -0500
Received: from mail-oa0-f41.google.com ([209.85.219.41]:64773)
	by eggs.gnu.org with esmtp (Exim 4.71)
	(envelope-from <rcopley@HIDDEN>) id 1TZkZ4-00006h-6Q
	for bug-gnu-emacs@HIDDEN; Sat, 17 Nov 2012 10:44:14 -0500
Received: by mail-oa0-f41.google.com with SMTP id k14so4135169oag.0
	for <bug-gnu-emacs@HIDDEN>; Sat, 17 Nov 2012 07:44:13 -0800 (PST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113;
	h=mime-version:date:message-id:subject:from:to:content-type;
	bh=nuM5gsoDJTp3mvScEw18aKYlOu6a1mdnadyT/OJEF2M=;
	b=LD3XyGL6RaflDodCtxhHVzRvFCEdrzyE0hu0PIoVlH+z4H0QpGX/lXEsEPaRko+6wF
	dqS+DRZuPr2BcQHROD7MFxfxa3jcH9nSJEN568yj5332sANEEuCbkxoBS28E8dDq67PF
	QnQXtz/GwuGEx08MEupIlbD10nHtmLlUBI9MlcYaqLBIQb11WcbnmMb9WpTGCkvITH4a
	oV99ttgXBqN2Zp5qHb5SSM+o3jlHiW04RKya8Dwi1ThBLCJxtoA+M1Sc9dXe8YaJEHeL
	5uDyWsBpKLuKzMx1ej9ML/88NtQdl+DXsLuYxK8J/m9AIyCoFXDcMNRS1H5n39FvY3N4
	3XUg==
MIME-Version: 1.0
Received: by 10.182.174.39 with SMTP id bp7mr6683839obc.1.1353167053382; Sat,
	17 Nov 2012 07:44:13 -0800 (PST)
Received: by 10.182.43.34 with HTTP; Sat, 17 Nov 2012 07:44:13 -0800 (PST)
Date: Sat, 17 Nov 2012 15:44:13 +0000
Message-ID: <CAPM58ogXcBv+bXA09+Z_V=2ngsuJPgoo9ddH1_KH8OFwuZcDbA@HIDDEN>
Subject: 24.2; Completion for "C-x b" does not include current buffer
From: Richard Copley <rcopley@HIDDEN>
To: "bug-gnu-emacs@HIDDEN" <bug-gnu-emacs@HIDDEN>
Content-Type: text/plain; charset=ISO-8859-1
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x [fuzzy]
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x
X-Received-From: 208.118.235.17
X-Spam-Score: -3.4 (---)
X-Debbugs-Envelope-To: submit
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.13
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <http://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>,
	<mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <http://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <http://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>,
	<mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Sender: debbugs-submit-bounces <at> debbugs.gnu.org
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
X-Spam-Score: -3.4 (---)

In older Emacs versions (*), to switch buffer, I could type "C-x b",
followed by a unique prefix of the desired buffer's name, then "TAB
RET". This routine no longer works. Specifically, the completion fails
when the desired buffer is already the current buffer. So before I can
switch, I first have to work out which window is selected and whether
its buffer is the one I want.

In my opinion this was a bad decision, and I think we should go back
to using "B" as the interactive spec for switch-to-buffer. Others
might disagree, so would it be possible to add a custom variable to
control whether the current buffer is included in the list of completions?

(*) (I think the behaviour changed on the trunk in
revisions 86915 and 86916, in April 2008.)

In GNU Emacs 24.2.1 (i386-mingw-nt6.1.7601)
 of 2012-08-29 on MARVIN

Major mode: Lisp Interaction

Recent input:
C-x b * s c r a t c h <tab> <tab> <tab> <tab> C-g
M-x r e p o r t - e m a c s - b u g <return>




Acknowledgement sent to Richard Copley <rcopley@HIDDEN>:
New bug report received and forwarded. Copy sent to bug-gnu-emacs@HIDDEN. Full text available.
Report forwarded to bug-gnu-emacs@HIDDEN:
bug#12916; Package emacs. Full text available.
Please note: This is a static page, with minimal formatting, updated once a day.
Click here to see this page with the latest information and nicer formatting.
Last modified: Sun, 31 Jan 2016 16:30:02 UTC

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