unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Stefan Kangas <stefan@marxist.se>
To: Eli Zaretskii <eliz@gnu.org>
Cc: 36610@debbugs.gnu.org
Subject: bug#36610: [PATCH] Make finder-exit use quit-window
Date: Fri, 12 Jul 2019 09:20:02 +0200	[thread overview]
Message-ID: <CADwFkmksx2w0ar3++0WZbVdHbt3kr67gv4uKTCPC20hs0OpdUg@mail.gmail.com> (raw)
In-Reply-To: <83y3133gnf.fsf@gnu.org>

Eli Zaretskii <eliz@gnu.org> writes:
>
> > From: Stefan Kangas <stefan@marxist.se>
> > Date: Fri, 12 Jul 2019 00:57:26 +0200
> >
> > Stefan Kangas <stefan@marxist.se> writes:
> >
> > > When I have two windows open and hit C-h p to open finder, then press q to exit,
> > > the second window is suddenly gone.  This is because finder-exit uses
> > > kill-window instead of quit-window, and is a minor annoyance.
> >
> > That should of course be "delete-window instead of quit-window".
>
> Yes, but please also explain the motivation for the change.  In
> particular, what do you mean by "gone" in the above description?

The behaviour now is this: When I have two windows open and hit C-h p
that makes Finder display in the window not currently in focus, and
focus moves there.  If I hit q, that window gets deleted (is "gone"),
and I'm left with only one window.

> Doesn't quit-window also make the window go away, and since you call
> it with 2nd arg non-nil, also kill the buffer?

With the attached patch, if I have two windows and hit C-h p and then
q, the display reverts to its previous state.  In other words, I'm
back with two windows displaying the same buffers as before I hit
C-h p.  I think this is more intuitive and allows the user to immediately
get back to her work.

quit-window has heuristics that delete-window lacks.  This is how its
explained in the doc string of quit-window:

    According to information stored in WINDOW’s ‘quit-restore’ window
    parameter either (1) delete WINDOW and its frame, (2) delete
    WINDOW, (3) restore the buffer previously displayed in WINDOW,
    or (4) make WINDOW display some other buffer than the present
    one.  If non-nil, reset ‘quit-restore’ parameter to nil.

Lastly, when we exit Finder, we want to kill the "*Finder*" buffer
too.  This is why quit-window should get a non-nil second argument.
That's the same behaviour as today.

> So I'm unsure I
> understand the essence of the change and more importantly its
> user-visible effects.

Does the above clear it up sufficiently?

Thanks,
Stefan Kangas





  reply	other threads:[~2019-07-12  7:20 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-07-11 22:48 bug#36610: [PATCH] Make finder-exit use quit-window Stefan Kangas
2019-07-11 22:53 ` Stefan Kangas
2019-07-20  9:24   ` Eli Zaretskii
2019-07-11 22:57 ` Stefan Kangas
2019-07-12  6:34   ` Eli Zaretskii
2019-07-12  7:20     ` Stefan Kangas [this message]
2019-07-12  7:57       ` Eli Zaretskii

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=CADwFkmksx2w0ar3++0WZbVdHbt3kr67gv4uKTCPC20hs0OpdUg@mail.gmail.com \
    --to=stefan@marxist.se \
    --cc=36610@debbugs.gnu.org \
    --cc=eliz@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 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).