help-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Should delete-window switch to next buffer when there is only one wi


From: Marcin Borkowski
Subject: Re: Should delete-window switch to next buffer when there is only one window?
Date: Wed, 15 Jan 2014 09:45:49 +0100

Dnia 2014-01-14, o godz. 15:57:45
Drew Adams <drew.adams@oracle.com> napisał(a):

> > Currently if you attempt to delete an only window, the following
> > message shows up: "Attempt to delete minibuffer or sole ordinary
> > window"
> > 
> > I think that perhaps it would be better if it switched buffers
> > instead.  What do you think?
> 
> No.  A user who hits `C-x 0' is asking to delete the window.
> S?he is not asking to switch to another buffer or buy a beer.
> 
> These are very different actions, with different purposes.
> Sure, you could combine them, but they don't seem like a useful
> combination to me.  You either want to switch to a different
> buffer or you do not.  If you do, then you want to do that in
> any case, not just when the window is alone in its frame.
> 
> A user who wants to delete the selected window wants to do just
> that.  So the error message is appropriate, to let the user know
> that it is the sole window in its frame.
> 
> Now you might indeed look for something much closer to deleting
> the window, when it is alone in its frame.  If you want to get
> rid of it in that case too, it's likely that you really want to
> get rid of the frame altogether, including its window.
> 
> That is likely to be the case if you, like me, use lots of frames,
> including for things like pop-up windows that you do want to just
> remove.  Whereas it does not make sense to try to remove the only
> window shown in a frame (hence the error message), it does make
> sense to remove a frame.
> 
> For that, library `frame-cmds.el' (note the name - it is
> especially for people who like to use frames) redefines command
> `delete-window' to invoke `delete-frame' when the window is the
> only one in its frame.

And when it's the *only* window in the *only* frame? ;)

(BTW: I agree that defining *another* command and remapping C-x 0 to it
is the best option here.)

-- 
Marcin Borkowski
http://octd.wmi.amu.edu.pl/en/Marcin_Borkowski
Adam Mickiewicz University



reply via email to

[Prev in Thread] Current Thread [Next in Thread]