From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: martin rudalics Newsgroups: gmane.emacs.bugs Subject: bug#21333: 25.0.50; window-size-change-functions not called after mini-window resize Date: Tue, 25 Aug 2015 09:25:10 +0200 Message-ID: <55DC1856.7000501@gmx.at> References: <83k2skhhz1.fsf@gnu.org> <55DB5D3E.1000706@gmx.at> <83vbc4fsjd.fsf@gnu.org> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: quoted-printable X-Trace: ger.gmane.org 1440487593 28337 80.91.229.3 (25 Aug 2015 07:26:33 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Tue, 25 Aug 2015 07:26:33 +0000 (UTC) Cc: pipcet@gmail.com, 21333@debbugs.gnu.org To: Eli Zaretskii Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Tue Aug 25 09:26:23 2015 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 1ZU8cU-00042w-Pv for geb-bug-gnu-emacs@m.gmane.org; Tue, 25 Aug 2015 09:26:11 +0200 Original-Received: from localhost ([::1]:58446 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZU8cT-0002WO-RD for geb-bug-gnu-emacs@m.gmane.org; Tue, 25 Aug 2015 03:26:09 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:43937) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZU8cP-0002Su-2b for bug-gnu-emacs@gnu.org; Tue, 25 Aug 2015 03:26:05 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ZU8cM-00043J-E6 for bug-gnu-emacs@gnu.org; Tue, 25 Aug 2015 03:26:05 -0400 Original-Received: from debbugs.gnu.org ([208.118.235.43]:45272) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZU8cM-00043B-B3 for bug-gnu-emacs@gnu.org; Tue, 25 Aug 2015 03:26:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.80) (envelope-from ) id 1ZU8cM-0001GM-2V for bug-gnu-emacs@gnu.org; Tue, 25 Aug 2015 03:26:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: martin rudalics Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 25 Aug 2015 07:26:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 21333 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 21333-submit@debbugs.gnu.org id=B21333.14404875194791 (code B ref 21333); Tue, 25 Aug 2015 07:26:02 +0000 Original-Received: (at 21333) by debbugs.gnu.org; 25 Aug 2015 07:25:19 +0000 Original-Received: from localhost ([127.0.0.1]:37479 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1ZU8be-0001FB-J7 for submit@debbugs.gnu.org; Tue, 25 Aug 2015 03:25:18 -0400 Original-Received: from mout.gmx.net ([212.227.15.19]:49406) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1ZU8bc-0001F2-AQ for 21333@debbugs.gnu.org; Tue, 25 Aug 2015 03:25:17 -0400 Original-Received: from [188.22.234.133] ([188.22.234.133]) by mail.gmx.com (mrgmx003) with ESMTPSA (Nemesis) id 0M3j17-1Ydp8K2KIb-00rIWy; Tue, 25 Aug 2015 09:25:13 +0200 In-Reply-To: <83vbc4fsjd.fsf@gnu.org> X-Provags-ID: V03:K0:j4mOTswNdPQ3WeuwB5HmO1KumjrZFufrutAhUPnJKmN1NQDy+j7 KIxLPafv9O1KaFNIFO9g3Skg/wkiyDXsXJkc8SEg70mh33dmKbNvtCY5O5HnhpcO4klcayB 5i+5oAVnNyl4BKPy/f4+/5rAQ+Af5Wkln7O50+Mknp/9qTXKY6iRSW/JEOQmrWokGyMTgxR xlumAq9Tf9z9OPY0sP/Xg== X-UI-Out-Filterresults: notjunk:1;V01:K0:CVJt/Sj8+8A=:1WO/NChasxsZfuwuwFWkLZ xgSi4U86M/CY+16KOzRQHiUf5x1dJY/zpYSCzSsxHtXY8Rk6Qf1Ety+5uuX9JHWMgG/KTpzpq XY/FFpleJXgZC5jqDUMuwJRSK6DN8FvawkJUaxnktC4dKbF19R4dw/S22Bp13XcjLTDCDCYGo M6Wkkl54meLUAExtidzU4jf746U5iBg2WPxCXPnUnhIMgns+Pm0FP9jQKK/s2nWJoDZy3L+r8 pquwsUk/iVzDQGD+0E1Zx2+l3ahyCQ+qwl5gM7bsmQ75MVnr878lno7EOivwE8sNuO2o44lbJ grAA/nZXp8vGHWWBkxnh/3L5A6USj0+fT5MJdACy6gSbg1UlxO+yp/Cl1vP38FOA6jrej8AZr lAcf7kw1j2EMQ3HV0YkSMRqiuR9rITjGSfwHz8SipqcjjMF47A+dV+keFKGVOpDwIRoha05qV LMeisS9r4Qd6ErxXnh7s/bZ9p2RqOccjqKOfhffZ4KrTUJ7+hdhf/u+wM1o3hbKQZawdgbneM DA7Gw2NXfjfTuBJ0EYGLX14fRirEr1U5YEomypWd+LYctlVxlTNlSYbZtvz/ideOBIEvtPR7k SocGLYKDdFgdr7BlCPXiWJVmekIp4hs+U0wHuFJnUbjnRZPEKfvDcP00y+jicU8m9qc6zNlAO FEKnBbUg3pTom/iWgz6YlDkvQT2cv2mLrNSjiQ8wTTNGU4ZgXyV1ancGiTjiCjBZ7ne6Nsunl zDmFbsWUYrl9aMAPbpQPlPkTiRTAWUIwbQTU0Q== 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: 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-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:105796 Archived-At: >> Naively spoken it's obvious that when you shrink the minibuffer you s= how >> more lines in the window above and =E2=80=98linum-mode=E2=80=99 has t= o add numbers for >> those lines. And when you enlarge the minibuffer, =E2=80=98follow-mo= de=E2=80=99 will >> lose some lines at the bottom of the left window and has to show them= at >> the top of the right window. > > In well-behaved modes this happens automatically, as part of > redisplay. Via =E2=80=98pre-redisplay-function=E2=80=99? How does a well-behaved mo= de detect whether it has to make "this happen automatically"? By walking all windows and checking whether their sizes, start and end positions changed, I suppose. >> Maybe they use the =E2=80=98post-command-hook=E2=80=99 function inste= ad. > > Of course, they do! The flag of bad design. IIUC they didn't have another choice before =E2=80=98pre-redisplay-functi= on=E2=80=99 was added. >> This is, in fact, an abuse of =E2=80=98set-window-configuration=E2=80= =99. But how fix >> it? We'd need a hook, say =E2=80=98window-size-change-functions=E2=80= =99, that tracks, >> among other things, whether a window was resized due to a change of t= he >> minibuffer height and, if that happens, set a flag to indicate that t= he >> window configuration must be restored. > > I'd say, don't set the "size changed" flag unless the size really > changed. Sure. Nevertheless we would have to also track changes due to automatic minibuffer resizing. Alternatively, Fset_window_configuration could run a modified version of =E2=80=98compare-window-configurations=E2=80=99 to compare the current co= nfiguration with the one to be restored and restore the old configuration iff these differ. I'm not sure whether this would be any cheaper, especially when the configuration does change frequently. martin