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: Fri, 14 Sep 2018 10:32:48 +0200 Message-ID: <5B9B7230.4010301@gmx.at> References: <5B9A1AAA.90804@gmx.at> <838t45lces.fsf@gnu.org> 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 1536914075 31841 195.159.176.226 (14 Sep 2018 08:34:35 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Fri, 14 Sep 2018 08:34:35 +0000 (UTC) Cc: 32720@debbugs.gnu.org To: Eli Zaretskii Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Fri Sep 14 10:34:31 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 1g0jYc-0008CJ-TV for geb-bug-gnu-emacs@m.gmane.org; Fri, 14 Sep 2018 10:34:31 +0200 Original-Received: from localhost ([::1]:50567 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1g0jaj-0002Xo-BA for geb-bug-gnu-emacs@m.gmane.org; Fri, 14 Sep 2018 04:36:41 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:37207) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1g0jYL-0001Ju-W2 for bug-gnu-emacs@gnu.org; Fri, 14 Sep 2018 04:34:17 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1g0jYD-0005yL-Vg for bug-gnu-emacs@gnu.org; Fri, 14 Sep 2018 04:34:10 -0400 Original-Received: from debbugs.gnu.org ([208.118.235.43]:35776) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1g0jYA-0005wv-Tv for bug-gnu-emacs@gnu.org; Fri, 14 Sep 2018 04:34:04 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1g0jYA-00088y-QX for bug-gnu-emacs@gnu.org; Fri, 14 Sep 2018 04:34: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: Fri, 14 Sep 2018 08:34:02 +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.153691398631218 (code B ref 32720); Fri, 14 Sep 2018 08:34:02 +0000 Original-Received: (at 32720) by debbugs.gnu.org; 14 Sep 2018 08:33:06 +0000 Original-Received: from localhost ([127.0.0.1]:40030 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1g0jXG-00087S-79 for submit@debbugs.gnu.org; Fri, 14 Sep 2018 04:33:06 -0400 Original-Received: from mout.gmx.net ([212.227.15.15]:59147) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1g0jXE-00086s-Ha for 32720@debbugs.gnu.org; Fri, 14 Sep 2018 04:33:04 -0400 Original-Received: from [192.168.1.101] ([46.125.249.30]) by mail.gmx.com (mrgmx002 [212.227.17.190]) with ESMTPSA (Nemesis) id 0LcBvB-1fbGjn13ht-00jXxl; Fri, 14 Sep 2018 10:32:58 +0200 In-Reply-To: <838t45lces.fsf@gnu.org> X-Provags-ID: V03:K1:BsOvD3pcZtB1tazs4LyTbAwAbCtg/J7evv1Cibf02i62gKwilAG pjtmckWcsGXaYD8080cjLREqwVGTyKEWRMFqpMJqANtoWUXzZznA7UhDBEdPZE6wYTV4Wug t7ZDs4DPi8Y9HFLdbV4Q6eBPWQajSkX6xIAsdvFPzN3dBJgOsBArir6RMPwyudTQ2iWTbCK +rF2lGuTb182ZzG9Igl0g== X-UI-Out-Filterresults: notjunk:1;V01:K0:G1npvtlKiTI=:WYIfnJGgX9DMNajpnI+uBb a0liSSGzw/vVO2bUZa2nCg2iG0V0biCOQgi/qwU/EzrU/FhXSeoam8/qdt6jy8zNhIymDr9pQ FPen9opYsbBgh7f71rgUKplZ87TUdCwCkA1JBnY56rDemgp1aGOy1V5wIKiOrmslpJaA0++vz g04rmSujNAHZbWH4sFq5Gy/LvcausASBK7YEsBm/Qv/hEjO0k4M4zfgeagy/TTEaRasDBFiS5 93DdxNu3IME2Ou4LKeYmebaK6MRp8WfuiDUVVXpuBoLtE5GdQPnxvGvtBNZua845SFcGr65dV bqDZ1BxDh0wk7EcO+ICNk+oyVT4QZtE1D1lBKcz1clG2G0wV3iwJAQrZHLRrn1oA0b9j6bhQr o7+RylqGPOey4x1CVvewKT+r89u/LtFpjhn2aByGAVWe8p8GrnrLabi+FZUD9+/sMOtd3VJnC 5T6sOlbniXWiFIUJaTrsLpKiQEsVeM+Yu0R43+VWIhsip/OSsjEiBfDvWUPn0FcL4o2PvBK6/ cOoiT+4OX67k4Za6nhKgDQqY4WN3ZU1zSfw9HpxgA0U3o73iBo3+ZGFNFcgFTfIYVD1mn1+qG sY0euhtsT3o9i81c0hJYGZyijurgBoYf9NGavgsQqizh5HcNLCpXNkThp+i0aDUuOBxoaqCat 0rr8bLBNCYkxFNECklYt8mAFyRCWdbR3/LxuzZeZiYh6X+XXWFv7e3vxY5nQFxgFuIyfJ1Ju6 nDDF9l68tSFzzr0qmcNfJPN8W6hGB2mLOM3pYpKfzcAcWv5/qWdJrbArRkTCUa2xD+lzhDUm 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:150312 Archived-At: >> 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. > > Can you elaborate on why do you think these are bad ideas? (1) Preempting a hook is like preempting an option. And options should be pristine when starting Emacs. Users who never run any processes should not be obliged to remove anything from a hook to obtain a clean run. Even if we say that it does not matter much in the case at hand, this code sets a precedent which others may follow. (2) I don't know what a "logical" window size is. Reading the doc-string of 'window-adjust-process-window-size-function', I understand that the function this variable is set to should pass the size of some window showing output of a process to that process. If this interpretation is correct, then not hooking into 'window-size-change-functions' will fail to capture explicit resizing of any such window - usually the most prominent case when a window size changes. So what's the aim of 'window--adjust-process-windows'? In either case, it should not be the task of window.el to find process windows. It does not find "Man" or "Info" windows either and calls a hook in a hook when resizing them although someone might find that convenient - compare Bug#32536. Window groups are the most prominent other example of code that usurpated window.el. I never understood why code which pertains to 'follow-mode' was added to window.el. Adding such code makes the already largest code file in the Lisp directory more and more difficult to navigate. BTW, the info text "When windows that display buffers associated with process change their dimensions, the affected processes should be told about these changes" seems to lack an "a" before "process". And the text "If the process has the `adjust-window-size-function' property (*note Process Information::), its value overrides the global and buffer-local values of `window-adjust-process-window-size-function'." is misleading. Section 38.6 Process Information does not mention any such property and I have no idea what it's supposed to accomplish. martin