From: Thien-Thi Nguyen <ttn@gnu.org>
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 06:12:01 +0100 [thread overview]
Message-ID: <87sispj0bi.fsf@zigzag.favinet> (raw)
In-Reply-To: <20140115011942.GA28697@doriath.local> ("Ernest Adrogué"'s message of "Wed, 15 Jan 2014 02:19:42 +0100")
[-- Attachment #1: Type: text/plain, Size: 1220 bytes --]
() 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
[-- Attachment #2: Type: application/pgp-signature, Size: 197 bytes --]
next prev parent reply other threads:[~2014-01-15 5:12 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <mailman.11954.1389738686.10748.help-gnu-emacs@gnu.org>
2014-01-14 22:40 ` Should delete-window switch to next buffer when there is only one window? 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 [this message]
[not found] ` <mailman.11970.1389762517.10748.help-gnu-emacs@gnu.org>
2014-01-15 21:13 ` Emanuel Berg
2014-01-14 22:30 Ernest Adrogué
2014-01-14 23:57 ` Drew Adams
2014-01-15 8:45 ` Marcin Borkowski
2014-01-15 13:31 ` Stefan Monnier
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
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87sispj0bi.fsf@zigzag.favinet \
--to=ttn@gnu.org \
--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.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).