From unknown Sat Aug 16 16:13:29 2025 X-Loop: help-debbugs@gnu.org Subject: bug#29050: 26.0; Change in when `window-configuration-change-hook' is run Resent-From: Drew Adams Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sun, 29 Oct 2017 01:27:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 29050 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: 29050@debbugs.gnu.org X-Debbugs-Original-To: bug-gnu-emacs@gnu.org Received: via spool by submit@debbugs.gnu.org id=B.150924038019036 (code B ref -1); Sun, 29 Oct 2017 01:27:01 +0000 Received: (at submit) by debbugs.gnu.org; 29 Oct 2017 01:26:20 +0000 Received: from localhost ([127.0.0.1]:39595 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1e8cMm-0004wy-8c for submit@debbugs.gnu.org; Sat, 28 Oct 2017 21:26:20 -0400 Received: from eggs.gnu.org ([208.118.235.92]:33667) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1e8cMk-0004wk-VP for submit@debbugs.gnu.org; Sat, 28 Oct 2017 21:26:19 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1e8cMb-0005pf-Kd for submit@debbugs.gnu.org; Sat, 28 Oct 2017 21:26:13 -0400 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=0.8 required=5.0 tests=BAYES_50 autolearn=disabled version=3.3.2 Received: from lists.gnu.org ([2001:4830:134:3::11]:56615) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1e8cMb-0005pV-Gz for submit@debbugs.gnu.org; Sat, 28 Oct 2017 21:26:09 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:52859) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1e8cMa-0002fo-8d for bug-gnu-emacs@gnu.org; Sat, 28 Oct 2017 21:26:09 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1e8cMX-0005mR-2n for bug-gnu-emacs@gnu.org; Sat, 28 Oct 2017 21:26:08 -0400 Received: from userp1040.oracle.com ([156.151.31.81]:44608) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1e8cMW-0005lo-Qc for bug-gnu-emacs@gnu.org; Sat, 28 Oct 2017 21:26:05 -0400 Received: from userv0022.oracle.com (userv0022.oracle.com [156.151.31.74]) by userp1040.oracle.com (Sentrion-MTA-4.3.2/Sentrion-MTA-4.3.2) with ESMTP id v9T1Q3BU022098 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK) for ; Sun, 29 Oct 2017 01:26:03 GMT Received: from aserv0121.oracle.com (aserv0121.oracle.com [141.146.126.235]) by userv0022.oracle.com (8.14.4/8.14.4) with ESMTP id v9T1Q2ZF028620 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK) for ; Sun, 29 Oct 2017 01:26:02 GMT Received: from abhmp0002.oracle.com (abhmp0002.oracle.com [141.146.116.8]) by aserv0121.oracle.com (8.14.4/8.13.8) with ESMTP id v9T1Q132008467 for ; Sun, 29 Oct 2017 01:26:02 GMT MIME-Version: 1.0 Message-ID: <37edcb5c-29d2-4125-a86d-a360db6fcd5f@default> Date: Sat, 28 Oct 2017 18:25:35 -0700 (PDT) From: Drew Adams X-Priority: 3 X-Mailer: Oracle Beehive Extensions for Outlook 2.0.1.9.1 (1003210) [OL 16.0.4600.0 (x86)] Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: quoted-printable X-Source-IP: userv0022.oracle.com [156.151.31.74] X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.4.x-2.6.x [generic] [fuzzy] X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x X-Received-From: 2001:4830:134:3::11 X-Spam-Score: -5.0 (-----) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -5.0 (-----) This change does not seem right (from NEWS): *** Resizing a frame no longer runs 'window-configuration-change-hook'. 'window-size-change-functions' should be used instead. Previously you could have a hook on 'window-configuration-change-hook' that would take effect for frame resizings. Now you cannot. Perhaps someone thought that just telling users to use 'window-size-change-functions' instead would suffice. No. That hook (which already existed, and which was fine as it was) is for ABNORMAL hooks. This incompatible change means that you cannot use the same, NORMAL hook for both'window-configuration-change-hook' and 'window-size-change-functions'. So if you want the behavior you had before, i.e., you want a function to be invoked for both kinds of changes, you are out of luck. You need to have two different functions, or you need to at least change the function to accept a frame argument, even if it is not used. Why? Example: (define-minor-mode pretty-control-l-mode "Toggle pretty display of Control-l (`^L') characters. With ARG, turn pretty display of `^L' on if and only if ARG is positive." :init-value nil :global t :group 'Pretty-Control-L (if pretty-control-l-mode (add-hook 'window-configuration-change-hook 'refresh-pretty-control-l= ) (remove-hook 'window-configuration-change-hook 'refresh-pretty-control-= l)) (walk-windows (lambda (window) (let ((display-table (or (window-display-table window) (make-display-table)))) (aset display-table ?\014 (and pretty-control-l-mode (pp^L-^L-display-table-entry window))= ) (set-window-display-table window display-table))) 'no-minibuf 'visible)) The hook function no longer kicks in for "frame resizing", which also means that it no longer kicks in when a frame is created. So now the code needs to add the hook function to both hooks (a normal hook and an abnormal hook). And the hook function, `refresh-pretty-control-l', now needs to be changed to accept a phantom FRAME arg: (defun refresh-pretty-control-l (&optional _) "Reinitialize `pretty-control-l-mode', if on, to update the display." (interactive) (when pretty-control-l-mode (pretty-control-l-mode t))) Why this incompatible change? In GNU Emacs 26.0.90 (build 3, x86_64-w64-mingw32) of 2017-10-13 Repository revision: 906224eba147bdfc0514090064e8e8f53160f1d4 Windowing system distributor `Microsoft Corp.', version 6.1.7601 Configured using: `configure --without-dbus --host=3Dx86_64-w64-mingw32 --without-compress-install 'CFLAGS=3D-O2 -static -g3'' From unknown Sat Aug 16 16:13:29 2025 X-Loop: help-debbugs@gnu.org Subject: bug#29050: 26.0; Change in when `window-configuration-change-hook' is run Resent-From: martin rudalics Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sun, 29 Oct 2017 11:20:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 29050 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Drew Adams , 29050@debbugs.gnu.org Received: via spool by 29050-submit@debbugs.gnu.org id=B29050.150927596021795 (code B ref 29050); Sun, 29 Oct 2017 11:20:02 +0000 Received: (at 29050) by debbugs.gnu.org; 29 Oct 2017 11:19:20 +0000 Received: from localhost ([127.0.0.1]:39805 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1e8lcd-0005fT-Mw for submit@debbugs.gnu.org; Sun, 29 Oct 2017 07:19:19 -0400 Received: from mout.gmx.net ([212.227.15.18]:63975) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1e8lcb-0005fG-Mk for 29050@debbugs.gnu.org; Sun, 29 Oct 2017 07:19:18 -0400 Received: from [192.168.1.101] ([46.125.250.68]) by mail.gmx.com (mrgmx001 [212.227.17.190]) with ESMTPSA (Nemesis) id 0LoVvG-1dXl6v2nj0-00gbfv; Sun, 29 Oct 2017 12:19:07 +0100 Message-ID: <59F5B927.5020907@gmx.at> Date: Sun, 29 Oct 2017 12:19:03 +0100 From: martin rudalics MIME-Version: 1.0 References: <37edcb5c-29d2-4125-a86d-a360db6fcd5f@default> In-Reply-To: <37edcb5c-29d2-4125-a86d-a360db6fcd5f@default> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: quoted-printable X-Provags-ID: V03:K0:D2LbZ9RS/H01p45dzkkKM9fZzCdl0wmVePb5hE65ZJEdr8nQ3hc rozsuNLrMU9+YWerldyOIydhgcM/aheLVUKO93FF1oycYNGH4slk28+RVGLD1S8jN7arI3G 4dMmd1DCSllEEMeLR7ZWlVoAp/Bv08pfw3xYH8u3/wB3sGEAvwAV8ildk2H8IbkuFn7d7kr BY4U8GBx1MtqaYd1LNTTg== X-UI-Out-Filterresults: notjunk:1;V01:K0:HtCNE1v3VZ8=:0a/L4Bp06xk9HhHd0qyGn2 apZ1eXUaCOK1YVel5HY/o6OWVQmlDUrdeBg1Ngoy0Q87cNI/vKFzD01TDdD2PnNSd31M9uZhX rUZXzBlmcCb4XPjSAhavdSKzHI+ecPTMWfOX5VQe3kBpcnmpys5J63+1SI21u52OU85zO/W/l T9NbX/R59mfZIlUG/ragCnN+gKpjALJkO9Y/6VM4F60qCCHsuQfuFBb9mTtre1i0+d03E2lu6 MKJF3Q/HnaPyuITJ2eX9LP6YqvGMhU7fA9cSbf0XR4YWo6t8b/MikHpGIvm3nHWnEiCZhsmpc OKVmPYZzcV12B8Fl2fZvzoXxWi/rPkuLZsX5ymcB+6IEWl5wRyDVTNoRjpYEoLtOygJOHh1j8 65GcZXuPHN3HINyNVPcbaGeVbFwE6l36hLVzAxLqwbrAfYlVHzWjpiNRo/IAqIHLAx9as4Kzx UDOEPtaCrhA9d69O02nxwx1kUp1GpjGW1vv0DYF+tcw3O6ucuBJIuCaAt7ST0uVI7K9MW6WNC 9RrsbsJNsSJOLbVoy6KAWJ35LxVWiPeUayDvPQCuJh4aU4c6ye03RodXnkrJx9nDsMMxogww+ 0U6z4vMFBXT8Jl4/wSQgIBLGsViaUnaHrSsRrh1pcboyj6RSjcwcvcvySpgbPtmL9pZRJW1v4 Tx9/Ewto5RF0X+x2qGtroj6pALry0tmWiuna9L1PTpO55Z4tbfjRYwS7ELl5s4cQdJeTp2eo/ d/R4FV3JIpN4ndRbHOEMYS7kpX15UFKpkVlEfDRFmDf/8LkUQYdRTvpWUgIEehE+RerINb2eP EIpFoPCSoOfDWZthAnoelnu+socRrsZ5E7lD8yrRrHheMnAdijOjPCwL1EdA28PB8GT1IFs X-Spam-Score: -1.8 (-) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.8 (-) > *** Resizing a frame no longer runs 'window-configuration-change-hoo= k'. > 'window-size-change-functions' should be used instead. > > Previously you could have a hook on 'window-configuration-change-hook'= > that would take effect for frame resizings. Now you cannot. > > Perhaps someone thought that just telling users to use > 'window-size-change-functions' instead would suffice. No. That hook > (which already existed, and which was fine as it was) is for ABNORMAL > hooks. This incompatible change means that you cannot use the same, > NORMAL hook for both'window-configuration-change-hook' and > 'window-size-change-functions'. > > So if you want the behavior you had before, i.e., you want a function = to > be invoked for both kinds of changes, you are out of luck. You need t= o > have two different functions, or you need to at least change the > function to accept a frame argument, even if it is not used. Why? In earlier Emacsen, changing the frame size was allowed to delete all windows but the selected one. Nowadays, changing the frame size does not delete windows any more and so does no more change the window configuration proper but only the sizes of individual windows. 'window-configuration-change-hook' is a quite expensive hook which is run for way too many functions in the windows area. It's expensive because it's run for every single invocation of these functions and often even if nothing had changed at all. I plan to run it exclusively for the following cases - window deletion and creation and displaying a different buffer in a window - which are all real changes. Any window resizing is covered by =E2=80=98window-size-change-functions=E2=80=99 whi= ch is now run (almost) only when the size of a window really changed. martin From unknown Sat Aug 16 16:13:29 2025 X-Loop: help-debbugs@gnu.org Subject: bug#29050: 26.0; Change in when `window-configuration-change-hook' is run Resent-From: Drew Adams Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Mon, 30 Oct 2017 00:12:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 29050 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: martin rudalics , 29050@debbugs.gnu.org Received: via spool by 29050-submit@debbugs.gnu.org id=B29050.150932226517484 (code B ref 29050); Mon, 30 Oct 2017 00:12:02 +0000 Received: (at 29050) by debbugs.gnu.org; 30 Oct 2017 00:11:05 +0000 Received: from localhost ([127.0.0.1]:41103 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1e8xfV-0004Xw-Le for submit@debbugs.gnu.org; Sun, 29 Oct 2017 20:11:05 -0400 Received: from userp1040.oracle.com ([156.151.31.81]:31305) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1e8xfU-0004XR-BJ for 29050@debbugs.gnu.org; Sun, 29 Oct 2017 20:11:04 -0400 Received: from userv0022.oracle.com (userv0022.oracle.com [156.151.31.74]) by userp1040.oracle.com (Sentrion-MTA-4.3.2/Sentrion-MTA-4.3.2) with ESMTP id v9U0AvUO017058 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Mon, 30 Oct 2017 00:10:57 GMT Received: from aserv0121.oracle.com (aserv0121.oracle.com [141.146.126.235]) by userv0022.oracle.com (8.14.4/8.14.4) with ESMTP id v9U0AuM5013683 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Mon, 30 Oct 2017 00:10:57 GMT Received: from abhmp0019.oracle.com (abhmp0019.oracle.com [141.146.116.25]) by aserv0121.oracle.com (8.14.4/8.13.8) with ESMTP id v9U0Au4V007744; Mon, 30 Oct 2017 00:10:56 GMT MIME-Version: 1.0 Message-ID: <7f86795f-e5b7-4d9c-a499-df2951ece50c@default> Date: Sun, 29 Oct 2017 17:10:55 -0700 (PDT) From: Drew Adams References: <37edcb5c-29d2-4125-a86d-a360db6fcd5f@default> <59F5B927.5020907@gmx.at> In-Reply-To: <59F5B927.5020907@gmx.at> X-Priority: 3 X-Mailer: Oracle Beehive Extensions for Outlook 2.0.1.9.1 (1003210) [OL 16.0.4600.0 (x86)] Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Source-IP: userv0022.oracle.com [156.151.31.74] X-Spam-Score: -5.1 (-----) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -5.1 (-----) > In earlier Emacsen, changing the frame size was allowed to delete all > windows but the selected one. Nowadays, changing the frame size does > not delete windows any more and so does no more change the window > configuration proper but only the sizes of individual windows. >=20 > 'window-configuration-change-hook' is a quite expensive hook which is > run for way too many functions in the windows area. It's expensive > because it's run for every single invocation of these functions and > often even if nothing had changed at all. I plan to run it exclusively > for the following cases - window deletion and creation and displaying a > different buffer in a window - which are all real changes. Any window > resizing is covered by =E2=80=98window-size-change-functions=E2=80=99 whi= ch is now run > (almost) only when the size of a window really changed. OK. From unknown Sat Aug 16 16:13:29 2025 MIME-Version: 1.0 X-Mailer: MIME-tools 5.505 (Entity 5.505) X-Loop: help-debbugs@gnu.org From: help-debbugs@gnu.org (GNU bug Tracking System) To: Drew Adams Subject: bug#29050: closed (Re: bug#29050: 26.0; Change in when `window-configuration-change-hook' is run) Message-ID: References: <59F6E1D2.1040302@gmx.at> <37edcb5c-29d2-4125-a86d-a360db6fcd5f@default> X-Gnu-PR-Message: they-closed 29050 X-Gnu-PR-Package: emacs Reply-To: 29050@debbugs.gnu.org Date: Mon, 30 Oct 2017 08:26:02 +0000 Content-Type: multipart/mixed; boundary="----------=_1509351962-12652-1" This is a multi-part message in MIME format... ------------=_1509351962-12652-1 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" Your bug report #29050: 26.0; Change in when `window-configuration-change-hook' is run which was filed against the emacs package, has been closed. The explanation is attached below, along with your original report. If you require more details, please reply to 29050@debbugs.gnu.org. --=20 29050: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=3D29050 GNU Bug Tracking System Contact help-debbugs@gnu.org with problems ------------=_1509351962-12652-1 Content-Type: message/rfc822 Content-Disposition: inline Content-Transfer-Encoding: 7bit Received: (at 29050-done) by debbugs.gnu.org; 30 Oct 2017 08:25:08 +0000 Received: from localhost ([127.0.0.1]:41284 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1e95Nb-0003H1-Dw for submit@debbugs.gnu.org; Mon, 30 Oct 2017 04:25:08 -0400 Received: from mout.gmx.net ([212.227.15.15]:64758) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1e95NZ-0003GN-TX for 29050-done@debbugs.gnu.org; Mon, 30 Oct 2017 04:25:06 -0400 Received: from [192.168.1.100] ([46.125.249.102]) by mail.gmx.com (mrgmx003 [212.227.17.190]) with ESMTPSA (Nemesis) id 0M6Ana-1dFMO22qXS-00yBgo; Mon, 30 Oct 2017 09:24:56 +0100 Message-ID: <59F6E1D2.1040302@gmx.at> Date: Mon, 30 Oct 2017 09:24:50 +0100 From: martin rudalics MIME-Version: 1.0 To: Drew Adams , 29050-done@debbugs.gnu.org Subject: Re: bug#29050: 26.0; Change in when `window-configuration-change-hook' is run References: <37edcb5c-29d2-4125-a86d-a360db6fcd5f@default> <59F5B927.5020907@gmx.at> <7f86795f-e5b7-4d9c-a499-df2951ece50c@default> In-Reply-To: <7f86795f-e5b7-4d9c-a499-df2951ece50c@default> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: quoted-printable X-Provags-ID: V03:K0:xwlmdPljgR6Hsr6+Eym0hWyAf/uE6p+nWQdy6Nt/tYIY4APkReB rCR6WVL9pw6DWY30xMnptQRj4CzRjg7EU00YDKwfKFs84s5+sBNd+2Ybpxf5icZwlZ/GUn6 gnUR1uTc4uGsGJ0dRLPQfultCRZCUD9/Klv2AqLsSVTakRFJiA7kkDbgv9w72Prm38hxacj tWEb1T+kpt2T8XetbuODg== X-UI-Out-Filterresults: notjunk:1;V01:K0:MnLwutlc8qo=:R9g+aAby4vUDYzq5FXMHFq eyb4eAIYtf2R8fPxoUxVizqM+aMdTRNbCmjBVrIdPkS1jhbbqnEyNr1PFkZ1nqK3I6Yibejok /APtL7iacj5pPczANqxHTiryAUrIhJpCes+iSISvSqUUIh1U/YQBBUOpo4paHkFuJYDYWIGBX MAtzES838QgskuviZKICQAlCl11uj/kIiJ2AOzcbxzjtjwaDC+6RZJ587f7ZSFQDeabGyMGz7 qivGRfxFNfvLIy0COp3K8sTQ+RcJpXfjgMxsOihJFYKJ4OPIGWgluas+ZFYK7sJ068IhFz3Mh /oNtKgv/91HdWVn/WyiI9BgOWV/ys7htBjpR0VnKSP/EtcsZbhVV5Wr6/jmKuzRHK9rK0oJRV x1fTUE2+1XDCREWsGfmR4lAjopuj65fLm/wt/hkgDgErSEbww4C+TcPf7qOvJ6+SOyS/LQfPa VSDeGZvd+VQElMUcOuLKQdoIl+eCSqPuAzGoEIpJsO8w8vTjcctqpSCXyqyrikn4nsTcwXkcw SjReWwpygUGqRQjiO7jtxwZBd2tbtVKF9zweZ5eJhyik8CPcD7iH3QeaR8AWvMu62aCMP2H8L zYRC9kpqWz5htYzVrHSn9mosr2ymIiNZ7vrPZ8uPompqR/n0l3vO4Gn7B/NS1vAOn0+gCHXBl 1BwZy6JmFp/9aR4/S8hMSjKkINMJdvnjOUsbKLwvn5O/wvBx/sxd0cTNShVQix5hZsvxNQA9t zMSwCw+iKKPMk+I+vXBC0V7vAidiKVsFNLku/wMgis9dtmoriXi+ZVA4EetjCVOZZ5D4GWiuS NX4PJgQBwhsrDqIA2Szhf9TVGxXoZA+j9Fu8y9OmAbaMUbXaEK46n34Wpw5SYnes+ePiTl1 X-Spam-Score: 0.6 (/) X-Debbugs-Envelope-To: 29050-done X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: 0.6 (/) >> 'window-configuration-change-hook' is a quite expensive hook which is= >> run for way too many functions in the windows area. It's expensive >> because it's run for every single invocation of these functions and >> often even if nothing had changed at all. I plan to run it exclusive= ly >> for the following cases - window deletion and creation and displaying= a >> different buffer in a window - which are all real changes. Any windo= w >> resizing is covered by =E2=80=98window-size-change-functions=E2=80=99= which is now run >> (almost) only when the size of a window really changed. > > OK. Closing this bug then. Thanks, martin ------------=_1509351962-12652-1 Content-Type: message/rfc822 Content-Disposition: inline Content-Transfer-Encoding: 7bit Received: (at submit) by debbugs.gnu.org; 29 Oct 2017 01:26:20 +0000 Received: from localhost ([127.0.0.1]:39595 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1e8cMm-0004wy-8c for submit@debbugs.gnu.org; Sat, 28 Oct 2017 21:26:20 -0400 Received: from eggs.gnu.org ([208.118.235.92]:33667) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1e8cMk-0004wk-VP for submit@debbugs.gnu.org; Sat, 28 Oct 2017 21:26:19 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1e8cMb-0005pf-Kd for submit@debbugs.gnu.org; Sat, 28 Oct 2017 21:26:13 -0400 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=0.8 required=5.0 tests=BAYES_50 autolearn=disabled version=3.3.2 Received: from lists.gnu.org ([2001:4830:134:3::11]:56615) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1e8cMb-0005pV-Gz for submit@debbugs.gnu.org; Sat, 28 Oct 2017 21:26:09 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:52859) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1e8cMa-0002fo-8d for bug-gnu-emacs@gnu.org; Sat, 28 Oct 2017 21:26:09 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1e8cMX-0005mR-2n for bug-gnu-emacs@gnu.org; Sat, 28 Oct 2017 21:26:08 -0400 Received: from userp1040.oracle.com ([156.151.31.81]:44608) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1e8cMW-0005lo-Qc for bug-gnu-emacs@gnu.org; Sat, 28 Oct 2017 21:26:05 -0400 Received: from userv0022.oracle.com (userv0022.oracle.com [156.151.31.74]) by userp1040.oracle.com (Sentrion-MTA-4.3.2/Sentrion-MTA-4.3.2) with ESMTP id v9T1Q3BU022098 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK) for ; Sun, 29 Oct 2017 01:26:03 GMT Received: from aserv0121.oracle.com (aserv0121.oracle.com [141.146.126.235]) by userv0022.oracle.com (8.14.4/8.14.4) with ESMTP id v9T1Q2ZF028620 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK) for ; Sun, 29 Oct 2017 01:26:02 GMT Received: from abhmp0002.oracle.com (abhmp0002.oracle.com [141.146.116.8]) by aserv0121.oracle.com (8.14.4/8.13.8) with ESMTP id v9T1Q132008467 for ; Sun, 29 Oct 2017 01:26:02 GMT MIME-Version: 1.0 Message-ID: <37edcb5c-29d2-4125-a86d-a360db6fcd5f@default> Date: Sat, 28 Oct 2017 18:25:35 -0700 (PDT) From: Drew Adams To: bug-gnu-emacs@gnu.org Subject: 26.0; Change in when `window-configuration-change-hook' is run X-Priority: 3 X-Mailer: Oracle Beehive Extensions for Outlook 2.0.1.9.1 (1003210) [OL 16.0.4600.0 (x86)] Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: quoted-printable X-Source-IP: userv0022.oracle.com [156.151.31.74] X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.4.x-2.6.x [generic] [fuzzy] X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x X-Received-From: 2001:4830:134:3::11 X-Spam-Score: -5.0 (-----) X-Debbugs-Envelope-To: submit X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -5.0 (-----) This change does not seem right (from NEWS): *** Resizing a frame no longer runs 'window-configuration-change-hook'. 'window-size-change-functions' should be used instead. Previously you could have a hook on 'window-configuration-change-hook' that would take effect for frame resizings. Now you cannot. Perhaps someone thought that just telling users to use 'window-size-change-functions' instead would suffice. No. That hook (which already existed, and which was fine as it was) is for ABNORMAL hooks. This incompatible change means that you cannot use the same, NORMAL hook for both'window-configuration-change-hook' and 'window-size-change-functions'. So if you want the behavior you had before, i.e., you want a function to be invoked for both kinds of changes, you are out of luck. You need to have two different functions, or you need to at least change the function to accept a frame argument, even if it is not used. Why? Example: (define-minor-mode pretty-control-l-mode "Toggle pretty display of Control-l (`^L') characters. With ARG, turn pretty display of `^L' on if and only if ARG is positive." :init-value nil :global t :group 'Pretty-Control-L (if pretty-control-l-mode (add-hook 'window-configuration-change-hook 'refresh-pretty-control-l= ) (remove-hook 'window-configuration-change-hook 'refresh-pretty-control-= l)) (walk-windows (lambda (window) (let ((display-table (or (window-display-table window) (make-display-table)))) (aset display-table ?\014 (and pretty-control-l-mode (pp^L-^L-display-table-entry window))= ) (set-window-display-table window display-table))) 'no-minibuf 'visible)) The hook function no longer kicks in for "frame resizing", which also means that it no longer kicks in when a frame is created. So now the code needs to add the hook function to both hooks (a normal hook and an abnormal hook). And the hook function, `refresh-pretty-control-l', now needs to be changed to accept a phantom FRAME arg: (defun refresh-pretty-control-l (&optional _) "Reinitialize `pretty-control-l-mode', if on, to update the display." (interactive) (when pretty-control-l-mode (pretty-control-l-mode t))) Why this incompatible change? In GNU Emacs 26.0.90 (build 3, x86_64-w64-mingw32) of 2017-10-13 Repository revision: 906224eba147bdfc0514090064e8e8f53160f1d4 Windowing system distributor `Microsoft Corp.', version 6.1.7601 Configured using: `configure --without-dbus --host=3Dx86_64-w64-mingw32 --without-compress-install 'CFLAGS=3D-O2 -static -g3'' ------------=_1509351962-12652-1--