emacs-devel
[Top][All Lists]
Advanced

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

Re: master 0bd221b: Fix problem of having the wrong window selected afte


From: Lars Ingebrigtsen
Subject: Re: master 0bd221b: Fix problem of having the wrong window selected after saving foo.gpg
Date: Wed, 30 Sep 2020 18:52:54 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux)

Stefan Monnier <monnier@iro.umontreal.ca> writes:

>>     * lisp/epa.el (epa--select-keys): Restore the window configuration
>>     after selecting the key to use (bug#43703).  This also ensures
>>     that the buffer we were editing ends up as the current buffer
>>     after saving it, instead of selecting a different window.
>> +  (let ((conf (current-window-configuration)))
> [...]
>> +        (set-window-configuration conf)))))
>
> I think this is called `save-window-excursion`.

I wasn't sure whether that macro would survive the call to
recursive-edit, but I guess it would.

> FWIW, I think `save-window-excursion` is never the right solution
> because it doesn't take into account the case where `pop-to-buffer`
> uses another frame.
>
> I can never remember which is the function to "undo" a `display-buffer`,
> but I believe it's something like `quit-window` or `bury-buffer`.
> We should add a reference to these in the docstring of `display-buffer`
> and `pop-to-buffer`.

So would a quit-buffer before killing the buffer have fixed the problem
here?

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no



reply via email to

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