emacs-devel
[Top][All Lists]
Advanced

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

Re: address@hidden: Re: mode-line redisplay bug]


From: Kim F. Storm
Subject: Re: address@hidden: Re: mode-line redisplay bug]
Date: Tue, 16 Aug 2005 14:58:19 +0200
User-agent: Gnus/5.11 (Gnus v5.11) Emacs/22.0.50 (gnu/linux)

Henrik Enberg <address@hidden> writes:

>> From: Edward O'Connor <address@hidden>
>> Date: Fri, 12 Aug 2005 10:19:09 -0700
>> 
>> > Edward, can you please recheck if this problem happens with "emacs -Q"?
>> 
>> It still happens with emacs -q --no-site-file.
>
> FWIW, it happens for me too on GNU/Linux with emacs -q --no-site-file

It didn't happen when I just executed the code manually in *scratch*, but
it does happen for me if I save Edward's instructions in a file xx.el,
and run emacs like this:

      emacs -Q -D -l xx.el

---- xx.el:

;; Step 0: Launch an Emacs on some variety of window-system.

;; Step 1: Ensure that there's something in the mode-line that changes
;;         periodically.

(defvar frob " hello")

(add-to-list 'minor-mode-alist '(t frob))

(defun frob-it ()
  "Change `frob' to a random string, and force a mode-line update."
  (setq frob (concat " " (make-string (+ 2 (random 6))
                                      (+ 97 (random 26)))))
  (force-mode-line-update t))

(run-with-timer 5 5 'frob-it)

;; Step 2: Ensure that there's a buffer with no mode-line.

(with-current-buffer (get-buffer "*scratch*")
  (setq header-line-format mode-line-format
        mode-line-format   nil))

;; Step 3: Make a key binding for switching between the buffer with no
;;         mode-line and a buffer with a mode-line which uses
;;         `switch-to-buffer'.

(global-set-key (kbd "C-c c")
                (lambda ()
                  (interactive)
                  (if (eq (current-buffer) (get-buffer "*Messages*"))
                      (switch-to-buffer (get-buffer "*scratch*"))
                    (switch-to-buffer (get-buffer "*Messages*")))))

;; Step 4: To observe the bug, switch to *scratch*, wait for the
;;         header-line to change, and hit C-c c. More often than not,
;;         the mode-line in *Messages* will be only partially
;;         displayed. (Try this several times, by repeated use of the
;;         C-c c key binding, if you don't observe the effect right
;;         away.) Typing C-l (unsurprisingly) fixes the display.

-- 
Kim F. Storm <address@hidden> http://www.cua.dk





reply via email to

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