all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Lars Ingebrigtsen <larsi@gnus.org>
To: Stefan Monnier <monnier@iro.umontreal.ca>
Cc: emacs-devel@gnu.org
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	[thread overview]
Message-ID: <87y2kr1a1l.fsf@gnus.org> (raw)
In-Reply-To: <jwvblhnp6k3.fsf-monnier+emacs@gnu.org> (Stefan Monnier's message of "Wed, 30 Sep 2020 12:46:22 -0400")

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	other threads:[~2020-09-30 16:52 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <20200930153650.16819.40412@vcs0.savannah.gnu.org>
     [not found] ` <20200930153652.925A9209AC@vcs0.savannah.gnu.org>
2020-09-30 16:46   ` master 0bd221b: Fix problem of having the wrong window selected after saving foo.gpg Stefan Monnier
2020-09-30 16:52     ` Lars Ingebrigtsen [this message]
2020-09-30 17:04       ` Stefan Monnier
2020-09-30 23:46         ` Lars Ingebrigtsen

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

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87y2kr1a1l.fsf@gnus.org \
    --to=larsi@gnus.org \
    --cc=emacs-devel@gnu.org \
    --cc=monnier@iro.umontreal.ca \
    /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 external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.