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

need force-header-line-update



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 <yamaoka@jpl.org>