From: Stefan Monnier <monnier@iro.umontreal.ca>
To: Drew Adams <drew.adams@oracle.com>
Cc: Ergus <spacibba@aol.com>, emacs-devel@gnu.org
Subject: Re: Quit and Close Emacs Special Windows
Date: Mon, 29 Jun 2020 22:44:07 -0400 [thread overview]
Message-ID: <jwvpn9h1dfc.fsf-monnier+emacs@gnu.org> (raw)
In-Reply-To: <3c578050-2a23-411e-bad0-c26a7c7ed5ee@default> (Drew Adams's message of "Mon, 29 Jun 2020 15:09:59 +0000 (UTC)")
Hi Drew,
What does this have to do with Ergus's message?
[ Except that they both mention windows and buffers. ]
Stefan
Drew Adams [2020-06-29 15:09:59] wrote:
>> I have been reading this site:
>>
>> https://urldefense.com/v3/__https://christiantietze.de/posts/2019/10/emacs-
>> quit-special-
>> windows/__;!!GqivPVa7Brio!MYwcdeIdWpFMGgsvTIkt5Vbrg69dFCUgHqpfuyAyObkHKL7IAog
>> HWMmQFaH3DjBy$
>>
>> and I am wondering why we don't provide an option to enable this
>> behaviour by default in some cases without needing the "hack" in the
>> link. It doesn't seems to be too complex to implement right?
>>
>> I know it is just a detail, but in some cases (like when using man or
>> compile mode, or reading a function documentation, or after executing
>> magit commands) it doesn't make sense to keep the buffer in the buffer
>> list after pressing q in 90% of the times.
>>
>> Could we consider to add this as (for example) an option to enable it by
>> default OR add a customisable list with the modes where the user could
>> desire to have this behaviour?
>
> FWIW, I do this:
>
> (defun quit-window-delete (&optional kill window)
> "Quit WINDOW, deleting it, and bury its buffer.
> WINDOW must be a live window and defaults to the selected one.
> With prefix argument KILL non-nil, kill the buffer instead of
> burying it.
>
> This is similar to the version of `quit-window' that Emacs had before
> the introduction of `quit-restore-window'. It ignores the information
> stored in WINDOW's `quit-restore' window parameter.
>
> It deletes the WINDOW more often, rather than switching to another
> buffer in it. If WINDOW is alone in its frame then the frame is
> deleted or iconified, according to option `frame-auto-hide-function'."
> (interactive "P")
> (set-window-parameter
> window 'quit-restore `(frame frame nil ,(current-buffer)))
> (quit-restore-window window (if kill 'kill 'bury)))
>
> (global-set-key [remap quit-window] 'quit-window-delete)
>
> I also use dedicated windows for buffers with names `*...*',
> and I make frame "hiding" delete frames rather than iconify.
>
> (setq special-display-regexps '("[ ]?[*][^*]+[*]"))
> (setq frame-auto-hide-function 'delete-frame)
next prev parent reply other threads:[~2020-06-30 2:44 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <87ftaej5pp.fsf.ref@ergus.i-did-not-set--mail-host-address--so-tickle-me>
2020-06-29 14:40 ` Quit and Close Emacs Special Windows Ergus
2020-06-29 15:09 ` Drew Adams
2020-06-29 16:13 ` Yuan Fu
2020-06-29 16:45 ` Ergus
2020-06-29 17:00 ` Drew Adams
2020-06-29 17:22 ` Ergus
2020-06-30 2:44 ` Stefan Monnier [this message]
2020-06-30 3:24 ` Drew Adams
2020-06-30 4:27 ` Stefan Monnier
2020-06-30 15:39 ` Drew Adams
2020-06-30 17:04 ` Stefan Monnier
2020-07-01 1:31 ` Ergus
2020-07-01 3:47 ` Yuan Fu
2020-07-01 13:55 ` Drew Adams
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=jwvpn9h1dfc.fsf-monnier+emacs@gnu.org \
--to=monnier@iro.umontreal.ca \
--cc=drew.adams@oracle.com \
--cc=emacs-devel@gnu.org \
--cc=spacibba@aol.com \
/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.