From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.bugs Subject: bug#18912: 24.4; mode-line corruption on graphical frames in dual-headed display Date: Tue, 04 Nov 2014 18:16:49 +0200 Message-ID: <83r3xjuej2.fsf@gnu.org> References: <54524135.8090405@gnu.org> <8361ezz56z.fsf@gnu.org> <5454D7EB.6060407@gnu.org> <83sii3xecv.fsf@gnu.org> <54574DDC.9020608@gmx.at> <5457D052.4090807@gnu.org> <54588656.3090207@gmx.at> <54588C52.7040804@gnu.org> <54589A1E.8040600@gmx.at> <5458A9A2.3070108@gnu.org> Reply-To: Eli Zaretskii NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8BIT X-Trace: ger.gmane.org 1415117846 23443 80.91.229.3 (4 Nov 2014 16:17:26 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Tue, 4 Nov 2014 16:17:26 +0000 (UTC) Cc: 18912@debbugs.gnu.org To: Bruno =?UTF-8?Q?F=C3=A9lix?= Rezende Ribeiro Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Tue Nov 04 17:17:20 2014 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1XlgnI-0007tb-BB for geb-bug-gnu-emacs@m.gmane.org; Tue, 04 Nov 2014 17:17:20 +0100 Original-Received: from localhost ([::1]:41476 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XlgnH-0007d5-PO for geb-bug-gnu-emacs@m.gmane.org; Tue, 04 Nov 2014 11:17:19 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:44906) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Xlgn7-0007Tq-Ie for bug-gnu-emacs@gnu.org; Tue, 04 Nov 2014 11:17:15 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Xlgn0-0005Sx-Oo for bug-gnu-emacs@gnu.org; Tue, 04 Nov 2014 11:17:09 -0500 Original-Received: from debbugs.gnu.org ([140.186.70.43]:51768) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Xlgn0-0005St-MA for bug-gnu-emacs@gnu.org; Tue, 04 Nov 2014 11:17:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.80) (envelope-from ) id 1Xlgn0-0001e9-Du for bug-gnu-emacs@gnu.org; Tue, 04 Nov 2014 11:17:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 04 Nov 2014 16:17:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 18912 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 18912-submit@debbugs.gnu.org id=B18912.14151178216318 (code B ref 18912); Tue, 04 Nov 2014 16:17:02 +0000 Original-Received: (at 18912) by debbugs.gnu.org; 4 Nov 2014 16:17:01 +0000 Original-Received: from localhost ([127.0.0.1]:48979 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1Xlgmy-0001dk-KJ for submit@debbugs.gnu.org; Tue, 04 Nov 2014 11:17:01 -0500 Original-Received: from mtaout23.012.net.il ([80.179.55.175]:38360) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1Xlgmv-0001dR-PA for 18912@debbugs.gnu.org; Tue, 04 Nov 2014 11:16:58 -0500 Original-Received: from conversion-daemon.a-mtaout23.012.net.il by a-mtaout23.012.net.il (HyperSendmail v2007.08) id <0NEI00K00VKAJJ00@a-mtaout23.012.net.il> for 18912@debbugs.gnu.org; Tue, 04 Nov 2014 18:16:56 +0200 (IST) Original-Received: from HOME-C4E4A596F7 ([87.69.4.28]) by a-mtaout23.012.net.il (HyperSendmail v2007.08) with ESMTPA id <0NEI00KQUVW7FC80@a-mtaout23.012.net.il>; Tue, 04 Nov 2014 18:16:56 +0200 (IST) In-reply-to: <5458A9A2.3070108@gnu.org> X-012-Sender: halo1@inter.net.il X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x X-Received-From: 140.186.70.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:95477 > Date: Tue, 04 Nov 2014 08:25:38 -0200 > From: Bruno FĂ©lix Rezende Ribeiro > CC: 18912@debbugs.gnu.org > > > Elsewhere you asked to "please, provide a way to make Emacs > > optionally redraw the mode-line after any scroll operation". How > > does scrolling enter here? > > After getting the mode-line right by refreshing the frame, only > scrolling can possibly corrupt the mode-line again. What do you mean by "scrolling", exactly? Which Emacs commands? In any case, the initial display of "C-x d" doesn't involve any scrolling, so it's not a "scrolling problem". > After creating the frame with 'emacs -Q', typing 'C-x d /dev RET' > takes me to a Dired buffer with a corrupted mode-line as shown in the > picture attached to the original bug report. There, typing 'M-! > xrefresh RET' repaints the whole frame and the mode-line is shown > normally as one would expect. Scrolling the text up with 'C-v' > corrupts the mode-line again. What about moving cursor so it exits the visible portion of the window, which also induces scrolling? And what about using the scroll bar? Or just "M-x goto-char RET"? Are you saying these don't produce a corrupted mode line? > > I don't have the slightest idea why the mode line would _not_ be > > redrawn after scrolling but maybe there's some optimization here. In > > any case with emacs -Q moving the window's point from one line to > > another should redraw the mode line to show the new line number. > > If it redraws the mode-line, it does so while corrupting the mode-line > again When you move to a different line, Emacs only redraws the line number part of the mode line. Does that at least remove the corruption in that area, or doesn't it? In general, Emacs always redraws only the parts of the screen that were changed. If you tell it to redraw, and nothing changed, it will normally not redraw anything at all. > because, by observation, updating the line number doesn't trigger > the same kind of redraw that the 'xrefresh' command does. Of course, it doesn't! Emacs doesn't use the technique used by xrefresh, because Emacs tries to redraw as little as possible, not as much as possible! xrefresh was coded specifically to force portions of the screen to be completely redrawn, which is almost the anti-thesis of the Emacs display engine. Is there _any_ Emacs action that succeeds in redrawing the mode line or its parts in a way that eliminates the corruption? I already asked above about whether moving to a different line does that in the portion that displays the line number. How about hovering the mouse pointer over mouse-sensitive portions of the mode line, like the buffer name and the major/minor mode indications? do they successfully redraw the corresponding parts of the mode line? What about "M-x redraw-display RET" -- does it fix the display of the mode line? If none of these helps, then I don't think Emacs can do anything at all to help you work around the problem. (And btw, why disabling the acceleration permanently isn't _the_ solution?) > > BTW, suppose you evaluate > > > > (set-frame-parameter nil 'bottom-divider-width 8) > > > > Does that impact the appearance of the bug in any way? > > Yes, it does. The mode-line still gets corrupt but this time by the > lower half (approximately) of the line above the one that corrupted it > originally. > > Interesting enough, > > (set-frame-parameter nil 'bottom-divider-width 1) > > fixes the problem for the original frame. Unfortunately when > in full-screen the mode-line is corrupted again; what is fixed in the > VGA1 output by > > (set-frame-parameter nil 'bottom-divider-width 7) > > and in the LVDS1 output by > > (set-frame-parameter nil 'bottom-divider-width 12) Any change in window height that causes it to be an exact integral multiple of the font height will eliminate the problem. The problem is evidently caused by incorrect clipping of partially-visible lines. That's why you see what you see.