From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Lars Ingebrigtsen Newsgroups: gmane.emacs.devel 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 Message-ID: <87y2kr1a1l.fsf@gnus.org> References: <20200930153650.16819.40412@vcs0.savannah.gnu.org> <20200930153652.925A9209AC@vcs0.savannah.gnu.org> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="20603"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux) Cc: emacs-devel@gnu.org To: Stefan Monnier Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Wed Sep 30 19:09:11 2020 Return-path: Envelope-to: ged-emacs-devel@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1kNfbK-0005Cd-1A for ged-emacs-devel@m.gmane-mx.org; Wed, 30 Sep 2020 19:09:10 +0200 Original-Received: from localhost ([::1]:52516 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kNfbJ-0001H9-2E for ged-emacs-devel@m.gmane-mx.org; Wed, 30 Sep 2020 13:09:09 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:40548) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kNfLj-0000wM-1h for emacs-devel@gnu.org; Wed, 30 Sep 2020 12:53:03 -0400 Original-Received: from quimby.gnus.org ([2a01:4f9:2b:f0f::2]:37030) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kNfLh-0007MM-64 for emacs-devel@gnu.org; Wed, 30 Sep 2020 12:53:02 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnus.org; s=20200322; h=Content-Type:MIME-Version:Message-ID:In-Reply-To:Date: References:Subject:Cc:To:From:Sender:Reply-To:Content-Transfer-Encoding: Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender: Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help:List-Unsubscribe: List-Subscribe:List-Post:List-Owner:List-Archive; bh=fMFNF4AxAejwO7cxMlZT+FXS6rvWtXffdhVSRx2dRZ4=; b=JvLZ1xKyKlyns9mC9h9uzW8CIA MxGoYOEmg3iqZfCZaciItHkJa3OnquNQAiDhSlXC+vbrKm2TPHP5fF+4k0FTH97XWT/qCC6vXyiGW 4hqw2CnEpoZAdJJxX3Y4cZnTKgSikdz3EgIGonfmiUf5BydG01juyZhIPdqmnJIYCH4w=; Original-Received: from cm-84.212.202.86.getinternet.no ([84.212.202.86] helo=xo) by quimby with esmtpsa (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1kNfLb-0003fE-GG; Wed, 30 Sep 2020 18:52:58 +0200 Face: iVBORw0KGgoAAAANSUhEUgAAADAAAAAwBAMAAAClLOS0AAAABGdBTUEAALGPC/xhBQAAACBj SFJNAAB6JgAAgIQAAPoAAACA6AAAdTAAAOpgAAA6mAAAF3CculE8AAAAElBMVEX8+/rb08+HeXeu oZ9PQ0L///99ddW+AAAAAWJLR0QF+G/pxwAAAAd0SU1FB+QJHhAyOsuNn1oAAAGySURBVDjLdZSJ kaQwDEXtJQFsbQAgOYC2PgHMuMk/ppHoBXPMiiqq2g9dX3KHELKMIQTy18WGxkJQ5juJ+k6JtKzv u0sYXyFgkfQA0YL8wRSewDMJ/w8s8wOkFFNkXa24a2UDYoXq6iYXkOwBb2Bt9QQsS8THw+x1A2U7 Nb92CiUHcJs64DHiOO8uEXhF7qC7AFV7JG6HCIVP35fGy97n31OYVYrq9Bt4L4JP/wnrxVjm7E0S M/fMraxNNE8bKK3r4UxVvzxS8S0Z/GSPBdj8h/oZULQyd1DJmqf6T81iAm65ZBAHJocfU7G062hj LJUUq4GtZoJUKmUKMTIM2PbZaiZCHWOWZZ1Mz5oxZ94aKQKwqHXzysCYXNIvbzxxTclKtl0BkEbU wt9WVdJj/rmqEUIzoIy+F3m2n+RgCnwsGVmcCmYCN+2rEqLAP29swr31tJKDRU+C4mLPjw3PMMnA kDsYqs2PhJ6bX7NpW8+59yuR7calc+59xUy7SI8UrsMrxHxLkdyigWsKragmbB7DcOnC+gO5izlc I+03k/D489jyqPCzCRumb2gv5hB4u7WfQD+3RWwBHfiVugAAACV0RVh0ZGF0ZTpjcmVhdGUAMjAy MC0wOS0zMFQxNjo1MDo1OCswMDowMLb3ckEAAAAldEVYdGRhdGU6bW9kaWZ5ADIwMjAtMDktMzBU MTY6NTA6NTgrMDA6MDDHqsr9AAAAAElFTkSuQmCC X-Now-Playing: Thee Oh Sees's _Putrifiers II_: "Putrifiers II" In-Reply-To: (Stefan Monnier's message of "Wed, 30 Sep 2020 12:46:22 -0400") Received-SPF: pass client-ip=2a01:4f9:2b:f0f::2; envelope-from=larsi@gnus.org; helo=quimby.gnus.org X-detected-operating-system: by eggs.gnu.org: No matching host in p0f cache. That's all we know. X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Original-Sender: "Emacs-devel" Xref: news.gmane.io gmane.emacs.devel:256773 Archived-At: Stefan Monnier 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