[comp.emacs] Terminal emulator

mly@wheaties.ai.mit.edu (Richard Mlynarik) (05/16/89)

I wrote the terminal emulator which is distributed with Emacs.
I deliberately did not make it emulate any specific flavour of
terminal because
  * doing so would be more painful than necessary (the command sequences
  of the existing terminal are designed to be fairly simple for a fairly
  simple interpreter to grok)
  * doing so would be pointless.  (I can't do double-width VT100
  characters, so who am I kidding?  Do VT100s ever come in 27x97 sizes?)
  * doing so would pander to cretinous software with wired-in assumptions
  (such as that it is meaningful to just transmit the TERM environment
  variable to another machine.)  In other words, use a real virtual-terminal
  protocol (like SUPDUP (or X even!)) rather than something subfunctional
  (like Telnet) or just plain stupid and confused (like rlogin and company.)


The correct approach to take for those of you who -must- communicate
with some system which only understands VT100s or whatever is to write
a general filter program which -attempts- to translate between VT100
escape sequences and those used by the actual virtual terminal to
which it is connected (as determined by the TERMCAP environment
variable, say.)

So under Emacs, things would look like

User's terminal <-> Emacs 
  <-> terminal.el <-> vt100-filter <-> stupid-program-which-demands-vt100

This is far more useful and general than pointlessly trying to make
terminal.el slavishly emulate a particular terminal type.  For
example, it could be used in the following
User's AAA terminal <-> vt100-filter <-> stupid-program

Personally I am uninterested in writing such a program because I would
never have a need for it.  I am just trying to point out what I
believe to be the best technical solution to the difficulties some
people seem to face.


On other vaguely terminal.el-related matters:

Somebody claimed that atempting to use `vi' in the Emacs terminal emulator
triggered some bug in the terminal emulator.  I have never seen any
such bug reported, so I have no way of fixing this.  It would be a
different matter if somebody were to submit a real bug report (see
"Reporting Bugs" in the Emacs manual) detailing a way to produce
aberrant behaviour.  Please bear in mind that I am not a vi user.

As to brians@hpcljms.HP.COM, who claimed that
  I believe that orignal idea was for "terminal.el" was to allow some
  kind of terminal emulation, but apparently some cry-baby type that
  was working on it decided it was more fun to add cuss words and
  just complain about UNIX in general that to add any useful 
  functionallity.
all I can say is that
  * you are free not to use my code
  * one problem with the teeming thousands of pointy-headed unix
    acolytes is that they have never seen anything else and refuse to
    believe that anything better could possibly exist (let alone that
    it could exist at this moment, or have existed for years.)
  * I'd be very very interested to see you write better code.

[No, this is not a challenge.  No further correspondence will be
entered into.  Save your opinions for those who are interested in them.]

tro@adiron.UUCP (Tom Olin) (05/18/89)

I, for one, was quite disappointed that Richard Mlynarik's terminal.el does not
emulate those old Teletype machines, especially the "kerchunk kerchunk" noises.
(Hint: |-])

Actually, I use it quite often.  With vi and emacs, even.  No problem.

Thank you, RM.
-- 
Tom Olin (...!uunet!adiron!tro)
PAR Technology Corporation, New Hartford, NY 13413	(315) 738-0600