From: martin rudalics <rudalics@gmx.at>
To: Eli Zaretskii <eliz@gnu.org>
Cc: fredericksgary@gmail.com, 32720@debbugs.gnu.org
Subject: bug#32720: term-mode ignores certain window size changes
Date: Sat, 17 Nov 2018 10:20:55 +0100 [thread overview]
Message-ID: <5BEFDD77.5080505@gmx.at> (raw)
In-Reply-To: <835zwxulm5.fsf@gnu.org>
[-- Attachment #1: Type: text/plain, Size: 121 bytes --]
> I don't think I have a clear idea of what is being proposed for
> emacs-26.
I propose the attached changes.
martin
[-- Attachment #2: window-configuration-change-hook.diff --]
[-- Type: text/plain, Size: 3221 bytes --]
diff --git a/doc/lispref/windows.texi b/doc/lispref/windows.texi
index e9bd0c7..46f1068 100644
--- a/doc/lispref/windows.texi
+++ b/doc/lispref/windows.texi
@@ -6016,26 +6016,24 @@ Window Hooks
@code{window-pixel-height} for that window (@pxref{Window Sizes}).
These function are usually only called when at least one window was
-added or has changed size since the last time this hook was run for the
-associated frame. In some rare cases this hook also runs when a window
-that was added intermittently has been deleted afterwards. In these
-cases none of the windows on the frame will appear to have changed its
-size.
-
-You may use @code{save-selected-window} in these functions
-(@pxref{Selecting Windows}). However, do not use
-@code{save-window-excursion} (@pxref{Window Configurations}); exiting
-that macro counts as a size change, which would cause these functions to
-be called again.
+added or has changed size since the last time this hook was run for
+the associated frame. In some rare cases this hook also runs when a
+window that was added intermittently has been deleted afterwards. In
+these cases none of the windows on the frame will appear to have
+changed its size.
@end defvar
@defvar window-configuration-change-hook
-A normal hook that is run every time the window configuration of a frame
-changes. Window configuration changes include splitting and deleting
-windows, and the display of a different buffer in a window. Resizing the
-frame or individual windows do not count as configuration changes. Use
-@code{window-size-change-functions}, see above, when you want to track
-size changes that are not caused by the deletion or creation of windows.
+A normal hook that is run every time the window configuration of a
+frame changes. Window configuration changes include splitting and
+deleting windows, and the display of a different buffer in a window.
+
+The hook can be also used for tracking changes of window sizes. It
+is, however, not run when the size of a frame changes or automatic
+resizing of a minibuffer window (@pxref{Minibuffer Windows}) changes
+the size of another window. As a rule, adding a function to
+@code{window-size-change-functions}, see above, is the recommended way
+for reliably tracking size changes of any window.
The buffer-local value of this hook is run once for each window on the
affected frame, with the relevant window selected and its buffer
diff --git a/lisp/window.el b/lisp/window.el
index 92cd8c2..f4e6f14 100644
--- a/lisp/window.el
+++ b/lisp/window.el
@@ -9287,8 +9287,18 @@ window--adjust-process-windows
(when size
(set-process-window-size process (cdr size) (car size))))))))))
+;; Remove the following call in Emacs 27, running
+;; 'window-size-change-functions' should suffice.
(add-hook 'window-configuration-change-hook 'window--adjust-process-windows)
+;; Catch any size changes not handled by
+;; 'window-configuration-change-hook' (Bug#32720, "another issue" in
+;; Bug#33230).
+(add-hook
+ 'window-size-change-functions
+ (lambda (_frame)
+ (window--adjust-process-windows)))
+
\f
;; Some of these are in tutorial--default-keys, so update that if you
;; change these.
next prev parent reply other threads:[~2018-11-17 9:20 UTC|newest]
Thread overview: 46+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-09-12 12:09 bug#32720: term-mode ignores certain window size changes Gary Fredericks
2018-09-13 8:07 ` martin rudalics
2018-09-13 14:06 ` Eli Zaretskii
2018-09-14 8:32 ` martin rudalics
2018-11-04 9:56 ` martin rudalics
2018-11-16 12:15 ` Gary Fredericks
2018-11-16 12:57 ` martin rudalics
2018-11-16 13:15 ` Gary Fredericks
2018-11-18 9:22 ` martin rudalics
2018-11-16 14:45 ` Eli Zaretskii
2018-11-17 9:20 ` martin rudalics [this message]
2018-11-17 9:43 ` Eli Zaretskii
2018-11-17 18:40 ` martin rudalics
2018-11-18 3:30 ` Eli Zaretskii
2018-11-18 9:22 ` martin rudalics
2018-11-18 15:21 ` Eli Zaretskii
2018-11-18 19:37 ` martin rudalics
2018-11-18 20:10 ` Eli Zaretskii
2018-11-19 9:41 ` martin rudalics
2018-11-19 15:04 ` Gary Fredericks
2018-11-19 15:14 ` martin rudalics
2018-12-22 22:53 ` Gary Fredericks
2018-12-23 9:38 ` martin rudalics
2018-12-23 13:16 ` Gary Fredericks
2018-12-23 13:40 ` martin rudalics
2018-12-23 13:47 ` Gary Fredericks
2018-12-23 18:02 ` martin rudalics
2018-12-23 18:54 ` Gary Fredericks
2018-12-25 9:51 ` martin rudalics
2018-12-29 23:23 ` Gary Fredericks
2018-12-30 9:53 ` martin rudalics
2018-12-31 12:45 ` Gary Fredericks
2018-12-31 14:16 ` martin rudalics
2019-01-01 15:37 ` Gary Fredericks
2019-01-01 17:25 ` martin rudalics
2019-01-01 17:31 ` Gary Fredericks
2019-01-01 17:55 ` martin rudalics
2019-01-06 22:51 ` Gary Fredericks
2019-01-07 12:29 ` Gary Fredericks
2019-01-07 16:11 ` martin rudalics
2019-01-11 9:24 ` martin rudalics
2019-01-16 14:07 ` Gary Fredericks
2019-01-16 17:30 ` martin rudalics
2019-01-16 17:44 ` Gary Fredericks
2020-08-22 14:59 ` Lars Ingebrigtsen
2020-08-22 16:57 ` Gary Fredericks
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=5BEFDD77.5080505@gmx.at \
--to=rudalics@gmx.at \
--cc=32720@debbugs.gnu.org \
--cc=eliz@gnu.org \
--cc=fredericksgary@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/emacs.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).