bug#36610: [PATCH] Make finder-exit use quit-window

classic Classic list List threaded Threaded
6 messages Options
Reply | Threaded
Open this post in threaded view
|

bug#36610: [PATCH] Make finder-exit use quit-window

Stefan Kangas
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.

The attached patch fixes that by using quit-window instead.

(I'll send the patch in a separate message once this is assigned a bug
number.)

Thanks,
Stefan Kangas



Reply | Threaded
Open this post in threaded view
|

bug#36610: [PATCH] Make finder-exit use quit-window

Stefan Kangas
Stefan Kangas <[hidden email]> writes:
> (I'll send the patch in a separate message once this is assigned a bug
> number.)

Patch attached.

Thanks,
Stefan Kangas

0001-Make-finder-exit-use-quit-window-Bug-33610.patch (1K) Download Attachment
Reply | Threaded
Open this post in threaded view
|

bug#36610: [PATCH] Make finder-exit use quit-window

Stefan Kangas
In reply to this post by Stefan Kangas
Stefan Kangas <[hidden email]> 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".



Reply | Threaded
Open this post in threaded view
|

bug#36610: [PATCH] Make finder-exit use quit-window

Eli Zaretskii
> From: Stefan Kangas <[hidden email]>
> Date: Fri, 12 Jul 2019 00:57:26 +0200
>
> Stefan Kangas <[hidden email]> 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?
Doesn't quit-window also make the window go away, and since you call
it with 2nd arg non-nil, also kill the buffer?  So I'm unsure I
understand the essence of the change and more importantly its
user-visible effects.

Thanks.



Reply | Threaded
Open this post in threaded view
|

bug#36610: [PATCH] Make finder-exit use quit-window

Stefan Kangas
Eli Zaretskii <[hidden email]> writes:

>
> > From: Stefan Kangas <[hidden email]>
> > Date: Fri, 12 Jul 2019 00:57:26 +0200
> >
> > Stefan Kangas <[hidden email]> 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 | Threaded
Open this post in threaded view
|

bug#36610: [PATCH] Make finder-exit use quit-window

Eli Zaretskii
> From: Stefan Kangas <[hidden email]>
> Date: Fri, 12 Jul 2019 09:20:02 +0200
> Cc: [hidden email]
>
> Does the above clear it up sufficiently?

Yes, thanks.  Please try in the future including such details either
in the bug report, or in the commit log message, or in the comments to
the changes, whatever is appropriate for the case at hand.