From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Marcin Borkowski Newsgroups: gmane.emacs.help Subject: Re: Should delete-window switch to next buffer when there is only one window? Date: Wed, 15 Jan 2014 09:45:49 +0100 Organization: WMI UAM Message-ID: <20140115094549.394be414@aga-netbook> References: <20140114223057.GA27881@doriath.local> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-Trace: ger.gmane.org 1389775588 24868 80.91.229.3 (15 Jan 2014 08:46:28 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Wed, 15 Jan 2014 08:46:28 +0000 (UTC) To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Wed Jan 15 09:46:36 2014 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1W3M7O-0002Yr-RO for geh-help-gnu-emacs@m.gmane.org; Wed, 15 Jan 2014 09:46:34 +0100 Original-Received: from localhost ([::1]:52955 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1W3M7O-0005Zw-6L for geh-help-gnu-emacs@m.gmane.org; Wed, 15 Jan 2014 03:46:34 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:59000) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1W3M77-0005ZZ-O4 for help-gnu-emacs@gnu.org; Wed, 15 Jan 2014 03:46:22 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1W3M72-0005Ub-MU for help-gnu-emacs@gnu.org; Wed, 15 Jan 2014 03:46:17 -0500 Original-Received: from msg.wmi.amu.edu.pl ([150.254.78.50]:49320) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1W3M72-0005UG-Fo for help-gnu-emacs@gnu.org; Wed, 15 Jan 2014 03:46:12 -0500 Original-Received: from localhost (localhost [127.0.0.1]) by msg.wmi.amu.edu.pl (Postfix) with ESMTP id D69A27115A for ; Wed, 15 Jan 2014 09:45:50 +0100 (CET) Original-Received: from msg.wmi.amu.edu.pl ([127.0.0.1]) by localhost (msg.wmi.amu.edu.pl [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id PXKpN4ydJWY8 for ; Wed, 15 Jan 2014 09:45:50 +0100 (CET) Original-Received: from aga-netbook (101-138.echostar.pl [213.156.101.138]) by msg.wmi.amu.edu.pl (Postfix) with ESMTPSA id AC97A7113C for ; Wed, 15 Jan 2014 09:45:50 +0100 (CET) In-Reply-To: X-Mailer: Claws Mail 3.8.1 (GTK+ 2.24.17; i686-pc-linux-gnu) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x X-Received-From: 150.254.78.50 X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.help:95410 Archived-At: Dnia 2014-01-14, o godz. 15:57:45 Drew Adams napisa=C5=82(a): > > Currently if you attempt to delete an only window, the following > > message shows up: "Attempt to delete minibuffer or sole ordinary > > window" > >=20 > > I think that perhaps it would be better if it switched buffers > > instead. What do you think? >=20 > 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. >=20 > 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. >=20 > 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. >=20 > 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. >=20 > 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. >=20 > 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.) --=20 Marcin Borkowski http://octd.wmi.amu.edu.pl/en/Marcin_Borkowski Adam Mickiewicz University