unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Drew Adams <drew.adams@oracle.com>
To: "rms@gnu.org" <rms@gnu.org>, martin rudalics <rudalics@gmx.at>
Cc: "eric@ericabrahamsen.net" <eric@ericabrahamsen.net>,
	"ke.vigouroux@laposte.net" <ke.vigouroux@laposte.net>,
	"52328@debbugs.gnu.org" <52328@debbugs.gnu.org>
Subject: bug#52328: [External] : bug#52328: 27.2; [DOC] Paragraph about quit-restore-window
Date: Sat, 11 Dec 2021 04:48:42 +0000	[thread overview]
Message-ID: <SJ0PR10MB548841D0FD8DFA4196CBC453F3729@SJ0PR10MB5488.namprd10.prod.outlook.com> (raw)
In-Reply-To: <E1mvtew-0006kv-0M@fencepost.gnu.org>

I can't speak to what the manual should or shouldn't
say about `quit-restore'.  But since my name was
mentioned I'll just say that I never knowingly or
intentionally use `quit-window' interactively.  I go
out of my way to avoid any use of the `quit-restore'
window parameter.

I replace Emacs's default `quit-window' key bindings,
at least those in libraries I load, with the command
below.

It's close to what `quit-window' used to do, before
Emacs adopted `quit-restore-window'.

(In its doc string, you'll see mention of the option
that Martin mentioned, `frame-auto-hide-function',
which he offered as a way around the imposition by
Emacs of iconifying a window when quitting it or
burying its buffer.) 

(when (fboundp 'quit-restore-window)

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

  )

  reply	other threads:[~2021-12-11  4:48 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-12-06 11:46 bug#52328: 27.2; [DOC] Paragraph about quit-restore-window Kevin Vigouroux via Bug reports for GNU Emacs, the Swiss army knife of text editors
2021-12-07  4:15 ` Richard Stallman
2021-12-07 18:36   ` Eli Zaretskii
2021-12-08  4:35     ` Richard Stallman
2021-12-08 11:02       ` martin rudalics
2021-12-09  4:16         ` Richard Stallman
2021-12-09  8:05           ` martin rudalics
2021-12-11  4:06             ` Richard Stallman
2021-12-11  4:48               ` Drew Adams [this message]
2021-12-12  4:00                 ` bug#52328: [External] : " Richard Stallman
2021-12-11  4:06         ` Richard Stallman
2021-12-11  8:44           ` martin rudalics
2021-12-12  4:00             ` Richard Stallman
2021-12-12  7:02               ` Eli Zaretskii
2021-12-12 13:09                 ` Eli Zaretskii
2021-12-07 18:31 ` Eli Zaretskii
2021-12-08 11:00 ` martin rudalics

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=SJ0PR10MB548841D0FD8DFA4196CBC453F3729@SJ0PR10MB5488.namprd10.prod.outlook.com \
    --to=drew.adams@oracle.com \
    --cc=52328@debbugs.gnu.org \
    --cc=eric@ericabrahamsen.net \
    --cc=ke.vigouroux@laposte.net \
    --cc=rms@gnu.org \
    --cc=rudalics@gmx.at \
    /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 public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

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