From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: "Richard M. Stallman" Newsgroups: gmane.emacs.devel Subject: [hober0@gmail.com: Re: mode-line redisplay bug] Date: Fri, 12 Aug 2005 10:59:21 -0400 Message-ID: Reply-To: rms@gnu.org NNTP-Posting-Host: main.gmane.org Content-Type: text/plain; charset=ISO-8859-15 X-Trace: sea.gmane.org 1123859894 3553 80.91.229.2 (12 Aug 2005 15:18:14 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Fri, 12 Aug 2005 15:18:14 +0000 (UTC) Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Fri Aug 12 17:18:10 2005 Return-path: Original-Received: from lists.gnu.org ([199.232.76.165]) by ciao.gmane.org with esmtp (Exim 4.43) id 1E3bGz-0004mD-RB for ged-emacs-devel@m.gmane.org; Fri, 12 Aug 2005 17:16:42 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1E3bKD-0007na-94 for ged-emacs-devel@m.gmane.org; Fri, 12 Aug 2005 11:20:01 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1E3bBp-0002PN-4z for emacs-devel@gnu.org; Fri, 12 Aug 2005 11:11:21 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1E3bBc-0002JE-Sa for emacs-devel@gnu.org; Fri, 12 Aug 2005 11:11:16 -0400 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1E3bBc-0002El-Hv for emacs-devel@gnu.org; Fri, 12 Aug 2005 11:11:08 -0400 Original-Received: from [199.232.76.164] (helo=fencepost.gnu.org) by monty-python.gnu.org with esmtp (Exim 4.34) id 1E3bH8-0003ll-Ld for emacs-devel@gnu.org; Fri, 12 Aug 2005 11:16:50 -0400 Original-Received: from rms by fencepost.gnu.org with local (Exim 4.34) id 1E3b0D-0002kZ-To; Fri, 12 Aug 2005 10:59:21 -0400 Original-To: emacs-devel@gnu.org X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:41953 X-Report-Spam: http://spam.gmane.org/gmane.emacs.devel:41953 His test case is very clear, but it does not fail when I try it. Can anyone else observe this failure? ------- Start of forwarded message ------- To: emacs-pretest-bug@gnu.org From: Edward O'Connor Date: Thu, 11 Aug 2005 09:17:55 -0700 Organization: Church of Emacs Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" Subject: Re: mode-line redisplay bug X-Spam-Status: No, hits=0.0 required=5.0 tests=none autolearn=no version=2.63 - --=-=-= 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): - --=-=-= Content-Type: application/emacs-lisp Content-Disposition: inline; filename=redisplay-bug.el Content-Description: test case for redisplay bug ;; 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. - --=-=-= Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ Emacs-pretest-bug mailing list Emacs-pretest-bug@gnu.org http://lists.gnu.org/mailman/listinfo/emacs-pretest-bug - --=-=-=-- ------- End of forwarded message -------