From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Christopher Schmidt Newsgroups: gmane.emacs.bugs Subject: bug#17588: 24.3.91; mouse-face glitchy Date: Wed, 28 May 2014 16:15:25 -0400 (EDT) Message-ID: <87y4xl3bjb@ristopher.com> References: <87lhtpwuh5@ristopher.com> <83a9a5k6dw.fsf@gnu.org> <87ppj1sjz9@ristopher.com> <837g59jmd2.fsf@gnu.org> <874n0dkkdz@ristopher.com> <8361ksk0ug.fsf@gnu.org> <87mwe4cn20@ristopher.com> <83tx8chrkn.fsf@gnu.org> <87egzf7klh@ristopher.com> <83lhtni4xv.fsf@gnu.org> <87sinu2ilw@ristopher.com> <83zji1hhn2.fsf@gnu.org> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: ger.gmane.org 1401308178 13857 80.91.229.3 (28 May 2014 20:16:18 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Wed, 28 May 2014 20:16:18 +0000 (UTC) To: 17588@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Wed May 28 22:16:11 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 1WpkGh-0001HU-5Q for geb-bug-gnu-emacs@m.gmane.org; Wed, 28 May 2014 22:16:11 +0200 Original-Received: from localhost ([::1]:44712 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WpkGe-0002aD-GD for geb-bug-gnu-emacs@m.gmane.org; Wed, 28 May 2014 16:16:08 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:58849) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WpkGZ-0002Zu-EV for bug-gnu-emacs@gnu.org; Wed, 28 May 2014 16:16:04 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1WpkGY-0000x4-33 for bug-gnu-emacs@gnu.org; Wed, 28 May 2014 16:16:03 -0400 Original-Received: from debbugs.gnu.org ([140.186.70.43]:35973) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WpkGY-0000wy-0D for bug-gnu-emacs@gnu.org; Wed, 28 May 2014 16:16:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.80) (envelope-from ) id 1WpkGX-0005Sq-Mg for bug-gnu-emacs@gnu.org; Wed, 28 May 2014 16:16:01 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Christopher Schmidt Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Wed, 28 May 2014 20:16:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 17588 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: X-Debbugs-Original-To: bug-gnu-emacs@gnu.org Original-Received: via spool by submit@debbugs.gnu.org id=B.140130815120985 (code B ref -1); Wed, 28 May 2014 20:16:01 +0000 Original-Received: (at submit) by debbugs.gnu.org; 28 May 2014 20:15:51 +0000 Original-Received: from localhost ([127.0.0.1]:34850 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1WpkGM-0005SO-GN for submit@debbugs.gnu.org; Wed, 28 May 2014 16:15:51 -0400 Original-Received: from eggs.gnu.org ([208.118.235.92]:56961) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1WpkGK-0005SC-Cn for submit@debbugs.gnu.org; Wed, 28 May 2014 16:15:49 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1WpkGC-0000ob-1b for submit@debbugs.gnu.org; Wed, 28 May 2014 16:15:43 -0400 Original-Received: from lists.gnu.org ([2001:4830:134:3::11]:44939) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WpkGB-0000o6-JJ for submit@debbugs.gnu.org; Wed, 28 May 2014 16:15:39 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:58616) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WpkGA-00022H-3j for bug-gnu-emacs@gnu.org; Wed, 28 May 2014 16:15:39 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1WpkG8-0000n1-5j for bug-gnu-emacs@gnu.org; Wed, 28 May 2014 16:15:37 -0400 Original-Received: from ristopher.com ([2a00:d880:3:2::cf4:fc91]:60952) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WpkG7-0000mO-Jd for bug-gnu-emacs@gnu.org; Wed, 28 May 2014 16:15:35 -0400 Original-Received: by ristopher.com (Postfix, from userid 0) id A14D620742; Wed, 28 May 2014 16:15:32 -0400 (EDT) In-Reply-To: <83zji1hhn2.fsf@gnu.org> (Eli Zaretskii's message of "Wed, 28 May 2014 21:39:45 +0300") Mail-Followup-To: bug-gnu-emacs@gnu.org X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). 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:89640 Archived-At: Eli Zaretskii writes: >> From: Christopher Schmidt >> Date: Wed, 28 May 2014 08:27:57 -0400 (EDT) >> >> (gdb) bt >> #0 clear_mouse_face (hlinfo=hlinfo@entry=0x1394780) >> at xdisp.c:27495 >> #1 0x0000000000457fef in note_mouse_highlight ( >> f=f@entry=0x1129898, x=494, y=378) at xdisp.c:28812 > ^^^^^ > Does this large value of x make sense? AFAIU, you are in the lower > window showing the buffer rms2, and you move the mouse above the text > in that window. The text lines in that buffer are very short, so I > wonder how come you get such a large value of the x coordinate. You've got me there. This is what I use for testing: (run-at-time nil 0.01 (lambda () (with-current-buffer (get-buffer-create "rms") (with-silent-modifications (dotimes (_ 10) (insert (if (= (random 2) 1) "gpl" "fsf") "\n")) (when (> (- (point-max) (point-min)) 100) (delete-region (point-min) (+ (point-min) 100))))))) (with-current-buffer (get-buffer-create "rms2") (dotimes (i 1000) (insert (propertize (format "%3d%3d%3d" i i i) 'mouse-face 'highlight) "\n"))) (with-selected-window (split-window-below) (with-selected-window (split-window-right) (switch-to-buffer "rms2")) (switch-to-buffer "rms2")) (with-selected-window (split-window-right) (switch-to-buffer "rms")) The snippet is loaded at startup via the --load option. As startup.el claims the first window to display the initial buffer, I switched to a four window setup. > So are you saying that clear_mouse_face is never called with non-nil > hlinfo->mouse_face_window? IOW, if you put a conditional breakpoint > in clear_mouse_face, like this: > > (gdb) break clear_mouse_face if hlinfo->mouse_face_window != Qnil > > then this breakpoint never breaks, is that right? Yes, it never breaks. > If so, I'd like to see which code resets mouse_face_window to nil, > after it is set by show_mouse_face. (We know that it must be set by > show_mouse_face because you do see the highlighting when the mouse is > above text with mouse-face.) To this end, set a breakpoint in > show_mouse_face, like this: > > (gdb) break show_mouse_face if draw == DRAW_MOUSE_FACE The watchpoint is triggered in turns as part of the following two contexts. Qnil is 12026738. Hardware watchpoint 12: -location hlinfo->mouse_face_window Old value = 12026738 New value = 18193773 mouse_face_from_buffer_pos (disp_string=12026738, after_string=12026738, before_string=12026738, end_charpos=, start_charpos=6711, mouse_charpos=6717, hlinfo=, window=18193773) at xdisp.c:28062 28062 !hlinfo->mouse_face_hidden, -1); #0 mouse_face_from_buffer_pos (disp_string=12026738, after_string=12026738, before_string=12026738, end_charpos=, start_charpos=6711, mouse_charpos=6717, hlinfo=, window=18193773) at xdisp.c:28062 #1 note_mouse_highlight (f=f@entry=0x1129898, x=, y=) at xdisp.c:29151 #2 0x00000000004b4b86 in note_mouse_movement (frame=frame@entry=0x1129898, event=event@entry=0x7fffffffdc80) at xterm.c:3887 #3 0x00000000004bcb09 in handle_one_xevent (dpyinfo=dpyinfo@entry=0x1396000, event=event@entry=0x7fffffffdc80, finish=finish@entry=0xb071e0, hold_quit=0x7fffffffdea0) at xterm.c:6644 #4 0x00000000004be320 in event_handler_gdk (gxev=0x7fffffffdc80, ev=, data=) at xterm.c:5720 #5 0x00007ffff65cca2a in ?? () from /usr/lib/x86_64-linux-gnu/libgdk-x11-2.0.so.0 #6 0x00007ffff65ce6f6 in ?? () from /usr/lib/x86_64-linux-gnu/libgdk-x11-2.0.so.0 #7 0x00007ffff65ce77e in ?? () from /usr/lib/x86_64-linux-gnu/libgdk-x11-2.0.so.0 #8 0x00007ffff4a89355 in g_main_context_dispatch () from /lib/x86_64-linux-gnu/libglib-2.0.so.0 #9 0x00007ffff4a89688 in ?? () from /lib/x86_64-linux-gnu/libglib-2.0.so.0 #10 0x00007ffff4a89744 in g_main_context_iteration () from /lib/x86_64-linux-gnu/libglib-2.0.so.0 #11 0x00007ffff69609a1 in gtk_main_iteration () from /usr/lib/x86_64-linux-gnu/libgtk-x11-2.0.so.0 #12 0x00000000004b6d82 in XTread_socket (terminal=, hold_quit=0x7fffffffdea0) at xterm.c:7013 #13 0x00000000004e8be1 in gobble_input () at keyboard.c:6849 #14 0x00000000004e8605 in handle_async_input () at keyboard.c:7089 #15 process_pending_signals () at keyboard.c:7103 #16 0x0000000000590e6e in wait_reading_process_output ( time_limit=time_limit@entry=30, nsecs=nsecs@entry=0, read_kbd=read_kbd@entry=-1, do_display=do_display@entry=true, wait_for_cell=12026738, wait_proc=wait_proc@entry=0x0, just_wait_proc=0) at process.c:4340 #17 0x000000000041f363 in sit_for (timeout=, reading=reading@entry=true, display_option=display_option@entry=1) at dispnew.c:5805 #18 0x00000000004eca63 in read_char (commandflag=1, map=map@entry=19249734, prev_event=12026738, used_mouse_menu=used_mouse_menu@entry=0x7fffffffe58b, end_time=end_time@entry=0x0) at keyboard.c:2809 #19 0x00000000004edc75 in read_key_sequence (keybuf=keybuf@entry=0x7fffffffe660, prompt=12026738, dont_downcase_last=dont_downcase_last@entry=false, can_return_switch_frame=can_return_switch_frame@entry=true, fix_current_buffer=fix_current_buffer@entry=true, prevent_redisplay=prevent_redisplay@entry=false, bufsize=30) at keyboard.c:9087 #20 0x00000000004ef950 in command_loop_1 () at keyboard.c:1452 #21 0x0000000000550977 in internal_condition_case ( bfun=bfun@entry=0x4ef760 , handlers=, hfun=hfun@entry=0x4e6bf0 ) at eval.c:1354 #22 0x00000000004e234e in command_loop_2 (ignore=ignore@entry=12026738) at keyboard.c:1177 #23 0x000000000055085b in internal_catch (tag=12073890, func=func@entry=0x4e2330 , arg=12026738) at eval.c:1118 #24 0x00000000004e6807 in command_loop () at keyboard.c:1156 #25 recursive_edit_1 () at keyboard.c:777 #26 0x00000000004e6b20 in Frecursive_edit () at keyboard.c:848 #27 0x0000000000415ab9 in main (argc=0, argv=0x7fffffffe9a8) at emacs.c:1646 Hardware watchpoint 12: -location hlinfo->mouse_face_window Old value = 18193773 New value = 12026738 reset_mouse_highlight (hlinfo=0x13960a0) at dispextern.h:2725 2725 hlinfo->mouse_face_overlay = Qnil; #0 reset_mouse_highlight (hlinfo=0x13960a0) at dispextern.h:2725 #1 x_update_window_end (w=0x1139998, cursor_on_p=, mouse_face_overwritten_p=) at xterm.c:600 #2 0x000000000041b17d in update_window (w=w@entry=0x1139998, force_p=, force_p@entry=true) at dispnew.c:3486 #3 0x000000000041c3fb in update_window_tree (w=0x1139998, force_p=force_p@entry=true) at dispnew.c:3161 #4 0x000000000041c3ee in update_window_tree (w=0x1144a48, force_p=force_p@entry=true) at dispnew.c:3159 #5 0x000000000041c3ee in update_window_tree (w=w@entry=0x1148c60, force_p=force_p@entry=true) at dispnew.c:3159 #6 0x000000000041e59d in update_frame (f=0x1129898, force_p=, inhibit_hairy_id_p=) at dispnew.c:3059 #7 0x000000000044c0df in redisplay_internal () at xdisp.c:13844 #8 0x000000000044e0d0 in redisplay_preserve_echo_area ( from_where=from_where@entry=9) at xdisp.c:14058 #9 0x00000000005902a8 in wait_reading_process_output ( time_limit=time_limit@entry=30, nsecs=nsecs@entry=0, read_kbd=read_kbd@entry=-1, do_display=do_display@entry=true, wait_for_cell=12026738, wait_proc=wait_proc@entry=0x0, just_wait_proc=0) at process.c:4398 #10 0x000000000041f363 in sit_for (timeout=, reading=reading@entry=true, display_option=display_option@entry=1) at dispnew.c:5805 #11 0x00000000004eca63 in read_char (commandflag=1, map=map@entry=19249734, prev_event=12026738, used_mouse_menu=used_mouse_menu@entry=0x7fffffffe58b, end_time=end_time@entry=0x0) at keyboard.c:2809 #12 0x00000000004edc75 in read_key_sequence (keybuf=keybuf@entry=0x7fffffffe660, prompt=12026738, dont_downcase_last=dont_downcase_last@entry=false, can_return_switch_frame=can_return_switch_frame@entry=true, fix_current_buffer=fix_current_buffer@entry=true, prevent_redisplay=prevent_redisplay@entry=false, bufsize=30) at keyboard.c:9087 #13 0x00000000004ef950 in command_loop_1 () at keyboard.c:1452 #14 0x0000000000550977 in internal_condition_case ( bfun=bfun@entry=0x4ef760 , handlers=, hfun=hfun@entry=0x4e6bf0 ) at eval.c:1354 #15 0x00000000004e234e in command_loop_2 (ignore=ignore@entry=12026738) at keyboard.c:1177 #16 0x000000000055085b in internal_catch (tag=12073890, func=func@entry=0x4e2330 , arg=12026738) at eval.c:1118 #17 0x00000000004e6807 in command_loop () at keyboard.c:1156 #18 recursive_edit_1 () at keyboard.c:777 #19 0x00000000004e6b20 in Frecursive_edit () at keyboard.c:848 #20 0x0000000000415ab9 in main (argc=0, argv=0x7fffffffe9a8) at emacs.c:1646