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: Stefan Monnier
Subject: Re: master 0bd221b: Fix problem of having the wrong window selected after saving foo.gpg
Date: Wed, 30 Sep 2020 12:46:22 -0400
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux)

>     * 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`.

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


        Stefan




reply via email to

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