From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Thien-Thi Nguyen Newsgroups: gmane.emacs.help Subject: Re: Should delete-window switch to next buffer when there is only one window? Date: Wed, 15 Jan 2014 06:12:01 +0100 Message-ID: <87sispj0bi.fsf@zigzag.favinet> References: <64e2823c-29c6-4874-b9a2-6dfa6eda4c4a@googlegroups.com> <20140115011942.GA28697@doriath.local> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: multipart/signed; boundary="=-=-="; micalg=pgp-sha1; protocol="application/pgp-signature" X-Trace: ger.gmane.org 1389762521 23227 80.91.229.3 (15 Jan 2014 05:08:41 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Wed, 15 Jan 2014 05:08:41 +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 06:08:48 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 1W3Iic-00082H-D4 for geh-help-gnu-emacs@m.gmane.org; Wed, 15 Jan 2014 06:08:46 +0100 Original-Received: from localhost ([::1]:52138 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1W3Iib-0000xD-Qi for geh-help-gnu-emacs@m.gmane.org; Wed, 15 Jan 2014 00:08:45 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:47383) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1W3IiK-0000x5-Qp for help-gnu-emacs@gnu.org; Wed, 15 Jan 2014 00:08:36 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1W3IiD-0003gw-Ec for help-gnu-emacs@gnu.org; Wed, 15 Jan 2014 00:08:28 -0500 Original-Received: from smtp207.alice.it ([82.57.200.103]:4066) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1W3IiD-0003gl-3c for help-gnu-emacs@gnu.org; Wed, 15 Jan 2014 00:08:21 -0500 Original-Received: from zigzag.favinet (95.236.26.168) by smtp207.alice.it (8.6.060.28) id 525156851677C7D0 for help-gnu-emacs@gnu.org; Wed, 15 Jan 2014 06:08:19 +0100 Original-Received: from ttn by zigzag.favinet with local (Exim 4.80) (envelope-from ) id 1W3Ilv-00041C-PF for help-gnu-emacs@gnu.org; Wed, 15 Jan 2014 06:12:11 +0100 In-Reply-To: <20140115011942.GA28697@doriath.local> ("Ernest =?utf-8?Q?Adr?= =?utf-8?Q?ogu=C3=A9=22's?= message of "Wed, 15 Jan 2014 02:19:42 +0100") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3 (gnu/linux) X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 82.57.200.103 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:95408 Archived-At: --=-=-= Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable () Ernest Adrogu=C3=A9 () Wed, 15 Jan 2014 02:19:42 +0100 I was thinking from the user point of view. It's good that you say this! In my mental model (which maybe doesn't reflect how Emacs really works, but nonetheless) I think of windows as being stacked, and when I do C-x 0 to me is like saying send the top window to the bottom of the stack. In this context, it would make sense for C-x 0 to switch to a different buffer when there is only one window in the frame. (defun begone! () (interactive) (condition-case nil=20 (delete-window) (error (bury-buffer)))) (global-set-key "\C-x0" 'begone!) Ok, I will try to think harder before I make another suggestion. Sorry for wasting your time! No worries. I think from the original post we would have arrived more easily at the above code (or something like it) if there had been: s/instead/in that case/ Insert appropriate Gandalf quote, here. :-D =2D-=20 Thien-Thi Nguyen GPG key: 4C807502 (if you're human and you know it) read my lisp: (responsep (questions 'technical) (not (via 'mailing-list))) =3D> nil --=-=-= Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.12 (GNU/Linux) iEYEARECAAYFAlLWGKQACgkQZwMiJEyAdQKIkgCg10l/NphWstlHogapCrJnvXTn MwwAoNOEfPJbgIGx7LiML5xiTzyNAmDw =6KYS -----END PGP SIGNATURE----- --=-=-=--