From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: martin rudalics Newsgroups: gmane.emacs.bugs Subject: bug#29050: 26.0; Change in when `window-configuration-change-hook' is run Date: Sun, 29 Oct 2017 12:19:03 +0100 Message-ID: <59F5B927.5020907@gmx.at> References: <37edcb5c-29d2-4125-a86d-a360db6fcd5f@default> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: quoted-printable X-Trace: blaine.gmane.org 1509276025 27890 195.159.176.226 (29 Oct 2017 11:20:25 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Sun, 29 Oct 2017 11:20:25 +0000 (UTC) To: Drew Adams , 29050@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Sun Oct 29 12:20:22 2017 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1e8ldW-0006DK-SS for geb-bug-gnu-emacs@m.gmane.org; Sun, 29 Oct 2017 12:20:14 +0100 Original-Received: from localhost ([::1]:35635 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1e8lde-0005Ci-8a for geb-bug-gnu-emacs@m.gmane.org; Sun, 29 Oct 2017 07:20:22 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:56798) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1e8ldQ-00056J-D4 for bug-gnu-emacs@gnu.org; Sun, 29 Oct 2017 07:20:09 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1e8ldL-0004iY-Bp for bug-gnu-emacs@gnu.org; Sun, 29 Oct 2017 07:20:08 -0400 Original-Received: from debbugs.gnu.org ([208.118.235.43]:59358) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1e8ldL-0004iH-85 for bug-gnu-emacs@gnu.org; Sun, 29 Oct 2017 07:20:03 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1e8ldL-0005ga-1l for bug-gnu-emacs@gnu.org; Sun, 29 Oct 2017 07:20:03 -0400 X-Loop: help-debbugs@gnu.org 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: Original-Received: via spool by 29050-submit@debbugs.gnu.org id=B29050.150927596021795 (code B ref 29050); Sun, 29 Oct 2017 11:20:02 +0000 Original-Received: (at 29050) by debbugs.gnu.org; 29 Oct 2017 11:19:20 +0000 Original-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 Original-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 Original-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 In-Reply-To: <37edcb5c-29d2-4125-a86d-a360db6fcd5f@default> 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+RerINb2e X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 208.118.235.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" Xref: news.gmane.org gmane.emacs.bugs:139143 Archived-At: > *** 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