[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: address@hidden: ansi-term \e[J causes spurious newline [revised repo
From: |
Dan Nicolaescu |
Subject: |
Re: address@hidden: ansi-term \e[J causes spurious newline [revised report]] |
Date: |
Wed, 21 Mar 2007 11:40:48 -0700 |
Chong Yidong <address@hidden> writes:
> > From: Rich Felker <address@hidden>
> > Subject: ansi-term \e[J causes spurious newline [revised report]
> > To: address@hidden
> >
> > On versions of GNU emacs I have tested (21.1 and cvs unicode-2
> > branch), the "ansi-term" terminal emulator (M-x ansi-term) exhibits
> > incorrect terminal behavior when given the ESC [ J sequence. In
> > addition to clearing to the end of the screen, it moves the cursor to
> > the beginning of the next line if the cursor is not already at the
> > beginning of a line. To test this, use the following shell command
> > from a shell running in ansi-term:
> >
> > echo -e 'hello\e[Jworld'
> >
> > On a vt100/ansi/ecma compatible terminal, this should leave
> > "helloworld" visible on the screen, with everything afterward cleared.
> > On GNU emacs' ansi-term, it prints hello on one line and world on the
> > next, after clearing to the end of the screen.
> >
> > Removing the calls to term-unwrap-line from term-erase-in-display (in
> > term.el) fixes the problem, but I don't know if this has any bad
> > side-effects.
In general tests using "echo" are not good enough, the correct way to
do it is to use "tput", there are some subtleties involved...
I cannot reproduce this problem using tput.
> Looking through the code, I think the calls to term-unwrap-line should
> be removed. The note in the docstring of term-erase-in-display that
> it "should only be called when point is at the start of a screen line"
> is also false; this condition generally doesn't hold in situations
\e[J is the terminfo "ed" string, the terminfo manual says:
Ed is only defined from the first column of a line. (Thus, it
can be simulated by a request to delete a large number of
lines, if a true ed is not available.)
So I think that the code is correct. (and the behavior requested by
the echo command above is undefined).
> where this function is called, and if we remove the term-unwrap-line
> calls, it's not necessary at all.
> Cursory testing seems to indicate that ansi-term behaves fine without
> the term-unwrap-line calls.
>
> What do you think?
I think that nothing should be changed. If the problem can be
reproduced using tput, then I can look into it.
--dan
- address@hidden: ansi-term \e[J causes spurious newline [revised report]], Richard Stallman, 2007/03/19
- Re: address@hidden: ansi-term \e[J causes spurious newline [revised report]], Chong Yidong, 2007/03/21
- Re: address@hidden: ansi-term \e[J causes spurious newline [revised report]],
Dan Nicolaescu <=
- Re: address@hidden: ansi-term \e[J causes spurious newline [revised report]], Chong Yidong, 2007/03/21
- Re: address@hidden: ansi-term \e[J causes spurious newline [revised report]], Dan Nicolaescu, 2007/03/21
- Re: address@hidden: ansi-term \e[J causes spurious newline [revised report]], Miles Bader, 2007/03/21
- Re: address@hidden: ansi-term \e[J causes spurious newline [revised report]], Dan Nicolaescu, 2007/03/21
- Re: address@hidden: ansi-term \e[J causes spurious newline [revised report]], Miles Bader, 2007/03/21
- Re: address@hidden: ansi-term \e[J causes spurious newline [revised report]], Dan Nicolaescu, 2007/03/22
- Re: address@hidden: ansi-term \e[J causes spurious newline [revised report]], Miles Bader, 2007/03/22
- Re: address@hidden: ansi-term \e[J causes spurious newline [revised report]], Kim F. Storm, 2007/03/22
- Re: address@hidden: ansi-term \e[J causes spurious newline [revised report]], Dan Nicolaescu, 2007/03/22
- Re: address@hidden: ansi-term \e[J causes spurious newline [revised report]], Kim F. Storm, 2007/03/22