From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.bugs Subject: bug#17497: The text-mode menu looks very broken in emacs-24 Date: Sat, 07 Oct 2017 14:41:08 +0300 Message-ID: <83r2uftcbv.fsf@gnu.org> References: <5374B271.50803@yandex.ru> <83a8zaxnrx.fsf@gnu.org> <837fuexmbk.fsf@gnu.org> <83y3onthzh.fsf@gnu.org> Reply-To: Eli Zaretskii NNTP-Posting-Host: blaine.gmane.org X-Trace: blaine.gmane.org 1507376540 2006 195.159.176.226 (7 Oct 2017 11:42:20 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Sat, 7 Oct 2017 11:42:20 +0000 (UTC) Cc: 17497@debbugs.gnu.org To: martin.trojer@gmail.com Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Sat Oct 07 13:42:13 2017 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1e0nUi-00077z-7A for geb-bug-gnu-emacs@m.gmane.org; Sat, 07 Oct 2017 13:42:12 +0200 Original-Received: from localhost ([::1]:49253 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1e0nUj-0007Hq-B2 for geb-bug-gnu-emacs@m.gmane.org; Sat, 07 Oct 2017 07:42:13 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:43051) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1e0nUc-0007Hl-Sk for bug-gnu-emacs@gnu.org; Sat, 07 Oct 2017 07:42:07 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1e0nUX-00029w-WE for bug-gnu-emacs@gnu.org; Sat, 07 Oct 2017 07:42:06 -0400 Original-Received: from debbugs.gnu.org ([208.118.235.43]:45118) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1e0nUX-00029l-Tj for bug-gnu-emacs@gnu.org; Sat, 07 Oct 2017 07:42:01 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1e0nUX-00063x-NE for bug-gnu-emacs@gnu.org; Sat, 07 Oct 2017 07:42:01 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 07 Oct 2017 11:42:01 +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: patch Original-Received: via spool by 17497-submit@debbugs.gnu.org id=B17497.150737648723256 (code B ref 17497); Sat, 07 Oct 2017 11:42:01 +0000 Original-Received: (at 17497) by debbugs.gnu.org; 7 Oct 2017 11:41:27 +0000 Original-Received: from localhost ([127.0.0.1]:53799 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1e0nTy-000632-Vl for submit@debbugs.gnu.org; Sat, 07 Oct 2017 07:41:27 -0400 Original-Received: from eggs.gnu.org ([208.118.235.92]:51993) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1e0nTx-00062o-HB for 17497@debbugs.gnu.org; Sat, 07 Oct 2017 07:41:25 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1e0nTm-0001tv-TX for 17497@debbugs.gnu.org; Sat, 07 Oct 2017 07:41:19 -0400 Original-Received: from fencepost.gnu.org ([2001:4830:134:3::e]:45926) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1e0nTm-0001tm-Qg; Sat, 07 Oct 2017 07:41:14 -0400 Original-Received: from 84.94.185.246.cable.012.net.il ([84.94.185.246]:2529 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1e0nTm-0005w0-7S; Sat, 07 Oct 2017 07:41:14 -0400 In-reply-to: <83y3onthzh.fsf@gnu.org> (message from Eli Zaretskii on Sat, 07 Oct 2017 12:38:58 +0300) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 208.118.235.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" Xref: news.gmane.org gmane.emacs.bugs:138043 Archived-At: > Date: Sat, 07 Oct 2017 12:38:58 +0300 > From: Eli Zaretskii > Cc: 17497@debbugs.gnu.org > > > Date: Wed, 18 Mar 2015 17:13:13 +0000 > > From: Martin Trojer > > Cc: 17497@debbugs.gnu.org > > > > From bdff1ff98d02f4307659c052d0b35a40a36f0706 Mon Sep 17 00:00:00 2001 > > From: Martin Trojer > > Date: Wed, 18 Mar 2015 11:44:02 +0000 > > Subject: [PATCH] emacs bug #17497 fix > > > > --- > > src/cm.c | 10 ++++++++++ > > 1 file changed, 10 insertions(+) > > > > diff --git a/src/cm.c b/src/cm.c > > index 474f280..ed17447 100644 > > --- a/src/cm.c > > +++ b/src/cm.c > > @@ -371,6 +371,16 @@ cmgoto (struct tty_display_info *tty, int row, int col) > > dcm = tty->Wcm->cm_abs; > > } > > > > + /* only use direct moves */ > > + cost = 0; > > + p = (dcm == tty->Wcm->cm_habs > > + ? tgoto (dcm, row, col) > > + : tgoto (dcm, col, row)); > > + emacs_tputs (tty, p, 1, evalcost); > > + emacs_tputs (tty, p, 1, cmputc); > > + curY (tty) = row, curX (tty) = col; > > + return; > > + > > /* > > * In the following comparison, the = in <= is because when the costs > > * are the same, it looks nicer (I think) to move directly there. > > I now do see this problem on a GNU/Linux system to which I have > access, but applying this patch didn't solve the problem... Some debugging indicates that somehow the cursor is sometimes moved behind our backs, when a frame with a TTY menu is being updated. So I installed a semi-kludgey workaround that seems to fix 99% of the glitches. Since I don't really understand why this change is needed, and because of the 1% of glitches that still happen, I'm not closing the bug, and will continue looking into this. If someone knows which display ops could move the cursor without going through cursor_to, please tell. I hope the solution is not limited to the one system where I see this problem. People who experienced the problem are encouraged to try the latest release branch and report the results here.