From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: Richard Stallman Newsgroups: gmane.emacs.devel Subject: [happy@mcplaksin.org: One display problem and one M-x problem] Date: Sun, 22 Aug 2004 12:52:45 -0400 Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Message-ID: Reply-To: rms@gnu.org NNTP-Posting-Host: deer.gmane.org X-Trace: sea.gmane.org 1093193667 17620 80.91.224.253 (22 Aug 2004 16:54:27 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Sun, 22 Aug 2004 16:54:27 +0000 (UTC) Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Sun Aug 22 18:54:22 2004 Return-path: Original-Received: from lists.gnu.org ([199.232.76.165]) by deer.gmane.org with esmtp (Exim 3.35 #1 (Debian)) id 1Byvbq-0000I7-00 for ; Sun, 22 Aug 2004 18:54:22 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.33) id 1ByvgG-0005tf-38 for ged-emacs-devel@m.gmane.org; Sun, 22 Aug 2004 12:58:56 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.33) id 1ByvfC-0005Uy-CR for emacs-devel@gnu.org; Sun, 22 Aug 2004 12:57:50 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.33) id 1ByvfB-0005Ub-GC for emacs-devel@gnu.org; Sun, 22 Aug 2004 12:57:49 -0400 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.33) id 1ByvfB-0005Sq-0l for emacs-devel@gnu.org; Sun, 22 Aug 2004 12:57:49 -0400 Original-Received: from [199.232.76.164] (helo=fencepost.gnu.org) by monty-python.gnu.org with esmtp (Exim 4.34) id 1ByvaI-0003eE-2f for emacs-devel@gnu.org; Sun, 22 Aug 2004 12:52:46 -0400 Original-Received: from rms by fencepost.gnu.org with local (Exim 4.34) id 1ByvaH-0003Bs-KF; Sun, 22 Aug 2004 12:52:45 -0400 Original-To: emacs-devel@gnu.org X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: main.gmane.org gmane.emacs.devel:26408 X-Report-Spam: http://spam.gmane.org/gmane.emacs.devel:26408 Can people work on these two problems? Please ack to me. ------- Start of forwarded message ------- X-Injected-Via-Gmane: http://gmane.org/ To: emacs-pretest-bug@gnu.org From: Mark Plaksin Date: Sat, 21 Aug 2004 13:40:46 -0400 X-Gmane-NNTP-Posting-Host: water.tss.usg.edu Cancel-Lock: sha1:bTsTRDBlvdrD1WAKgU46n4gkqeQ= Subject: One display problem and one M-x problem Sender: emacs-pretest-bug-bounces+rms=gnu.org@gnu.org X-Spam-Status: No, hits=0.0 required=5.0 tests=RCVD_IN_ORBS,USER_AGENT_GNUS_UA version=2.55 X-Spam-Level: X-Spam-Checker-Version: SpamAssassin 2.55 (1.174.2.19-2003-05-19-exp) CVS Emacs running on Debian unstable recently (in the past month or so) started misbehaving when running vi inside M-x term. Emacs seems to add an extra newline at the end of lines. I found two problems while trying to fix it. Since I haven't found a fix for (1), I'm not sure if it is the cause of the vi-in-term problem but it seems likely. 1) The first problem isn't related to M-x term at all. It's more general. To reproduce: - - Run emacs -q in X. My window was 83x40. - - a ;; Type the letter a to mark the beginning of the line - - M-: (insert-char ?b 50000) - - a ;; Another a to mark the end of the line - - C-a ;; to get to the beginning of the giant line - - ESC 1 0 0 C-f ;; to put the cursor somewhere in the middle of the second row of b's. - - C-SPC - - ESC > - - C-b ;; to put the cursor on the final a. - - C-w - - ;; At this point, a is in the upper left corner of the window. - - C-p ;; Now the display will contain a spurious newline and a spurious a. Like this: http://mcplaksin.org/happy/before.png - - C-l ;; and the extras go away and Emacs displays what you expected to see in the first place. Like this: http://mcplaksin.org/happy/after.png Since C-l fixes it and that's in the C source, I think I'm helpless to help solve this. Let me know if there's more I can do. 2) term inserts a spurious newline if the first command run inside the term sends ESC[?47h (this just happens to be the first thing vim sends when run inside M-x term). To reproduce: - - Create a short shell script called 'testy': #!/bin/sh # Instead of ESC, use a real ESC character echo -n 'ESC[?47h' - - emacs -q - - M-x term RET - - ./testy The newline is inserted by the following code from term-switch-to-alternate-sub-buffer which is called from term-handle-ansi-escape: (if (not (eq (preceding-char) ?\n)) (term-insert-char ?\n 1)) I don't quite get what term-switch-to-alternate-sub-buffer is trying to do so I don't know how to help further. The problem goes away if I make term-switch-to-alternate-sub-buffer do nothing at all; because of (1) above, I'm not sure whether this change results in the problem described in term-switch-to-alternate-sub-buffer's comment: ;; If asked to switch to (from) the alternate sub-buffer, and already (not) ;; using it, do nothing. This test is needed for some programs (including ;; Emacs) that emit the ti termcap string twice, for unknown reason. Thanks! _______________________________________________ Emacs-pretest-bug mailing list Emacs-pretest-bug@gnu.org http://lists.gnu.org/mailman/listinfo/emacs-pretest-bug ------- End of forwarded message -------