GNU bug report logs - #21333
25.0.50; window-size-change-functions not called after mini-window resize

Previous Next

Package: emacs;

Reported by: Pip Cet <pipcet <at> gmail.com>

Date: Sun, 23 Aug 2015 22:07:02 UTC

Severity: normal

Merged with 830, 21869

Found in versions 24.0.90, 25.0.50

Done: Eli Zaretskii <eliz <at> gnu.org>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: martin rudalics <rudalics <at> gmx.at>
To: Eli Zaretskii <eliz <at> gnu.org>
Cc: pipcet <at> gmail.com, 21333 <at> debbugs.gnu.org
Subject: bug#21333: 25.0.50; window-size-change-functions not called after mini-window resize
Date: Fri, 28 Aug 2015 15:05:35 +0200
>> I don't understand.  We don't call ‘post-command-hook’ when resizing a
>> window gets triggered by a timer.
>
> Can you show me some Lisp which causes this?  I'd like to see what am
> I missing here.

I'm not sure what you mean but put the following snippet into your
*scratch* with emacs -Q and ‘eval-buffer’.


(defvar timer nil)
(defvar foo 0)
(defvar bar 0)

(defun foo ()
  "..."
  (setq foo (1+ foo))
  (if (>= (length (window-list)) 2)
      (delete-other-windows)
    (split-window))
  (when (timerp timer)
    (cancel-timer timer))
  (setq timer (run-with-idle-timer
	       (time-add (current-idle-time) 2)
	       t 'foo))
  (message "foo: %s ... %s" foo bar))

(defun bar ()
  "..."
  (setq bar (1+ bar))
  (message "bar: %s ... %s" foo bar))

(setq timer (run-with-idle-timer 2 t 'foo))

(add-hook 'post-command-hook 'bar)


You will see that eventually only foo increases while bar remains
fixed.

martin





This bug report was last modified 9 years and 183 days ago.

Previous Next


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