From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Drew Adams Newsgroups: gmane.emacs.help Subject: RE: Should delete-window switch to next buffer when there is only one window? Date: Tue, 14 Jan 2014 15:33:26 -0800 (PST) Message-ID: <58204764-31df-4d07-8e48-30952afebb9f@default> References: <64e2823c-29c6-4874-b9a2-6dfa6eda4c4a@googlegroups.com> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: quoted-printable X-Trace: ger.gmane.org 1389742436 17431 80.91.229.3 (14 Jan 2014 23:33:56 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Tue, 14 Jan 2014 23:33:56 +0000 (UTC) To: Peter , help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Wed Jan 15 00:34:02 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 1W3DUe-0006i6-Sb for geh-help-gnu-emacs@m.gmane.org; Wed, 15 Jan 2014 00:34:00 +0100 Original-Received: from localhost ([::1]:51243 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1W3DUe-00009p-BF for geh-help-gnu-emacs@m.gmane.org; Tue, 14 Jan 2014 18:34:00 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:56571) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1W3DUL-00009e-9y for help-gnu-emacs@gnu.org; Tue, 14 Jan 2014 18:33:49 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1W3DUC-0002cc-NK for help-gnu-emacs@gnu.org; Tue, 14 Jan 2014 18:33:41 -0500 Original-Received: from userp1040.oracle.com ([156.151.31.81]:43153) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1W3DUC-0002cQ-Gg for help-gnu-emacs@gnu.org; Tue, 14 Jan 2014 18:33:32 -0500 Original-Received: from acsinet22.oracle.com (acsinet22.oracle.com [141.146.126.238]) by userp1040.oracle.com (Sentrion-MTA-4.3.2/Sentrion-MTA-4.3.2) with ESMTP id s0ENXTOY008442 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Tue, 14 Jan 2014 23:33:30 GMT Original-Received: from userz7021.oracle.com (userz7021.oracle.com [156.151.31.85]) by acsinet22.oracle.com (8.14.4+Sun/8.14.4) with ESMTP id s0ENXRRH003814 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Tue, 14 Jan 2014 23:33:28 GMT Original-Received: from abhmp0009.oracle.com (abhmp0009.oracle.com [141.146.116.15]) by userz7021.oracle.com (8.14.4+Sun/8.14.4) with ESMTP id s0ENXRx7029308; Tue, 14 Jan 2014 23:33:27 GMT In-Reply-To: <64e2823c-29c6-4874-b9a2-6dfa6eda4c4a@googlegroups.com> X-Priority: 3 X-Mailer: Oracle Beehive Extensions for Outlook 2.0.1.8 (707110) [OL 12.0.6680.5000 (x86)] X-Source-IP: acsinet22.oracle.com [141.146.126.238] X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.4.x-2.6.x [generic] X-Received-From: 156.151.31.81 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:95401 Archived-At: > No, I think it is doing the right thing. It doesn't make any sense > for YOUR code to delete the only window that exists. If it just > switched buffers (to what? what rule should apply in this case? A > random buffer selection?) then it isn't doing what you requested - > which is to delete the window. >=20 > I think a bit more thought on your side should be applied rather > than suggesting that Emacs behaviour change to suit you. Put it another way, perhaps: Define your own command (i.e., with a different name), and remap `delete-window' to your command, for (your own) interactive use. Two points are important here: 1. `delete-window' is an Emacs function used in many places. It is not just a command, and it is not invoked only interactively (e.g., via `C-x 0'). 2. Try it out on yourself before suggesting that Emacs adopt it. Use it for a while (months? years?). These are two things to keep in mind whenever you have an idea about changing the default behavior of some command.