[Top][All Lists]

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

Re: mode-line redisplay bug

From: Kim F. Storm
Subject: Re: mode-line redisplay bug
Date: Fri, 09 Sep 2005 00:59:18 +0200
User-agent: Gnus/5.11 (Gnus v5.11) Emacs/22.0.50 (gnu/linux)

Thank you for a comprehensive bug report.

I have installed a change that fixes this for me.
Can you pls. try latest CVS to see if it works for you too.

"Edward O'Connor" <address@hidden> writes:

> Several months ago, I wrote:
>> Every so often for a while I've occasionally seen this odd redisplay
>> bug, and I now think I know about it to report it. Anyway, here's what
>> happens: I set `mode-line-format' to nil in my eshell buffers. I
>> switch to an ERC buffer with the command `erc-track-switch-buffer'
>> (which is just a cute wrapper around `switch-to-buffer'). My mode-line
>> in the ERC buffer upon such a buffer switch will often be garbled,
>> with only part of it appearing, as you can see in this screenshot:
>> http://edward.oconnor.cx/tmp/emacs/bug1.png
>> I thought that the bug might have something to do with my custom
>> `mode-line' face, but as you can see in this other screenshot, it
>> occurs with default Emacs faces as well:
>> http://edward.oconnor.cx/tmp/emacs/bug2.png
>> (For completeness sake, here's what a normal ERC buffer looks like:
>> http://edward.oconnor.cx/tmp/emacs/normal.png)
>> I imagine the redisplay code is trying to only redraw those parts of the
>> mode-line that have changed, or something like that. Nevertheless, it
>> does seem that the redisplay engine doesn't realize that, when switching
>> from a buffer without a mode-line, *everything in the mode-line* needs
>> to be redisplayed.
> (For the record, I've seen this bug under X11, Mac OS X, and w32.)
> Richard Stallman replied:
>> Can you please send a precise self-contained test case for this bug?
> And I've finally written a self-contained test case (attached):
> ;; 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.
> _______________________________________________
> Emacs-pretest-bug mailing list
> address@hidden
> http://lists.gnu.org/mailman/listinfo/emacs-pretest-bug

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

reply via email to

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