emacs-pretest-bug
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

need force-header-line-update


From: Katsumi Yamaoka
Subject: need force-header-line-update
Date: Thu, 16 Oct 2003 20:48:48 +0900
User-agent: Gnus/5.1003 (Gnus v5.10.3) Emacs/21.3.50 (gnu/linux)

Hi,

I am troubled with the header-line which is not redisplayed.
Isn't there any function equivalent to force-mode-line-update
for making the header-line get redisplayed?  I found the strange
way shown below can be used for it:

  (let ((window-min-height 1))
    (shrink-window 1)
    (enlarge-window 1))

However, it is not always effective to all platforms.  Here is
an example:

;;--8<--------------cut here--------------start------------>8---
(defvar spinner-count 0)

(let* ((buffer (get-buffer-create "*testing*"))
       (parts ["-" "\\" "|" "/"])
       (timer (run-at-time
               0.2 0.2
               `(lambda nil
                  (save-excursion
                    (set-buffer ,buffer)
                    (let ((spinner (aref ,parts spinner-count)))
                      (setq header-line-format spinner
                            mode-line-buffer-identification spinner
                            spinner-count (if (>= spinner-count 3)
                                              0
                                            (1+ spinner-count)))

;;                    (let ((window-min-height 1))
;;                      (shrink-window 1)
;;                      (enlarge-window 1))

                      (force-mode-line-update)

                      (message "%d" spinner-count))))))
       (pop-up-windows t)
       pop-up-frames)
  (display-buffer buffer)
  (unwind-protect
      (while (read-event))
    (discard-input)
    (cancel-timer timer)))
;;--8<--------------cut here--------------end-------------->8---

I have a plan to show some texts and a small animated gif images
in the header-line. :)

Thanks in advance for your help,
-- 
Katsumi Yamaoka <address@hidden>




reply via email to

[Prev in Thread] Current Thread [Next in Thread]