GNU bug report logs - #24240
25.1.50; window-state-put, image-mode and window scrolling

Previous Next

Package: emacs;

Reported by: Andreas Politz <politza <at> hochschule-trier.de>

Date: Mon, 15 Aug 2016 23:06:02 UTC

Severity: normal

Found in version 25.1.50

Done: martin rudalics <rudalics <at> gmx.at>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: Andreas Politz <politza <at> hochschule-trier.de>
To: martin rudalics <rudalics <at> gmx.at>
Cc: 24240 <at> debbugs.gnu.org
Subject: bug#24240: 25.1.50; window-state-put, image-mode and window scrolling
Date: Wed, 17 Aug 2016 12:33:19 +0200
[Message part 1 (text/plain, inline)]
martin rudalics <rudalics <at> gmx.at> writes:

> We can abuse ‘frame-after-make-frame’.  Try the attached, completely
> untested patch.
>
> BTW I just noticed that we still run ‘window-configuration-change-hook’
> in far too many cases.

(defmacro with-inhibit-window-configuration-change-hook (frame &rest body)
  "Inhibit `window-configuration-change-hook' on FRAME in BODY."
  (declare (indent 1) (debug t))
  (let ((frame-var (make-symbol "frame")))
    `(let ((,frame-var (window-normalize-frame ,frame)))
       (unwind-protect
           (progn
             (frame-after-make-frame ,frame-var nil)
             ,@body)
         (frame-after-make-frame ,frame-var t)))))

> Would my patch work around that?

It seems to inhibit running the hook, but there is still the case of
set-window-start in window--state-put-2.  Using the NOFORCE works, but I
don't know the implications of this in other cases.

[Message part 2 (text/x-diff, inline)]
diff --git a/lisp/window.el b/lisp/window.el
index 11d7a4e..d30819d 100644
--- a/lisp/window.el
+++ b/lisp/window.el
@@ -5497,7 +5497,7 @@ window--state-put-2
 		;; Install positions (maybe we should do this after all
 		;; windows have been created and sized).
 		(ignore-errors
-		  (set-window-start window (cdr (assq 'start state)))
+		  (set-window-start window (cdr (assq 'start state)) 'noforce)
 		  (set-window-point window (cdr (assq 'point state))))
 		;; Select window if it's the selected one.
 		(when (cdr (assq 'selected state))
[Message part 3 (text/plain, inline)]
-ap

This bug report was last modified 8 years and 209 days ago.

Previous Next


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