unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: Richard Stallman <rms@gnu.org>
To: emacs-devel@gnu.org
Subject: [dalias@aerifal.cx: ansi-term \e[J causes spurious newline [revised report]]
Date: Mon, 19 Mar 2007 14:10:23 -0400	[thread overview]
Message-ID: <E1HTMJL-0002pC-4u@fencepost.gnu.org> (raw)

Would someone please DTRT and ack?

------- Start of forwarded message -------
X-Spam-Status: No, score=0.0 required=5.0 tests=UNPARSEABLE_RELAY 
	autolearn=failed version=3.1.0
Date: Sun, 18 Mar 2007 19:34:52 -0400
To: bug-gnu-emacs@gnu.org
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
From: Rich Felker <dalias@aerifal.cx>
Subject: ansi-term \e[J causes spurious newline [revised report]

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.

This bug makes busybox shells' cmdedit functionality essentially
unusable, since it depends on ESC [ J leaving the cursor in the
correct position. Other programs may be affected too.

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.

Also, in reading this code, I noticed that the sequence ESC [ 1 J
seems to only erase up to the point. To emulate VT100's Roman-inspired
off-by-one idiosyncracies, it should erase up to point+1, i.e. also
erase the character "under" the terminal cursor.

~Rich


_______________________________________________
bug-gnu-emacs mailing list
bug-gnu-emacs@gnu.org
http://lists.gnu.org/mailman/listinfo/bug-gnu-emacs
------- End of forwarded message -------

             reply	other threads:[~2007-03-19 18:10 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-03-19 18:10 Richard Stallman [this message]
2007-03-21 16:51 ` [dalias@aerifal.cx: ansi-term \e[J causes spurious newline [revised report]] Chong Yidong
2007-03-21 18:40   ` Dan Nicolaescu
2007-03-21 19:16     ` Chong Yidong
2007-03-21 20:16       ` Dan Nicolaescu
2007-03-22  2:36         ` Miles Bader
2007-03-22  3:22           ` Dan Nicolaescu
2007-03-22  3:44             ` Miles Bader
2007-03-22  5:08               ` Dan Nicolaescu
2007-03-22  6:08                 ` Miles Bader
2007-03-22  9:27                 ` Kim F. Storm
2007-03-22 17:06                   ` Dan Nicolaescu
2007-03-22 22:00                     ` Kim F. Storm
2007-03-22  5:01   ` Richard Stallman
2007-08-03 15:49   ` Dan Nicolaescu

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=E1HTMJL-0002pC-4u@fencepost.gnu.org \
    --to=rms@gnu.org \
    --cc=emacs-devel@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).