From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Stephen Berman Newsgroups: gmane.emacs.bugs Subject: bug#7464: 24.0.50; mouse highlighting vanishes upon unsplitting window Date: Fri, 30 Mar 2012 21:35:27 +0200 Message-ID: <87iphlrif4.fsf@escher.home> References: <877hg5l828.fsf@escher.home> <8362vp9rci.fsf@gnu.org> <83y68l88xd.fsf@gnu.org> <87sjh12a0d.fsf@gnu.org> <871uolhmdx.fsf@escher.home> <83d381u9xy.fsf@gnu.org> <87limpoenv.fsf@escher.home> <83vclts5aq.fsf@gnu.org> <87pqc0bzyp.fsf@escher.home> <83mx70imgh.fsf@gnu.org> <874nt7hm9q.fsf@escher.home> <83r4wb1byq.fsf@gnu.org> <87ty173tkt.fsf@escher.home> <83limi1tq6.fsf@gnu.org> <87sjgqqxyz.fsf@escher.home> <8362dm1mky.fsf@gnu.org> <87mx6yqray.fsf@escher.home> <83zkayz41f.fsf@gnu.org> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: dough.gmane.org 1333136175 31974 80.91.229.3 (30 Mar 2012 19:36:15 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Fri, 30 Mar 2012 19:36:15 +0000 (UTC) Cc: cyd@gnu.org, 7464@debbugs.gnu.org To: Eli Zaretskii Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Fri Mar 30 21:36:13 2012 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 1SDhcH-0003Tu-EO for geb-bug-gnu-emacs@m.gmane.org; Fri, 30 Mar 2012 21:36:09 +0200 Original-Received: from localhost ([::1]:55477 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SDhcG-0007hj-LR for geb-bug-gnu-emacs@m.gmane.org; Fri, 30 Mar 2012 15:36:08 -0400 Original-Received: from eggs.gnu.org ([208.118.235.92]:40274) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SDhcD-0007h4-Cn for bug-gnu-emacs@gnu.org; Fri, 30 Mar 2012 15:36:07 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1SDhcB-0002Ar-1B for bug-gnu-emacs@gnu.org; Fri, 30 Mar 2012 15:36:04 -0400 Original-Received: from debbugs.gnu.org ([140.186.70.43]:34922) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SDhcA-0002AU-Tb for bug-gnu-emacs@gnu.org; Fri, 30 Mar 2012 15:36:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.72) (envelope-from ) id 1SDhcA-0002NX-2i for bug-gnu-emacs@gnu.org; Fri, 30 Mar 2012 15:36:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Stephen Berman Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 30 Mar 2012 19:36:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 7464 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 7464-submit@debbugs.gnu.org id=B7464.13331361349099 (code B ref 7464); Fri, 30 Mar 2012 19:36:01 +0000 Original-Received: (at 7464) by debbugs.gnu.org; 30 Mar 2012 19:35:34 +0000 Original-Received: from localhost ([127.0.0.1]:59693 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1SDhbh-0002Mh-Ur for submit@debbugs.gnu.org; Fri, 30 Mar 2012 15:35:34 -0400 Original-Received: from mailout-de.gmx.net ([213.165.64.22]:51739) by debbugs.gnu.org with smtp (Exim 4.72) (envelope-from ) id 1SDhbf-0002MX-Av for 7464@debbugs.gnu.org; Fri, 30 Mar 2012 15:35:32 -0400 Original-Received: (qmail invoked by alias); 30 Mar 2012 19:35:28 -0000 Original-Received: from i59F54624.versanet.de (EHLO escher.home) [89.245.70.36] by mail.gmx.net (mp032) with SMTP; 30 Mar 2012 21:35:28 +0200 X-Authenticated: #20778731 X-Provags-ID: V01U2FsdGVkX1+NkM9p3+6N5LdpAVgYdR7L8+vy8vDtyXd+pV7BZm FG6IqWV35T5i9W In-Reply-To: <83zkayz41f.fsf@gnu.org> (Eli Zaretskii's message of "Fri, 30 Mar 2012 15:06:36 +0300") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.0.94 (gnu/linux) X-Y-GMX-Trusted: 0 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 2) 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:58356 Archived-At: On Fri, 30 Mar 2012 15:06:36 +0300 Eli Zaretskii wrote: >> I cannot tell in gdb when I'm in the window with the mouse face >> highlighting. > > Whenever you are in update_window, typing "pp w->buffer" should > display the buffer this window is displaying. Thanks for this very helpful tip. [...] >> The highlighted text (still visible in the Emacs window) is in line 2, >> so why is mouse_face_overwritten_p already 0? > > This variable starts as zero. If update_window_line finds a line with > a mouse highlight, it sets it to one; otherwise it doesn't touch it. > So if _any_ line in the window has mouse highlight, this variable will > end up being 1; otherwise it will stay at zero. Hm, I have failed to find where its value becomes 1; every time I typed `p mouse_face_overwritten_p' while stepping over the code, the value was 0. I also tried `watch mouse_face_overwritten_p' at each update_window breakpoint: that found where the value was set to 0, but every other watchpoint was deleted unchanged after the program left the containing block. [...] > To know exactly where the highlighting disappeared, > keep stepping with 'n', even after you exit update_window, until you > find the source line that actually clears the highlighting. (Yes, it > could take a while, sorry, but I don't have a better suggestion.) > Then we will have our culprit, or at least the clue where to look for > it (since the line that clears the highlighting could be a call to > another function; then you'd need to step into it, etc.). Here's the protocol of an attempt to do this (with the Athena build of Emacs 24): Breakpoint 3, Fdelete_other_windows_internal (window=141560709, root=139227370) at /data/steve/bzr/emacs/quickfixes/src/window.c:2569 2569 w = decode_any_window (window); (gdb) br redisplay_internal Breakpoint 22 at 0x8084dee: file /data/steve/bzr/emacs/quickfixes/src/xdisp.c, line 12669. (gdb) c Continuing. Breakpoint 22, redisplay_internal () at /data/steve/bzr/emacs/quickfixes/src/xdisp.c:12669 12669 struct window *w = XWINDOW (selected_window); (gdb) br update_window Breakpoint 23 at 0x8059e53: file /data/steve/bzr/emacs/quickfixes/src/dispnew.c, line 3547. (gdb) c Continuing. Breakpoint 23, update_window (w=0x86c07f0, force_p=1) at /data/steve/bzr/emacs/quickfixes/src/dispnew.c:3547 3547 struct glyph_matrix *desired_matrix = w->desired_matrix; (gdb) c Continuing. Breakpoint 23, update_window (w=0x8700b80, force_p=1) at /data/steve/bzr/emacs/quickfixes/src/dispnew.c:3547 3547 struct glyph_matrix *desired_matrix = w->desired_matrix; (gdb) c Continuing. Breakpoint 23, update_window (w=0x8712ae0, force_p=1) at /data/steve/bzr/emacs/quickfixes/src/dispnew.c:3547 3547 struct glyph_matrix *desired_matrix = w->desired_matrix; (gdb) pp w->buffer # (gdb) n 3552 struct redisplay_interface *rif = FRAME_RIF (XFRAME (WINDOW_FRAME (w))); (gdb) fin Run till exit from #0 update_window (w=0x8712ae0, force_p=1) at /data/steve/bzr/emacs/quickfixes/src/dispnew.c:3552 0x080598af in update_window_tree (w=0x8712ae0, force_p=1) at /data/steve/bzr/emacs/quickfixes/src/dispnew.c:3355 3355 paused_p |= update_window (w, force_p); Value returned is $25 = 0 (gdb) n 3357 w = NILP (w->next) ? 0 : XWINDOW (w->next); (gdb) fin Run till exit from #0 update_window_tree (w=0x8712ae0, force_p=1) at /data/steve/bzr/emacs/quickfixes/src/dispnew.c:3357 0x08059692 in update_frame (f=0x8700a00, force_p=1, inhibit_hairy_id_p=0) at /data/steve/bzr/emacs/quickfixes/src/dispnew.c:3282 3282 paused_p = update_window_tree (root_window, force_p); Value returned is $26 = 0 (gdb) n 3283 update_end (f); (gdb) fin Run till exit from #0 update_frame (f=0x8700a00, force_p=1, inhibit_hairy_id_p=0) at /data/steve/bzr/emacs/quickfixes/src/dispnew.c:3283 0x08085fca in redisplay_internal () at /data/steve/bzr/emacs/quickfixes/src/xdisp.c:13213 13213 pending |= update_frame (f, 0, 0); Value returned is $27 = 0 (gdb) n 13214 f->updated_p = 1; (gdb) fin Run till exit from #0 redisplay_internal () at /data/steve/bzr/emacs/quickfixes/src/xdisp.c:13214 redisplay () at /data/steve/bzr/emacs/quickfixes/src/xdisp.c:12400 12400 } (gdb) n read_char (commandflag=1, nmaps=2, maps=0xbfffe6e0, prev_event=139227370, used_mouse_menu=0xbfffe7b8, end_time=0x0) at /data/steve/bzr/emacs/quickfixes/src/keyboard.c:2448 2448 if (!input_pending) (gdb) fin Run till exit from #0 read_char (commandflag=1, nmaps=2, maps=0xbfffe6e0, prev_event=139227370, used_mouse_menu=0xbfffe7b8, end_time=0x0) at /data/steve/bzr/emacs/quickfixes/src/keyboard.c:2448 Breakpoint 22, redisplay_internal () at /data/steve/bzr/emacs/quickfixes/src/xdisp.c:12669 12669 struct window *w = XWINDOW (selected_window); (gdb) n 12673 int must_finish = 0; (gdb) fin Run till exit from #0 redisplay_internal () at /data/steve/bzr/emacs/quickfixes/src/xdisp.c:12673 Breakpoint 23, update_window (w=0x8700b80, force_p=1) at /data/steve/bzr/emacs/quickfixes/src/dispnew.c:3547 3547 struct glyph_matrix *desired_matrix = w->desired_matrix; (gdb) pp w->buffer # (gdb) n 3552 struct redisplay_interface *rif = FRAME_RIF (XFRAME (WINDOW_FRAME (w))); (gdb) fin Run till exit from #0 update_window (w=0x8700b80, force_p=1) at /data/steve/bzr/emacs/quickfixes/src/dispnew.c:3552 0x080598af in update_window_tree (w=0x8700b80, force_p=1) at /data/steve/bzr/emacs/quickfixes/src/dispnew.c:3355 3355 paused_p |= update_window (w, force_p); Value returned is $28 = 0 (gdb) n 3357 w = NILP (w->next) ? 0 : XWINDOW (w->next); (gdb) fin Run till exit from #0 update_window_tree (w=0x8700b80, force_p=1) at /data/steve/bzr/emacs/quickfixes/src/dispnew.c:3357 0x08059692 in update_frame (f=0x8700a00, force_p=1, inhibit_hairy_id_p=0) at /data/steve/bzr/emacs/quickfixes/src/dispnew.c:3282 3282 paused_p = update_window_tree (root_window, force_p); Value returned is $29 = 0 (gdb) n 3283 update_end (f); (gdb) fin Run till exit from #0 update_frame (f=0x8700a00, force_p=1, inhibit_hairy_id_p=0) at /data/steve/bzr/emacs/quickfixes/src/dispnew.c:3283 0x080861f9 in redisplay_internal () at /data/steve/bzr/emacs/quickfixes/src/xdisp.c:13276 13276 pending = update_frame (sf, 0, 0); Value returned is $30 = 0 (gdb) n 13284 mini_window = FRAME_MINIBUF_WINDOW (sf); (gdb) fin Run till exit from #0 redisplay_internal () at /data/steve/bzr/emacs/quickfixes/src/xdisp.c:13284 redisplay_preserve_echo_area (from_where=7) at /data/steve/bzr/emacs/quickfixes/src/xdisp.c:13433 13433 if (FRAME_RIF (SELECTED_FRAME ()) != NULL (gdb) s 13434 && FRAME_RIF (SELECTED_FRAME ())->flush_display_optional) (gdb) 13435 FRAME_RIF (SELECTED_FRAME ())->flush_display_optional (NULL); (gdb) x_flush (f=0x0) at /data/steve/bzr/emacs/quickfixes/src/xterm.c:373 373 if (!NILP (Vinhibit_redisplay)) (gdb) 376 BLOCK_INPUT; (gdb) 377 if (f == NULL) (gdb) 380 FOR_EACH_FRAME (rest, frame) (gdb) 381 if (FRAME_X_P (XFRAME (frame))) (gdb) 382 x_flush (XFRAME (frame)); (gdb) x_flush (f=0x8700a00) at /data/steve/bzr/emacs/quickfixes/src/xterm.c:373 373 if (!NILP (Vinhibit_redisplay)) (gdb) 376 BLOCK_INPUT; (gdb) 377 if (f == NULL) (gdb) 384 else if (FRAME_X_P (f)) (gdb) 385 XFlush (FRAME_X_DISPLAY (f)); (gdb) 386 UNBLOCK_INPUT; When I hit RET at the gdb prompt before UNBLOCK_INPUT, the highlighting vanished. Steve Berman