unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Stefan Monnier <monnier@iro.umontreal.ca>
To: Richard Copley <rcopley@gmail.com>
Cc: 12916@debbugs.gnu.org
Subject: bug#12916: 24.2; Completion for "C-x b" does not include current buffer
Date: Mon, 19 Nov 2012 09:22:21 -0500	[thread overview]
Message-ID: <jwvlidx4rfo.fsf-monnier+emacs@gnu.org> (raw)
In-Reply-To: <CAPM58ogXcBv+bXA09+Z_V=2ngsuJPgoo9ddH1_KH8OFwuZcDbA@mail.gmail.com>

> 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





  reply	other threads:[~2012-11-19 14:22 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-11-17 15:44 bug#12916: 24.2; Completion for "C-x b" does not include current buffer Richard Copley
2012-11-19 14:22 ` Stefan Monnier [this message]
     [not found]   ` <CAPM58ogCn5hi6qskV9XTqJoqm23fanS661ajPkRdfES6_Hg=-A@mail.gmail.com>
2012-11-19 20:10     ` bug#12916: Fwd: " Richard Copley
2012-11-19 21:32   ` Richard Stallman
2012-11-21  8:14   ` Richard Stallman
  -- strict thread matches above, loose matches on Subject: below --
2011-09-25 17:34 bug#9598: 24.0.50; completion goes too far Richard Stallman
2011-09-25 18:47 ` Drew Adams
2011-09-26  1:00   ` Richard Stallman
2011-09-26  6:09     ` Eli Zaretskii
2011-09-26 10:42       ` Richard Stallman
2011-09-26 11:34         ` Eli Zaretskii
2011-09-26 21:12           ` Richard Stallman
2022-02-06  0:05             ` bug#12916: 24.2; Completion for "C-x b" does not include current buffer Lars Ingebrigtsen

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

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=jwvlidx4rfo.fsf-monnier+emacs@gnu.org \
    --to=monnier@iro.umontreal.ca \
    --cc=12916@debbugs.gnu.org \
    --cc=rcopley@gmail.com \
    /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 public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).