[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

address@hidden: One display problem and one M-x problem]

From: Richard Stallman
Subject: address@hidden: One display problem and one M-x problem]
Date: Sun, 22 Aug 2004 12:52:45 -0400

Can people work on these two problems?  Please ack to me.

------- Start of forwarded message -------
X-Injected-Via-Gmane: http://gmane.org/
To: address@hidden
From: Mark Plaksin <address@hidden>
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: address@hidden
X-Spam-Status: No, hits=0.0 required=5.0
X-Spam-Checker-Version: SpamAssassin 2.55 (

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:
- - C-l ;; and the extras go away and Emacs displays what you expected to see in
the first place.   Like this:

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':

# 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

 (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.


Emacs-pretest-bug mailing list
------- End of forwarded message -------

reply via email to

[Prev in Thread] Current Thread [Next in Thread]