Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Termcap problems --- help!!

0 views
Skip to first unread message

Constance Stillinger

unread,
Sep 22, 1995, 3:00:00 AM9/22/95
to


--My first question is: how do I get emacs to read termcap or similar
information from a *personal* termcap file, or something else the user
can customize?

--My second, related question is: how does emacs get its terminal
information in the first place?


Emacs screws up the display on a vt100 when I try to
scroll-one-line-up. It looks like it's a termcap problem in this
particular installation (based on reading info, TERMS, and comparing
behavior with another installation on another host). However, just as
the FAQ implies, emacs won't read termcap information in a file
pointed to by the environment variable TERMCAP.

The problem is that the maintenance guy is not doing maintenance and
there's no hope of fixing it at system level. This is version 18.57
running on an RS6000 under AIX version 3. (No way will newer versions
get installed in my lifetime, so though I agree with any suggestions
to that effect, it's not a possible fix.)


Thanks,

Connie
--
Dr. Constance A. (Chana) Stillinger c...@ockham.stanford.edu
EPGY, Stanford Univ. Morris's Mommy "Hoppa Reyaha Gamogam" (Lev. 19:18)

Vladimir Alexiev

unread,
Sep 23, 1995, 3:00:00 AM9/23/95
to Constance Stillinger
> --My first question is: how do I get emacs to read termcap or similar
> information from a *personal* termcap file, or something else the user
> can customize?
I don't think emacs reads the termcap file. tset is supposed to do so.
tset is also supposed to set the environment variables TERM and TERMCAP
(for more precise explanation, see the man for tset -s). I think Emacs uses
TERMCAP, as any other terminal-output program should.


> --My second, related question is: how does emacs get its terminal
> information in the first place?
From the FAQ:
"These files are available in the `etc' directory of the GNU Emacs
distribution:
OPTIONS -- a complete explanation of startup option handling"
Unfortunatley this file is missing from my installation.

> just as
> the FAQ implies, emacs won't read termcap information in a file
> pointed to by the environment variable TERMCAP.

TERMCAP is not supposed to be a pointer to file, it should have the
actual termcap entry (tset fetches this entry from the termcap file based
on the terminal name).

Please read the man page of tset. Try 'tset -s vt100' to check whether
there is a vt100 entry available on your system. If not, you can set it
directly:

setenv TERM vt100 ;
setenv TERMCAP 'd0|vt100|vt100-am|vt100am:do=^J:co#80:li#24:cl=50\E[;H\E[2J:sf=5\ED:le=^H:bs:am:cm=5\E[%i%d;%dH:nd=2\E[C:up=2\E[A:ce=3\E[K:cd=50\E[J:so=2\E[7m:se=2\E[m:us=2\E[4m:ue=2\E[m:md=2\E[1m:mr=2\E[7m:mb=2\E[5m:me=2\E[m:is=\E[1;24r\E[24;1H:rf=/usr/share/lib/tabset/vt100:rs=\E>\E[?3l\E[?4l\E[?5l\E[?7h\E[?8h:ks=\E[?1h\E=:ke=\E[?1l\E>:ku=\EOA:kd=\EOB:kr=\EOC:kl=\EOD:kb=^H:ho=\E[H:k1=\EOP:k2=\EOQ:k3=\EOR:k4=\EOS:pt:sr=5\EM:vt#3:xn:sc=\E7:rc=\E8:cs=\E[%i%d;%dr:';

before running emacs. (The above is the output of 'tset -s vt100' on my
system).

Constance Stillinger

unread,
Sep 23, 1995, 3:00:00 AM9/23/95
to
In article <omrb17j...@tees.cs.ualberta.ca>,
Vladimir Alexiev <vlad...@cs.ualberta.ca> wrote:

> I don't think emacs reads the termcap file. tset is supposed to do so.
>tset is also supposed to set the environment variables TERM and TERMCAP
>(for more precise explanation, see the man for tset -s). I think Emacs uses
>TERMCAP, as any other terminal-output program should.


I will look into tset. Thanks, I hope it's what I want.


>> --My second, related question is: how does emacs get its terminal
>> information in the first place?
>From the FAQ:
> "These files are available in the `etc' directory of the GNU Emacs
> distribution:
> OPTIONS -- a complete explanation of startup option handling"

Good, thanks, I will look at this file. I didn't read the ENTIRE
GIGANTIC faq, just the parts I thought might be relevant, so I guess I
missed this.

> TERMCAP is not supposed to be a pointer to file, it should have the
>actual termcap entry (tset fetches this entry from the termcap file based
>on the terminal name).

The man pages on the host in question say that TERMCAP *can* be a
pointer to a file---and in fact in the past I've used this as as means
to customize personal terminal capabilities to make various
screen-oriented programs work (including emacs). But it's not working
now.

>Please read the man page of tset. Try 'tset -s vt100' to check whether
>there is a vt100 entry available on your system. If not, you can set it
>directly:
>
>setenv TERM vt100 ;
>setenv TERMCAP 'd0|vt100|vt100-am|vt100am:do=^J:co#80:li#24:cl=50\E[;H\E[2J:sf=5\ED:le=^H:bs:am:cm=5\E[%i%d;%dH:nd=2\E[C:up=2\E[A:ce=3\E[K:cd=50\E[J:so=2\E[7m:se=2\E[m:us=2\E[4m:ue=2\E[m:md=2\E[1m:mr=2\E[7m:mb=2\E[5m:me=2\E[m:is=\E[1;24r\E[24;1H:rf=/usr/share/lib/tabset/vt100:rs=\E>\E[?3l\E[?4l\E[?5l\E[?7h\E[?8h:ks=\E[?1h\E=:ke=\E[?1l\E>:ku=\EOA:kd=\EOB:kr=\EOC:kl=\EOD:kb=^H:ho=\E[H:k1=\EOP:k2=\EOQ:k3=\EOR:k4=\EOS:pt:sr=5\EM:vt#3:xn:sc=\E7:rc=\E8:cs=\E[%i%d;%dr:';


Thanks, I'll try it --- but I'm puzzled also about why TERMCAP does
not seem ever to be set (printenv never turns up a TERMCAP entry) but
emacs still seems to read the variable TERM, *even if no tset has been
invoked*. Again, if you can point me to the relevant places in the
FAQ or elsewhere explaining this I'd be grateful.

I appreciate your time!


Regards,

Connie


--
Dr. Constance (Chana) Stillinger ch...@leland.stanford.edu
Stanford University

Constance Stillinger

unread,
Sep 23, 1995, 3:00:00 AM9/23/95
to

Rats, all your good suggestions seem not to help. tset doesn't even
seem to be relevant---emacs (and for that matter other screen-oriented
editors and utilities) only seems to care whether TERM has been
setenv'ed. Setenv'ing TERMCAP explicitly to some capability string
doesn't seem to have any effect---I can change some of the
capabilities, (eg set the reverse-video string to XXX) but there's
*no* effect (eg the modeline is still in reverse video, whereas
according to TERMCAP it should just start with "XXX").

The OPTIONS file doesn't say *anything* about getting terminal
capabilities.

Anyone have any other good ideas about how to tell emacs customized
information about terminal capabilities?

Should I be looking into terminfo, for example (which I know nothing
about)?


Thanks,

Vladimir Alexiev

unread,
Sep 25, 1995, 3:00:00 AM9/25/95
to Constance Stillinger
In article <442vct$2...@elaine15.Stanford.EDU> ch...@leland.Stanford.EDU (Constance Stillinger) writes:
> Setenv'ing TERMCAP explicitly to some capability string
> doesn't seem to have any effect---I can change some of the
> capabilities, (eg set the reverse-video string to XXX) but there's
> *no* effect (eg the modeline is still in reverse video, whereas
> according to TERMCAP it should just start with "XXX").
That's puzzling.

> Should I be looking into terminfo, for example (which I know nothing
> about)?

I think one3 should be able to do it with termcap. Check if emacs thinks it
should use terminfo:
"system-uses-terminfo
Variable: Non-nil means the system uses terminfo rather than termcap."

Constance Stillinger

unread,
Sep 27, 1995, 3:00:00 AM9/27/95
to

It turns out that, as I had come to suspect, the system in question
was NOT using termCAP at all, but using termINFO, which is why any
monkeying with termcap I tried had no effect whatsoever.

In my opinion, the doc file TERMS (which discusses terminal glitches
and fixes) and the info Lossage node should point more explicitly to
the possibility that the terminfo database is where fixes might have
to be made, and perhaps that users *can* make customized fixes. Also
the FAQ should include a brief pointer---since it mentions termcap, it
ought to be updated to mention terminfo, too.

People following this thread will recall that I was getting garbaged
screens when scrolling in emacs in a vt100 display. The problem
turned out to be a slightly wrong terminfo entry in
/usr/lib/terminfo/... for vt100.

The fix was easy. I swiped a known correct termCAP entry (if I'd had
access to a correct termINFO source I would have started there),
converted it to termINFO source using captoinfo, setenv'ed TERMINFO to
point to my personal terminfo directory, and finally compiled the
source on the problem system with tic (which, if it sees a TERMINFO
environment variable set, will put the compiled file in the right
subdirectory of $TERMINFO).

Now the reason it took me more than the 5 minutes this all takes is
that all the relevant emacs documentation talks about TERMCAP and
makes virtually no mention of TERMINFO. There's even an info node for
TERMCAP, which threw me off the terminfo trail for quite a while!
And the FAQ has nothing very useful to say on this particular topic.

Thanks to everyone who helped me eventually figure this out. Boy it's
trivial in retrospect, but when the documentation leads you down the
wrong path ... whew!


Regards,

Connie
--

0 new messages