From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Stefan Monnier Newsgroups: gmane.emacs.devel Subject: Re: `selected-frame` behavior have changed in emacs-28 Date: Sun, 25 Apr 2021 11:54:03 -0400 Message-ID: References: <87sg3eilen.fsf@posteo.net> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="34987"; 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: Thierry Volpiatto Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Sun Apr 25 17:56:14 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 1lah7G-0008uw-00 for ged-emacs-devel@m.gmane-mx.org; Sun, 25 Apr 2021 17:56:14 +0200 Original-Received: from localhost ([::1]:44974 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lah7F-0007EM-2j for ged-emacs-devel@m.gmane-mx.org; Sun, 25 Apr 2021 11:56:13 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:45482) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lah5R-00065S-5j for emacs-devel@gnu.org; Sun, 25 Apr 2021 11:54:22 -0400 Original-Received: from mailscanner.iro.umontreal.ca ([132.204.25.50]:15048) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lah5L-0001Xi-Tp for emacs-devel@gnu.org; Sun, 25 Apr 2021 11:54:20 -0400 Original-Received: from pmg1.iro.umontreal.ca (localhost.localdomain [127.0.0.1]) by pmg1.iro.umontreal.ca (Proxmox) with ESMTP id 3D5D9100222; Sun, 25 Apr 2021 11:54:12 -0400 (EDT) Original-Received: from mail01.iro.umontreal.ca (unknown [172.31.2.1]) by pmg1.iro.umontreal.ca (Proxmox) with ESMTP id AC8CC1001FE; Sun, 25 Apr 2021 11:54:10 -0400 (EDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=iro.umontreal.ca; s=mail; t=1619366050; bh=BsNCwcpD0AoCW17Jbg90ufcJqu5e4RkGWZt4G39r4Kg=; h=From:To:Cc:Subject:References:Date:In-Reply-To:From; b=XIOrEESbCgipuI0KPeTq7AGOs6YSRic8d7tqPxCKclUFZ+v4X5Z6w6u+LBfvhgCTD AzcPil/z1Gh9mzR6a2uqLL9vU1dC5bu6F6qkkGea9tcm057/4L/cjUxjUCMO/2dy0m KL+i/B+VLNuoRlelRdb6s+BiVburDjX+FInLLXn4z7tr2FcFd0fcEEVTCflGuDqiMR q8C5Q3h+3PQcyBx87+otVdbjgrDBKYITaFCBZHKuEVR3WCUuXngISOnaKsocwbB+59 w3/vsT2E7XE8KQ0EMp7G1JSuvjaLF56v//VGu3WNiW3xyiHruB3g1rbIf8D3EvQRvN Xj0bZsSTrP3yg== Original-Received: from alfajor (104-222-126-84.cpe.teksavvy.com [104.222.126.84]) by mail01.iro.umontreal.ca (Postfix) with ESMTPSA id 3AAEE120303; Sun, 25 Apr 2021 11:54:10 -0400 (EDT) In-Reply-To: <87sg3eilen.fsf@posteo.net> (Thierry Volpiatto's message of "Sun, 25 Apr 2021 12:33:48 +0000") Received-SPF: pass client-ip=132.204.25.50; envelope-from=monnier@iro.umontreal.ca; helo=mailscanner.iro.umontreal.ca X-Spam_score_int: -42 X-Spam_score: -4.3 X-Spam_bar: ---- X-Spam_report: (-4.3 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, RCVD_IN_DNSWL_MED=-2.3, 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:268390 Archived-At: 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". > 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 suggest you `M-x report-emacs-bug` about it (and skip the "(with-current-buffer helm-buffer" part which just muddies the water). Stefan