From: martin rudalics <rudalics@gmx.at>
To: Kevin Ryde <user42@zip.com.au>
Cc: 12708@debbugs.gnu.org
Subject: bug#12708: 24.1; M-x display-time-world "q" close window
Date: Tue, 23 Oct 2012 08:33:16 +0200 [thread overview]
Message-ID: <50863A2C.1010008@gmx.at> (raw)
In-Reply-To: <87txtmkziu.fsf@blah.blah>
> In an M-x display-time-world, it'd be good if the "q" key closed the
> window (as well as killing the buffer).
>
> The window is a small extra opened at the bottom of the screen by the
> command. If it's still that size then it's not much use for anything
> else.
>
> M-x calendar has its "q" close the small window it opens. I'm suspect
> it's not possible to share code, as the calendar bit looks like it does
> other things too.
We could do
(defun quit-window-kill-buffer (&optional window)
"Quit WINDOW and kill its buffer.
WINDOW must be a live window and defaults to the selected one."
(interactive)
(quit-restore-window window 'kill))
(defvar display-time-world-mode-map
(let ((map (make-sparse-keymap)))
(define-key map "q" 'quit-window-kill-buffer)
map)
"Keymap of Display Time World mode.")
But `display-time-world' should probably also use `display-buffer'
instead of `pop-to-buffer' and put the buffer in `view-mode'. After
all, who wants to edit or navigate the *wclock* buffer?
martin
next prev parent reply other threads:[~2012-10-23 6:33 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-10-22 20:44 bug#12708: 24.1; M-x display-time-world "q" close window Kevin Ryde
2012-10-23 6:33 ` martin rudalics [this message]
2012-10-24 7:44 ` Juri Linkov
2012-10-27 11:04 ` martin rudalics
2012-10-27 11:45 ` Juri Linkov
2012-10-27 13:45 ` martin rudalics
2012-10-27 15:02 ` Juri Linkov
2012-10-28 15:23 ` martin rudalics
2012-10-28 17:41 ` Juri Linkov
2012-10-24 14:53 ` Chong Yidong
2012-10-24 16:25 ` Glenn Morris
2012-10-24 18:27 ` Chong Yidong
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
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=50863A2C.1010008@gmx.at \
--to=rudalics@gmx.at \
--cc=12708@debbugs.gnu.org \
--cc=user42@zip.com.au \
/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.
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.