From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Drew Adams Newsgroups: gmane.emacs.bugs Subject: bug#29050: 26.0; Change in when `window-configuration-change-hook' is run Date: Sat, 28 Oct 2017 18:25:35 -0700 (PDT) Message-ID: <37edcb5c-29d2-4125-a86d-a360db6fcd5f@default> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: quoted-printable X-Trace: blaine.gmane.org 1509240434 520 195.159.176.226 (29 Oct 2017 01:27:14 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Sun, 29 Oct 2017 01:27:14 +0000 (UTC) To: 29050@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Sun Oct 29 02:27:10 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 1e8cNU-0007a0-Bz for geb-bug-gnu-emacs@m.gmane.org; Sun, 29 Oct 2017 02:27:04 +0100 Original-Received: from localhost ([::1]:34460 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1e8cNb-0002uD-Pf for geb-bug-gnu-emacs@m.gmane.org; Sat, 28 Oct 2017 21:27:11 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:52993) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1e8cNV-0002tz-5g for bug-gnu-emacs@gnu.org; Sat, 28 Oct 2017 21:27:06 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1e8cNS-0006OP-38 for bug-gnu-emacs@gnu.org; Sat, 28 Oct 2017 21:27:05 -0400 Original-Received: from debbugs.gnu.org ([208.118.235.43]:59147) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1e8cNR-0006OD-Ue for bug-gnu-emacs@gnu.org; Sat, 28 Oct 2017 21:27:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1e8cNR-0004y6-Nr for bug-gnu-emacs@gnu.org; Sat, 28 Oct 2017 21:27:01 -0400 X-Loop: help-debbugs@gnu.org 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: X-Debbugs-Original-To: bug-gnu-emacs@gnu.org Original-Received: via spool by submit@debbugs.gnu.org id=B.150924038019036 (code B ref -1); Sun, 29 Oct 2017 01:27:01 +0000 Original-Received: (at submit) by debbugs.gnu.org; 29 Oct 2017 01:26:20 +0000 Original-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 Original-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 Original-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 Original-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 Original-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 Original-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 Original-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 Original-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 Original-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 Original-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 X-Priority: 3 X-Mailer: Oracle Beehive Extensions for Outlook 2.0.1.9.1 (1003210) [OL 16.0.4600.0 (x86)] 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-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:139139 Archived-At: 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''