From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Drew Adams Newsgroups: gmane.emacs.bugs Subject: bug#15133: 24.3.50; REGRESSION: `after-make-frame-functions' now run with wrong frame selected Date: Mon, 19 Aug 2013 11:25:37 -0700 (PDT) Message-ID: <391c84ad-a338-41df-96ed-287508f86d66@default> References: <6bb534ef-d80b-4c35-9538-2ee383d95610@default> <52124432.9010707@gmx.at> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: quoted-printable X-Trace: ger.gmane.org 1376936787 3924 80.91.229.3 (19 Aug 2013 18:26:27 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Mon, 19 Aug 2013 18:26:27 +0000 (UTC) Cc: 15133@debbugs.gnu.org To: martin rudalics Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Mon Aug 19 20:26:28 2013 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1VBU9o-0006jH-8v for geb-bug-gnu-emacs@m.gmane.org; Mon, 19 Aug 2013 20:26:24 +0200 Original-Received: from localhost ([::1]:44418 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VBU9n-0007Tm-Sz for geb-bug-gnu-emacs@m.gmane.org; Mon, 19 Aug 2013 14:26:23 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:34118) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VBU9c-0007ST-9c for bug-gnu-emacs@gnu.org; Mon, 19 Aug 2013 14:26:20 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1VBU9T-00006c-AT for bug-gnu-emacs@gnu.org; Mon, 19 Aug 2013 14:26:12 -0400 Original-Received: from debbugs.gnu.org ([140.186.70.43]:46516) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VBU9T-00006X-7l for bug-gnu-emacs@gnu.org; Mon, 19 Aug 2013 14:26:03 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.80) (envelope-from ) id 1VBU9S-0004h7-B1 for bug-gnu-emacs@gnu.org; Mon, 19 Aug 2013 14:26:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Drew Adams Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Mon, 19 Aug 2013 18:26:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 15133 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 15133-submit@debbugs.gnu.org id=B15133.137693674518019 (code B ref 15133); Mon, 19 Aug 2013 18:26:02 +0000 Original-Received: (at 15133) by debbugs.gnu.org; 19 Aug 2013 18:25:45 +0000 Original-Received: from localhost ([127.0.0.1]:40832 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1VBU99-0004gY-OV for submit@debbugs.gnu.org; Mon, 19 Aug 2013 14:25:44 -0400 Original-Received: from userp1040.oracle.com ([156.151.31.81]:17754) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1VBU95-0004gJ-0a for 15133@debbugs.gnu.org; Mon, 19 Aug 2013 14:25:41 -0400 Original-Received: from ucsinet22.oracle.com (ucsinet22.oracle.com [156.151.31.94]) by userp1040.oracle.com (Sentrion-MTA-4.3.1/Sentrion-MTA-4.3.1) with ESMTP id r7JIPbsd027838 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Mon, 19 Aug 2013 18:25:37 GMT Original-Received: from userz7021.oracle.com (userz7021.oracle.com [156.151.31.85]) by ucsinet22.oracle.com (8.14.4+Sun/8.14.4) with ESMTP id r7JIPZ3s009002 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Mon, 19 Aug 2013 18:25:36 GMT Original-Received: from abhmt101.oracle.com (abhmt101.oracle.com [141.146.116.53]) by userz7021.oracle.com (8.14.4+Sun/8.14.4) with ESMTP id r7JIPYBT000250; Mon, 19 Aug 2013 18:25:34 GMT In-Reply-To: <52124432.9010707@gmx.at> X-Priority: 3 X-Mailer: Oracle Beehive Extensions for Outlook 2.0.1.8 (707110) [OL 12.0.6680.5000 (x86)] X-Source-IP: ucsinet22.oracle.com [156.151.31.94] X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x X-Received-From: 140.186.70.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:77520 Archived-At: > > This regression was introduced after a build from 2013-08-08. It > > appears in the build cited below, from 2013-08-18. It makes Emacs > > unusable (by me). > > > > I have this as `after-make-frame-functions': `(fit-frame)', in order t= o > > fit the new frame to its displayed buffer.' > > > > When `after-make-frame-functions' is run in `make-frame' now, the > > original frame, not the newly created frame, is selected when it runs. > > So `fit-frame' is called with the original (wrong) frame selected. >=20 > If it can be fixed by commenting in the second line of the following > comment in `pop-to-buffer' >=20 > ;; This should be done by `select-window' below. > ;; (set-buffer buffer) >=20 > we have the following problem: Your `fit-frame' will work when using > `pop-to-buffer' but not when using `display-buffer'. So maybe it's > better to do the funcall in `display-buffer-pop-up-frame' as >=20 > =09 (with-current-buffer buffer > =09=09 (setq frame (funcall fun))) >=20 > Please try them both, tell me whether they work for you, and, if so, > which one you prefer. Sorry, I don't understand. What "both" would you like me to try? This needs to work as it did before the regression - both `pop-to-buffer' and `display-buffer'. But first, I don't understand either why there should be any difference. Why shouldn't functions on `after-make-frame-functions' always be passed the new frame as argument, as has been the case in the past? There is a `before-make-frame-functions' hook for passing the originally selected frame. Perhaps you are thinking that this is about _selecting_ the new frame? (I mistakenly mentioned "is selected" above, when I meant is passed to the hook functions.) I can understand that `pop-to-buffer' and `display-buffer' might act differently wrt selecting the buffer's frame. But I do not understand why suddenly the functions on hook `after-make-frame-functions' should be passed the original frame as arg instead of the new frame. How else can someone invoke a function on the new frame as part of the process of frame creation?