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#17497: 24.4.50; TTY menu glitches Date: Wed, 04 Jun 2014 20:10:50 +0300 Message-ID: <83bnu87g85.fsf@gnu.org> References: <20140531200947.GA779@aerie.jexium-island.net> <83lhtgbrd6.fsf@gnu.org> <20140601152657.GA15078@aerie.jexium-island.net> <838upgbnra.fsf@gnu.org> <20140601171244.GA9362@aerie.jexium-island.net> <20140601171817.GB9362@aerie.jexium-island.net> <20140603184749.GA3646@aerie.jexium-island.net> <20140604083102.GA4928@aerie.jexium-island.net> <20140604091017.GB4928@aerie.jexium-island.net> <838upd816r.fsf@gnu.org> <41d2eo3bd5.fsf@fencepost.gnu.org> Reply-To: Eli Zaretskii NNTP-Posting-Host: plane.gmane.org X-Trace: ger.gmane.org 1401901970 25550 80.91.229.3 (4 Jun 2014 17:12:50 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Wed, 4 Jun 2014 17:12:50 +0000 (UTC) Cc: 17497@debbugs.gnu.org, dickey@his.com To: Glenn Morris Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Wed Jun 04 19:12:43 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 1WsEjZ-0005qU-Fk for geb-bug-gnu-emacs@m.gmane.org; Wed, 04 Jun 2014 19:12:17 +0200 Original-Received: from localhost ([::1]:35427 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WsEjY-0005tf-W8 for geb-bug-gnu-emacs@m.gmane.org; Wed, 04 Jun 2014 13:12:17 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:52822) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WsEjP-0005jG-V8 for bug-gnu-emacs@gnu.org; Wed, 04 Jun 2014 13:12:12 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1WsEjK-0005A3-RN for bug-gnu-emacs@gnu.org; Wed, 04 Jun 2014 13:12:07 -0400 Original-Received: from debbugs.gnu.org ([140.186.70.43]:45325) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WsEjK-00059l-OH for bug-gnu-emacs@gnu.org; Wed, 04 Jun 2014 13:12:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.80) (envelope-from ) id 1WsEjK-0002sd-DU for bug-gnu-emacs@gnu.org; Wed, 04 Jun 2014 13:12:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Wed, 04 Jun 2014 17:12:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 17497 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 17497-submit@debbugs.gnu.org id=B17497.140190186710943 (code B ref 17497); Wed, 04 Jun 2014 17:12:02 +0000 Original-Received: (at 17497) by debbugs.gnu.org; 4 Jun 2014 17:11:07 +0000 Original-Received: from localhost ([127.0.0.1]:44199 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1WsEiN-0002qJ-Hq for submit@debbugs.gnu.org; Wed, 04 Jun 2014 13:11:07 -0400 Original-Received: from mtaout21.012.net.il ([80.179.55.169]:60288) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1WsEiK-0002pj-Ni for 17497@debbugs.gnu.org; Wed, 04 Jun 2014 13:11:02 -0400 Original-Received: from conversion-daemon.a-mtaout21.012.net.il by a-mtaout21.012.net.il (HyperSendmail v2007.08) id <0N6N00300LG3UT00@a-mtaout21.012.net.il> for 17497@debbugs.gnu.org; Wed, 04 Jun 2014 20:10:53 +0300 (IDT) Original-Received: from HOME-C4E4A596F7 ([87.69.4.28]) by a-mtaout21.012.net.il (HyperSendmail v2007.08) with ESMTPA id <0N6N003POME5UY40@a-mtaout21.012.net.il>; Wed, 04 Jun 2014 20:10:53 +0300 (IDT) In-reply-to: <41d2eo3bd5.fsf@fencepost.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:89993 Archived-At: > From: Glenn Morris > Cc: Thomas Dickey , monnier@iro.umontreal.ca, 17497@debbugs.gnu.org > Date: Wed, 04 Jun 2014 12:09:26 -0400 > > Eli Zaretskii wrote: > > > On the hunch that the problems discussed here are caused by excess > > movement of the cursor, I've made changes in revision 117203 on the > > emacs-24 branch to avoid some of them. Please try that. > > Sorry, still glitches. :( If you put a breakpoint in update_frame and in update_frame_with_menu, like shown below, how many calls do you see when you press an arrow key (or C-n/C-p) that produces a glitch? I expect 1 call to update_frame_with_menu followed by one call to update_frame. Here's a GDB session on fencepost to show what I see: (gdb) break update_frame Breakpoint 1 at 0x41b605: file dispnew.c, line 3006. (gdb) commands Type commands for breakpoint(s) 3, one per line. End with a line saying just "end". >continue >end (gdb) break update_frame_with_menu Breakpoint 2 at 0x41b81b: file dispnew.c, line 3112. (gdb) commands Type commands for breakpoint(s) 4, one per line. End with a line saying just "end". >continue >end (gdb) c Continuing. Breakpoint 1, update_frame (f=0xd3e808, force_p=false, inhibit_hairy_id_p=false) at dispnew.c:3006 3006 struct window *root_window = XWINDOW (f->root_window); Breakpoint 2, update_frame_with_menu (f=0xd3e808, row=-1, col=-1) at dispnew.c:3112 3112 struct window *root_window = XWINDOW (f->root_window); Breakpoint 2, update_frame_with_menu (f=0xd3e808, row=0, col=0) at dispnew.c:3112 3112 struct window *root_window = XWINDOW (f->root_window); Breakpoint 2, update_frame_with_menu (f=0xd3e808, row=1, col=0) at dispnew.c:3112 3112 struct window *root_window = XWINDOW (f->root_window); Breakpoint 1, update_frame (f=0xd3e808, force_p=true, inhibit_hairy_id_p=true) at dispnew.c:3006 3006 struct window *root_window = XWINDOW (f->root_window); Breakpoint 2, update_frame_with_menu (f=0xd3e808, row=2, col=0) at dispnew.c:3112 3112 struct window *root_window = XWINDOW (f->root_window); Breakpoint 1, update_frame (f=0xd3e808, force_p=true, inhibit_hairy_id_p=true) at dispnew.c:3006 3006 struct window *root_window = XWINDOW (f->root_window); Breakpoint 2, update_frame_with_menu (f=0xd3e808, row=3, col=0) at dispnew.c:3112 3112 struct window *root_window = XWINDOW (f->root_window); Breakpoint 1, update_frame (f=0xd3e808, force_p=true, inhibit_hairy_id_p=true) at dispnew.c:3006 3006 struct window *root_window = XWINDOW (f->root_window); Breakpoint 2, update_frame_with_menu (f=0xd3e808, row=2, col=0) at dispnew.c:3112 3112 struct window *root_window = XWINDOW (f->root_window); Breakpoint 1, update_frame (f=0xd3e808, force_p=true, inhibit_hairy_id_p=true) at dispnew.c:3006 3006 struct window *root_window = XWINDOW (f->root_window); Explanations: . first, a call to update_frame is because menu-bar-open calls 'redisplay' . next, a call to update_frame_with_menu which comes from the beginning of tty_menu_activate, line 3230 of term.c . another call to update_frame_with_menu, to display the "File >" header of the File menu. . yet another call to update_frame_with_menu to display the first menu item (Visit New File) in red background . finally, a call to update_frame to display the help-echo for "Visit New File" Thereafter, for each keypress of an arrow key, there's always 1 call to update_frame_with_menu, to display a different menu item in the red background (see the values of row and col arguments, which identify the menu item), followed by a single call to update_frame to display the help echo. Do you see any calls to update_frame beyond what I described? If so, perhaps they are the reason the cursor gets back to the EOB of the underlying buffer. TIA