all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Ergus <spacibba@aol.com>
To: Drew Adams <drew.adams@oracle.com>
Cc: emacs-devel@gnu.org
Subject: Re: Quit and Close Emacs Special Windows
Date: Mon, 29 Jun 2020 18:45:24 +0200	[thread overview]
Message-ID: <20200629164524.y74lx5xgdomfj25b@ergus> (raw)
In-Reply-To: <3c578050-2a23-411e-bad0-c26a7c7ed5ee@default>

On Mon, Jun 29, 2020 at 03:09:59PM +0000, Drew Adams wrote:

Hi Drew:

1) Should we provide a custom variable to conditionally enable the
set-window-parameter part of your code within quit-window?

2) I am not very trained in lisp, so I must ask if you think that this
changes is general enough for all the buffers like: Help, man, Compile,
magit etc?? and won't conflict with others? 

if 1 && 2): as this is your code, could you please add the changes if
nobody has any concern about it?

Best and thanks,
Ergus

>
>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)
>
>



  parent reply	other threads:[~2020-06-29 16:45 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 [this message]
2020-06-29 17:00       ` Drew Adams
2020-06-29 17:22         ` Ergus
2020-06-30  2:44     ` Stefan Monnier
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=20200629164524.y74lx5xgdomfj25b@ergus \
    --to=spacibba@aol.com \
    --cc=drew.adams@oracle.com \
    --cc=emacs-devel@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.
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.