bug-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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


From: Stefan Kangas
Subject: bug#36610: [PATCH] Make finder-exit use quit-window
Date: Fri, 12 Jul 2019 09:20:02 +0200

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 via email to

[Prev in Thread] Current Thread [Next in Thread]