GNU bug report logs - #32720
term-mode ignores certain window size changes

Previous Next

Package: emacs;

Reported by: Gary Fredericks <fredericksgary <at> gmail.com>

Date: Wed, 12 Sep 2018 15:24:01 UTC

Severity: minor

Fixed in version 26.2

Done: Lars Ingebrigtsen <larsi <at> gnus.org>

Bug is archived. No further changes may be made.

Full log


Message #14 received at 32720 <at> debbugs.gnu.org (full text, mbox):

From: martin rudalics <rudalics <at> gmx.at>
To: Eli Zaretskii <eliz <at> gnu.org>
Cc: 32720 <at> debbugs.gnu.org
Subject: Re: bug#32720: term-mode ignores certain window size changes
Date: Fri, 14 Sep 2018 10:32:48 +0200
>> 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




This bug report was last modified 4 years and 275 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.