From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Thierry Volpiatto Newsgroups: gmane.emacs.devel Subject: Re: `selected-frame` behavior have changed in emacs-28 Date: Sun, 25 Apr 2021 18:28:43 +0000 Message-ID: <87wnsqz025.fsf@posteo.net> References: <87sg3eilen.fsf@posteo.net> Mime-Version: 1.0 Content-Type: multipart/signed; boundary="=-=-="; micalg=pgp-sha512; protocol="application/pgp-signature" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="670"; mail-complaints-to="usenet@ciao.gmane.io" Cc: emacs-devel@gnu.org To: Stefan Monnier Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Sun Apr 25 20:36:02 2021 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 1lajbu-000AeF-M8 for ged-emacs-devel@m.gmane-mx.org; Sun, 25 Apr 2021 20:36:02 +0200 Original-Received: from localhost ([::1]:44910 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lajbt-0004Qi-Ot for ged-emacs-devel@m.gmane-mx.org; Sun, 25 Apr 2021 14:36:01 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:51502) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lajZZ-0003bl-UF for emacs-devel@gnu.org; Sun, 25 Apr 2021 14:33:38 -0400 Original-Received: from mout01.posteo.de ([185.67.36.65]:33675) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lajZU-0008VY-BO for emacs-devel@gnu.org; Sun, 25 Apr 2021 14:33:36 -0400 Original-Received: from submission (posteo.de [89.146.220.130]) by mout01.posteo.de (Postfix) with ESMTPS id 13998240032 for ; Sun, 25 Apr 2021 20:33:28 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=posteo.net; s=2017; t=1619375609; bh=gplKj+D9x+wMW1j1J1cuqUOZQVKKhQs1OiqVZf/bSag=; h=From:To:Cc:Subject:Date:From; b=NWkliGFxOsahyphZKcWHTxCVbk2gVG+0k7Agbz/FbvNO1BSL0gQvuaNr6C2E4zFIi JRx3SMRs725VX6O6vKa8HmNXlp6rpsfgq/VsiMYF+dJTVZz4QzoStAmyq5U3VfxZoY i32ZqxLVp5BkTRCdgDnuo+OVUQ/Jr3Pg7iWWmziowdRtBBbxP6rBRz8cMZ/5jGDbNQ 3Wifwz15z/VllpL7Bktfx2gi0mkNj+AOZJjwYrXRNlQofbcsqcGhl3dRNa8XpBKwX6 eu2OiQNMwN0I6SeI3ozyWj3m8YmuiBfR5xjGdCZqUYmT2M6yVyokhnlq2xlJnf5Ta8 tnH8zb3luDQxA== Original-Received: from customer (localhost [127.0.0.1]) by submission (posteo.de) with ESMTPSA id 4FSxVX5tJyz9rxl; Sun, 25 Apr 2021 20:33:24 +0200 (CEST) In-reply-to: Received-SPF: pass client-ip=185.67.36.65; envelope-from=thievol@posteo.net; helo=mout01.posteo.de X-Spam_score_int: -27 X-Spam_score: -2.8 X-Spam_bar: -- X-Spam_report: (-2.8 / 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, RCVD_IN_DNSWL_LOW=-0.7, RCVD_IN_MSPIKE_H3=-0.01, RCVD_IN_MSPIKE_WL=-0.01, 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:268407 Archived-At: --=-=-= Content-Type: text/plain Content-Transfer-Encoding: quoted-printable Stefan Monnier writes: > Hi Thierry, > > Thierry Volpiatto [2021-04-25 12:33:48] wrote: >> Up to emacs-27.2 I was using this code: >> >> (with-current-buffer helm-buffer >> (let ((frame (selected-frame))) >> [...])) >> >> selected-frame was returning the frame where helm-buffer was displayed. > > Note that `with-current-buffer` never affects the selected frame (nor > the selected window), so the fact that `selected-frame` returned the > one that displayed `helm-buffer` had nothing to do with your > "(with-current-buffer helm-buffer". Thanks it is what i understood but I was unsure. >> In emacs-28, it have the same behavior when helm starts from a normal >> buffer, but if I call helm from a minibuffer e.g. from M-: >> selected-frame is returning the wrong frame whereas in emacs-27, the >> frame handling helm-buffer is returned. >> I expect here having the same behavior in emacs-27 and emacs-28. >> Does something have changed in selected-frame? > > My crystal ball tells me this change is linked to Alan's changes to the > handling of minibuffers. I had the same idea, but I have the impression that the changes to exit-minibuffer try to fix this behavior change, if it is the case perhaps it would be better to fix this at root? > I suggest you `M-x report-emacs-bug` about it Ok will do. > (and skip the "(with-current-buffer helm-buffer" part which just > muddies the water). Yes I am trying to find a suitable fix actually. Thanks. =2D-=20 Thierry --=-=-= Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQHHBAEBCgAxFiEEI9twfRN7r3nig/xwDsVtFB0W75MFAmCFtfMTHHRoaWV2b2xA cG9zdGVvLm5ldAAKCRAOxW0UHRbvk44yC/9AxxpzLmz7zHTfIs4CYqSfWugqs9h3 O8WZ/234m9LzRbVuoxr/CgCJbq31+vooaT1CC2XKcPseFJarZ2D7he092Cnc2cEO 5xl7Cxp0kkHRwWFZ2tC0QxG7Ji5FyPytV/ZX/6iGn8KtMZsHjhtMSLIwBEEL9LvM 4qigL2ORpGNx3BXFsAeGkVAy6j6AhyABNGnOujeFEDOGAEVlxfXsGKxL5NjDBiMv 6AOLUM2QeheU7a5zVek8XZjyWyehiiphktmYUqLEiNR4p+B9MSKPzpRm8xR1JM8P cX9cw1vfwub9ZFD1gi10qeJ3KyGlcyhUpjZ3yfj/xsq3+u/8aCU2Wce9EWFcGBU1 C5co5EBq3IoOB8GwW096gQSBxWWDNMuYBYgAm6Tk2W3c1TeQY9pA+n1PzS7yT+CW xYE+JXrLER2AxpxxYUNjUk0F/fga7klKQtwAxBuo/+8apje3gzXC9mPHgc6weCHV PhpwMg7nZfgnB2d/s1gBa/cN9HwddjQCvkA= =IGFK -----END PGP SIGNATURE----- --=-=-=--