[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: |
Thien-Thi Nguyen |
Subject: |
Re: Should delete-window switch to next buffer when there is only one window? |
Date: |
Wed, 15 Jan 2014 06:12:01 +0100 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/24.3 (gnu/linux) |
() Ernest Adrogué <nfdisco@gmail.com>
() 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
(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
--
Thien-Thi Nguyen
GPG key: 4C807502
(if you're human and you know it)
read my lisp: (responsep (questions 'technical)
(not (via 'mailing-list)))
=> nil
pgp23tJ62EPIL.pgp
Description: PGP signature
- RE: Should delete-window switch to next buffer when there is only one window?, (continued)