unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: "Drew Adams" <drew.adams@oracle.com>
To: <rms@gnu.org>
Cc: emacs-devel@gnu.org
Subject: RE: error "Cannot switch buffers in (minibuffer | a dedicated) window"
Date: Tue, 18 Dec 2007 08:29:00 -0800	[thread overview]
Message-ID: <BNELLINCGFJLDJIKDGACMEOBCFAA.drew.adams@oracle.com> (raw)
In-Reply-To: <E1J4enZ-0001wm-IM@fencepost.gnu.org>

>     Wouldn't it make sense to just switch to the buffer in another window,
>     instead of raising an error?
>
> If you are trying to switch buffers in the minibuffer you probably
> don't know you're in the minibuffer. If you get an error you will
> probably type C-g which will get you out of it.  Switching buffers in
> another window and remaining in the minibuffer seems like a bad idea.

Thanks for the explanation. I guess that makes sense.

I agree that in this situation you probably don't know you're in the
minibuffer.

I was thinking that it would therefore be reasonable to exit the minibuffer
automatically at that point (the current level, if recursive) - that's
another way to remedy the mismatch between where the user thinks s?he is and
where s?he is. That is, instead of leaving the user in the minibuffer and
making him hit C-g to exit and then hit `C-x b' again, just assume that was
his intention.

Just assume, that is, that the user wants to (1) switch to the buffer and
(2) exit the minibuffer. This assumes that the main intention is to switch
to the buffer, with the particular window for the buffer not having a great
importance.

This would be a bit more DWIM and a bit less hands-off. The current approach
has the advantage of just informing the user of the state of things, without
assuming anything or trying to remedy the situation.

(Again, however, if we did this, it might be good to reserve it for
interactive buffer switching.)

  reply	other threads:[~2007-12-18 16:29 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-12-17 22:27 error "Cannot switch buffers in (minibuffer | a dedicated) window" Drew Adams
2007-12-18 15:56 ` Richard Stallman
2007-12-18 16:29   ` Drew Adams [this message]
2007-12-19 10:12     ` Richard Stallman
2007-12-21  0:43 ` Stefan Monnier
2007-12-21  5:29   ` error "Cannot switch buffers in (minibuffer | a dedicated)window" Drew Adams
2008-02-13  7:18   ` pop-tag-mark - shouldn't it use pop-to-buffer instead of switch-to-buffer? Drew Adams

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=BNELLINCGFJLDJIKDGACMEOBCFAA.drew.adams@oracle.com \
    --to=drew.adams@oracle.com \
    --cc=emacs-devel@gnu.org \
    --cc=rms@gnu.org \
    /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).