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#24124: emacs terminal escape command error Date: Thu, 04 Aug 2016 20:07:16 +0300 Message-ID: <83shuklayj.fsf@gnu.org> References: <579F5E03.70201@member.fsf.org> <57A1EFD4.2060100@member.fsf.org> Reply-To: Eli Zaretskii NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Trace: blaine.gmane.org 1470330513 9106 195.159.176.226 (4 Aug 2016 17:08:33 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Thu, 4 Aug 2016 17:08:33 +0000 (UTC) Cc: 24124@debbugs.gnu.org To: modem Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Thu Aug 04 19:08:25 2016 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 1bVM82-0000T4-9W for geb-bug-gnu-emacs@m.gmane.org; Thu, 04 Aug 2016 19:08:18 +0200 Original-Received: from localhost ([::1]:41010 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bVM7y-0001Pm-Tr for geb-bug-gnu-emacs@m.gmane.org; Thu, 04 Aug 2016 13:08:14 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:32814) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bVM7t-0001NQ-9U for bug-gnu-emacs@gnu.org; Thu, 04 Aug 2016 13:08:10 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bVM7m-0001Zr-Jp for bug-gnu-emacs@gnu.org; Thu, 04 Aug 2016 13:08:08 -0400 Original-Received: from debbugs.gnu.org ([208.118.235.43]:58543) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bVM7m-0001Zk-GD for bug-gnu-emacs@gnu.org; Thu, 04 Aug 2016 13:08:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1bVM7m-0006db-Df for bug-gnu-emacs@gnu.org; Thu, 04 Aug 2016 13:08: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: Thu, 04 Aug 2016 17:08:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 24124 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 24124-submit@debbugs.gnu.org id=B24124.147033047025497 (code B ref 24124); Thu, 04 Aug 2016 17:08:02 +0000 Original-Received: (at 24124) by debbugs.gnu.org; 4 Aug 2016 17:07:50 +0000 Original-Received: from localhost ([127.0.0.1]:55840 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1bVM7Z-0006dA-Nu for submit@debbugs.gnu.org; Thu, 04 Aug 2016 13:07:49 -0400 Original-Received: from eggs.gnu.org ([208.118.235.92]:41708) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1bVM7X-0006cx-RN for 24124@debbugs.gnu.org; Thu, 04 Aug 2016 13:07:48 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bVM7P-0001VJ-57 for 24124@debbugs.gnu.org; Thu, 04 Aug 2016 13:07:42 -0400 Original-Received: from fencepost.gnu.org ([2001:4830:134:3::e]:37698) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bVM7P-0001V8-1q; Thu, 04 Aug 2016 13:07:39 -0400 Original-Received: from 84.94.185.246.cable.012.net.il ([84.94.185.246]:4265 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_128_CBC_SHA1:128) (Exim 4.82) (envelope-from ) id 1bVM7L-0004qw-M3; Thu, 04 Aug 2016 13:07:37 -0400 In-reply-to: <57A1EFD4.2060100@member.fsf.org> (message from modem on Wed, 3 Aug 2016 15:21:24 +0200) 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:121832 Archived-At: > From: modem > Date: Wed, 3 Aug 2016 15:21:24 +0200 > > > I think you disabled the wrong code. What you need is force Emacs to > > always do this: > > > > if (cost <= relcost)œ > > { /* really is cheaper */ > > emacs_tputs (tty, p, 1, cmputc); > > curY (tty) = row, curX (tty) = col; > > return; > > } > > Hi Eli, > > Thanks a lot. So I did another patch and another try. I can still > reproduce the bug. > > Any more advices on stuff I should try are welcomed ;-) I'm stumped. It could be some problem with some other piece of software, not with Emacs. Is there someone you could ask to produce a human-readable description of the command Emacs sent to the terminal driver, both in the "good" and in the "bad" cases? I mean this citation which you brought originally, but without any details: > I am attaching a snippet of the technical detail about this issue : > > > When you ^Z, tmux gets 112 bytes in all cases: > > > > input_parse: %0 ground, 40 bytes: > \n\n\033[K\033[?1l\033>\033[34h\033[?25h\033[?1049l\033[39;49m\r > > input_parse: %0 ground, 72 bytes: \r\n[1]+ Stopped > emacs large_text_file.txt\r\nroot@milu:~# > > > > \033[?1049l is rmcup which exits cursor positioning (alternate > screen) mode. > > > > Then when you type fg, it gets: > > > > input_parse: %0 ground, 694 bytes: > \033[?1049h\033[34l\033[?1h\033=\033[24;1H\033[K\033[H\033[?25l\033[3mFile > Edit Options Buffers ... > > > > \033[?1049h is smcup which turns it on again. > > > > But sometimes, it gets: > > > > input_parse: %0 ground, 674 bytes: > \033[24;1H\033[K\033[H\033[?25l\033[3mFile Edit Options Buffers ... > > > > Where emacs is not sending \033[1049h, or in fact any of the smcup, > > cvvis, smkx sequence it normally sends. It would be nice to be able to understand what was meant by whoever wrote this, as smcup, cvvis, etc. don't tell me much (I'm not a terminfo expert). Thanks.