From: Dan Nicolaescu <dann@ics.uci.edu>
To: Miles Bader <miles.bader@necel.com>
Cc: emacs-devel@gnu.org
Subject: Re: [dalias@aerifal.cx: ansi-term \e[J causes spurious newline [revised report]]
Date: Wed, 21 Mar 2007 22:08:41 -0700 [thread overview]
Message-ID: <200703220508.l2M58fte023654@oogie-boogie.ics.uci.edu> (raw)
In-Reply-To: <buozm660wnv.fsf@dhapc248.dev.necel.com> (Miles Bader's message of "Thu\, 22 Mar 2007 12\:44\:36 +0900")
Miles Bader <miles.bader@necel.com> writes:
> Dan Nicolaescu <dann@ics.uci.edu> writes:
> > > Is it the escape sequence "\e[J" actually undefined on a real terminal
> > > in that case, or is merely the more abstract "ed" terminfo capability
> > > which is undefined in that case?
> >
> > I am not sure what the question is... :-(
> > In any case I am not aware of any documentation for the different
> > escape sequences other than terminfo (or the terminal emulator
> > actual code, if that counts as documentation).
>
> I mean that you described the preconditions of the terminfo "ed"
> capability, but that's not what term.el seems to be modelled after (to
> degree that it's modelled after anything :-). Terminfo is an
> abstraction, and so tries to restrict the assumptions people make about
> capabilities to some practical common denominator of the many types of
> terminals it supports -- however many programs do not use terminfo; for
> instance they may directly use ANSI escape sequences instead.
>
> term.el says:
>
> ;;; It emulates (most of the features of) a VT100/ANSI-style terminal.
So it emulates most of the features, NOT the terminal itself... AFAIK
there's no real effort in the code to emulate anything else other than
the documented terminfo behavior. (There is some commented out code
that I added that emulates non-terminfo stuff. I added that so that I
can run a hacked up version of vttest to check if things still work
when changing something).
> I'm not saying it should exactly emulate any existing terminal -- that's
> probably impractical -- but neither should it restrict its emulation to
> only those sequences terminfo might produce. For term.el to be
> practical, we should care whether term.el follows common xterm and
> VT100/ansi practice, even in cases where the behavior in question would
> never be produced by terminfo.
Well, that's a rat hole that I don't think we want to get into. Not at
this point in the release cycle. If users show that some features are
required by real applications to run correctly, then we can consider
it. If it's just: "'echo XYZ' works differently ", then it's not
really important.
The code that started this was documented to work the way
it does since 1994. The proposed change fixes the issue at hand, but:
1. I am not convinced the change is correct in all cases.
2. Risking breaking something else this close to a release is not a
great idea.
3. It's document undefined behavior created by an artificial testcase.
I can look into this after the release.
next prev parent reply other threads:[~2007-03-22 5:08 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-03-19 18:10 [dalias@aerifal.cx: ansi-term \e[J causes spurious newline [revised report]] Richard Stallman
2007-03-21 16:51 ` 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 [this message]
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
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=200703220508.l2M58fte023654@oogie-boogie.ics.uci.edu \
--to=dann@ics.uci.edu \
--cc=emacs-devel@gnu.org \
--cc=miles.bader@necel.com \
/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 external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.