[comp.emacs] -nw inconvenient for non X users

mberkley@watsup.UUCP (08/30/87)

In article <8708251815.AA25757@dagda.think.com> rlk@THINK.COM (Robert L. Krawitz) writes:
>[Context of discussion:  Dan was confused because he thought emacs
>always tried to come up under X when it was compiled with X.  Turned
>out that he set his DISPLAY variable in his .login or the like].

Not everybody who uses X uses it for xterm.  In the PAMI lab here at
UW, we have 3 X-type display devices and a bunch of vt220's.  The X
displays are used mostly for displaying digital images, for displaying
graphical descriptions of pattern analyses and for previewing
documents.  Most people do their work on a vt220 and then display
their images on one of the three X displays - there just aren't enough
X displays to go around.  That means, that it is normal to have the
DISPLAY env variable set, even though xterm is not being used.

Emacs should cue on the TERM being xterm, rather than the DISPLAY
variable being set.  If I'm really using xterm, then it's guaranteed
that my TERM variable will be xterm, then check the DISPLAY variable
for which display to use.


Mike Berkley, University of Waterloo

************************************************************************
*UUCP:		{allegra,ihnp4,utcsri,utzoo}!watmath!watsup!mberkley   *
*Bitnet:		mberkley@watdcs.BITNET                         *
************************************************************************

guy@gorodish.UUCP (08/30/87)

> Emacs should cue on the TERM being xterm, rather than the DISPLAY
> variable being set.  If I'm really using xterm, then it's guaranteed
> that my TERM variable will be xterm, then check the DISPLAY variable
> for which display to use.

A couple of problems with this:

	1) Having TERM be "xterm" in a process does not in and of itself
	   indicate that it is possible for that process to use X!  Consider a
	   person logged in on an X server machine "a", with an "xterm" window
	   on that machine.  Say this person does an "rlogin" to machine "b",
	   and then subsequently does an "rlogin" to machine "c".  Assume that
	   machine "b" will NOT forward IP packets, so that there is a wall
	   between the network machines "a" and "b" are on, and the network
	   machines "b" and "c" are on, with only bridging services such as
	   mail, "rlogin", "telnet", "finger", etc.  between them.

	   "rlogin" will pass "xterm" over the wire as the terminal type, as it
	   should; however, programs on machine "c" will NOT be able to talk to
	   the X server on machine "a".

	   (Anybody care to guess what, on Saturday morning, I discovered
	   didn't work?  Grumble....)

	2) One could imagine a canned application, run e.g. from a menu,
	   that runs EMACS.  (In fact, this application could *be* EMACS.)
	   Such an application will not necessarily have TERM set to "xterm";
	   how then is EMACS to know that it should use X?
	Guy Harris
	{ihnp4, decvax, seismo, decwrl, ...}!sun!guy
	guy@sun.com

rlk@think.UUCP (08/30/87)

In article <14495@watmath.waterloo.edu> mberkley@watsup.waterloo.edu writes:
]In article <8708251815.AA25757@dagda.think.com> rlk@THINK.COM writes:
]
]Not everybody who uses X uses it for xterm.  

Right.  Which is why emacs should not key on TERM being xterm.

					      In the PAMI lab here at
]UW, we have 3 X-type display devices and a bunch of vt220's.  The X
]displays are used mostly for displaying digital images, for displaying
]graphical descriptions of pattern analyses and for previewing
]documents.  Most people do their work on a vt220 and then display
]their images on one of the three X displays - there just aren't enough
]X displays to go around.  That means, that it is normal to have the
]DISPLAY env variable set, even though xterm is not being used.

No, the DISPLAY should not be set if you're not using X.  Set it when
you are using X, and unset it otherwise.  If you have 3 displays, then
having your DISPLAY set is meaningless, no?

]Emacs should cue on the TERM being xterm, rather than the DISPLAY
]variable being set.  If I'm really using xterm, then it's guaranteed
]that my TERM variable will be xterm, then check the DISPLAY variable
]for which display to use.

If you are using X it is NOT guaranteed that your TERM will be xterm.
You might have a completely different terminal emulator running, or
you might have no terminal emulator whatsoever running.  Suppose you
have your X server start up emacs to begin with?  You might not have
any TERM variable set whatsoever, because you don't have a terminal.

Robert^Z