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#32720: term-mode ignores certain window size changes Date: Thu, 13 Sep 2018 10:07:06 +0200 Message-ID: <5B9A1AAA.90804@gmx.at> References: NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Trace: blaine.gmane.org 1536825969 27667 195.159.176.226 (13 Sep 2018 08:06:09 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Thu, 13 Sep 2018 08:06:09 +0000 (UTC) To: 32720@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Thu Sep 13 10:06:05 2018 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 1g0MdY-00073m-Ic for geb-bug-gnu-emacs@m.gmane.org; Thu, 13 Sep 2018 10:06:04 +0200 Original-Received: from localhost ([::1]:41014 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1g0Mfe-0001tA-J5 for geb-bug-gnu-emacs@m.gmane.org; Thu, 13 Sep 2018 04:08:14 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:34301) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1g0MfX-0001ss-5a for bug-gnu-emacs@gnu.org; Thu, 13 Sep 2018 04:08:09 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1g0MfS-0003IL-Pf for bug-gnu-emacs@gnu.org; Thu, 13 Sep 2018 04:08:07 -0400 Original-Received: from debbugs.gnu.org ([208.118.235.43]:34442) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1g0MfS-0003IC-Kk for bug-gnu-emacs@gnu.org; Thu, 13 Sep 2018 04:08:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1g0MfS-0001TF-1l for bug-gnu-emacs@gnu.org; Thu, 13 Sep 2018 04:08: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: Thu, 13 Sep 2018 08:08:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 32720 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 32720-submit@debbugs.gnu.org id=B32720.15368260415596 (code B ref 32720); Thu, 13 Sep 2018 08:08:01 +0000 Original-Received: (at 32720) by debbugs.gnu.org; 13 Sep 2018 08:07:21 +0000 Original-Received: from localhost ([127.0.0.1]:38700 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1g0Men-0001SB-69 for submit@debbugs.gnu.org; Thu, 13 Sep 2018 04:07:21 -0400 Original-Received: from mout.gmx.net ([212.227.17.22]:55083) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1g0Mel-0001Ry-Ip for 32720@debbugs.gnu.org; Thu, 13 Sep 2018 04:07:19 -0400 Original-Received: from [192.168.1.101] ([213.162.73.2]) by mail.gmx.com (mrgmx103 [212.227.17.168]) with ESMTPSA (Nemesis) id 0MI5rO-1fyhxv38T0-003rGq for <32720@debbugs.gnu.org>; Thu, 13 Sep 2018 10:07:13 +0200 In-Reply-To: X-Provags-ID: V03:K1:rCGGAea/Qsttp/EIIcTtTFSsG++t72ZmmpLFmDAZ74uyTm+vS1Z t3JiucwgW30u31m+4yNHyYZNODHY6A5A4VKGkDhY9x3A4XJlF8VFs2JFTzT7F9GdtlFDcTq e5hRV1HBkksQ/R3JF6D0ttHPSCmk8t0zvRs7J8CRggtZxBBK3hf1F9MP5JYAKIXbAO3xIuu /VlCkrRX2VWNyIOPTVXHg== X-UI-Out-Filterresults: notjunk:1;V01:K0:FVfDKDUjt7Y=:ZevaaFPPZp/oLeJdSFAfrv ox/k3zxmTRXzE+HpZL/AI3BLiMU+UVp7kqh4wRk+JyKQW8So/KaQfeyvPOttgIxWjG8Ykk5rk K3qvnqAnLRKzJX73rUqbZXJxRpTof3rKOy4IjuDByhnX1NooXz06PfSK7spToUoq3j2+GP7sf qtwmL69sE0x/KWYUVokBh4br5AGEx6RG6ZzrYnsjmWJ+iq5g+bcJvk5Vop0NyoDtoZhVwVDev vcndUa+oymbqE+40w4F/jVmtouuLStQJU7H+/mR1HDVW6YQGRKh7c7gyRYhSk2vgpwOMkbZkY 2DAwsx4ZG6wQ3kzpTvYN5SJDDyzTkFDwVy4k8FgvtaIl46TezXO4n1MlFzkvASdbybm1RHI7O JXERPJeSaRX4e7y58t/B6gX4jI1UUso9kTzDHnjrXTg/SCIOwooXmbQ4Tk7mmJZNnhdZv7/MC Zdwo6kgc9gWU+jBkZjNj784N9LWysa4Y5T534yuRFXxonujYLOAgs4wQG9/XC0EESwQNPeB7/ 9j5VnQk7IpQ9p4HptrF8uhGtD2/TdEl4NqOizf6lPpnAl6MfYXXOzYHOX1dk6sdhKzI/oabP5 jstZX7ljHEvpEmpj58ZGRuqVvOfpKnZB9+LRwxcCyBkE2bVHimqyw7Nq00uEp9ZBEdLJFz19j RKDhDs6Cl7GHGr3VhpkJGMAhALM6ZTb0EoHvR8W0IVTYxwr+5oBCG4mysBsONcIA8kq7K458n wsd+H6BtGmlMiCUZQ2yGD4fJYXVoMqF07GVES569STragwcOBrWAUaptNJsWl9cvL40ZCwX3 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:150277 Archived-At: > *Affects*: version 26 (git-bisected to commit 8e7712c7afc) > > Note: I have only tried this on --without-x emacs > > *Steps to reproduce* > > 1. start emacs > 2. start a term buffer with M-x term > 3. run `seq 1000` at the bash prompt to fill the screen > 4. enlarge the terminal window that emacs is running in, so that the > window size changes as well > 5. run `seq 1000` again, and observe that the new space at the bottom of > the buffer is not being used > > *Analysis notes* > > term-mode *does* pick up changes after more explicit window configurations, > like splits; my workaround for months has been to split and join the > terminal window whenever I've resized it. > > As best I can tell, term-mode subscribes to window size changes by adding > advice to the window-adjust-process-window-size-function variable, and the > 8e7712c7afc reduced the set of situations in which that function is called. > > I've developed a more automated workaround with a term-load-hook of this > form: > > (add-hook 'window-size-change-functions (lambda (_frame) > (window--adjust-process-windows))) > > It might be that adding this line to the term-mode setup steps would be > sufficient, but I'm not familiar enough with the window.el code to have a > guess whether that's actually a good approach. Emacs no more runs 'window-configuration-change-hook' when the frame size changes so your workaround should indeed work around that case. But you should see a similar problem before commit 8e7712c7afc with a frame containing a window showing process output and that window's size gets changed. In its current form, 'window--adjust-process-windows' is a gross hack. Putting a function by default on 'window-configuration-change-hook' (or 'window-size-change-functions') is a bad idea IMO. There should be no place for such functions in window.el - a special mode should take care of them. martin