all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Marcin Borkowski <mbork@wmi.amu.edu.pl>
To: help-gnu-emacs@gnu.org
Subject: Re: Should delete-window switch to next buffer when there is only one window?
Date: Wed, 15 Jan 2014 09:45:49 +0100	[thread overview]
Message-ID: <20140115094549.394be414@aga-netbook> (raw)
In-Reply-To: <d76b70ec-f722-4a78-90ab-bae4b3e68718@default>

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	other threads:[~2014-01-15  8:45 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-01-14 22:30 Should delete-window switch to next buffer when there is only one window? Ernest Adrogué
2014-01-14 23:57 ` Drew Adams
2014-01-15  8:45   ` Marcin Borkowski [this message]
2014-01-15 13:31 ` Stefan Monnier
     [not found] <mailman.11954.1389738686.10748.help-gnu-emacs@gnu.org>
2014-01-14 22:40 ` Emanuel Berg
2014-01-14 22:43   ` Emanuel Berg
2014-01-14 23:16 ` Peter
2014-01-14 23:32   ` Emanuel Berg
2014-01-15  8:39     ` Marcin Borkowski
2014-01-14 23:33   ` Drew Adams
2014-01-15  1:19   ` Ernest Adrogué
2014-01-15  5:12     ` Thien-Thi Nguyen
     [not found]     ` <mailman.11970.1389762517.10748.help-gnu-emacs@gnu.org>
2014-01-15 21:13       ` Emanuel Berg

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

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

  git send-email \
    --in-reply-to=20140115094549.394be414@aga-netbook \
    --to=mbork@wmi.amu.edu.pl \
    --cc=help-gnu-emacs@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 external index

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

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.