Termcaps in Gnu Emacs

Termcaps in Gnu Emacs

Post by Dale Worl » Sun, 02 Dec 1990 11:00:00



I would like to play with a termcap for a particular terminal.  I
don't want to have to edit /etc/termcap to do this.  But it seems that
Gnu Emacs (at least version 17) only looks at the TERM environment
variable.  Could it be altered so that it uses TERMCAP environment
variable if it is present, and if not, then the TERM variable?

Dale
--
Dale Worley             Cullinet Software
UUCP: ...!seismo!harvard!mit-eddie!cullvax!drw

 
 
 

Termcaps in Gnu Emacs

Post by Stephen R. Walt » Sun, 02 Dec 1990 12:49:00



>I would like to play with a termcap for a particular terminal.  I
>don't want to have to edit /etc/termcap to do this.  But it seems that
>Gnu Emacs (at least version 17) only looks at the TERM environment
>variable.  Could it be altered so that it uses TERMCAP environment
>variable if it is present, and if not, then the TERM variable?

this isn't quite true.  The logic is: check the TERMCAP environment
variable.  If it is set and the value does not begin with a slash (/),
assume it is a TERMCAP entry and see if it matches what is set in the
TERM variable.  If it is set and the name does begin with a slash, then
it is the name of the TERMCAP file.

My .login contains something like
        echo -n "Terminal? "
        set term=$<
        fgrep "$term|" ~/.termcap >/dev/null
        if ($status == 0) then
                setenv TERMCAP ~/.termcap
        else
                setenv TERMCAP /etc/termcap
        endif
        eval `tset -sQ`
which reads a line from stdin to get the terminal type, looks in my
personal termcap file (~/.termcap) for an entry with that name, sets
TERMCAP to point there if it finds it or to /etc/termcap if it
doesn't, then use tset to set the TERMCAP environment variable to the
actual entry for my terminal.  This last step isn't strictly necessary,
but speeds up access tremendously.
                                                Steve Walton


                                        ...!seismo!cit-vax!ametek!walton

 
 
 

Termcaps in Gnu Emacs

Post by Earle R. Hort » Sun, 02 Dec 1990 17:31:00



> I would like to play with a termcap for a particular terminal.  I
> don't want to have to edit /etc/termcap to do this.  But it seems that

     This is how I do it (environment: 4.3 BSD),

setenv "TERMCAP" "/people1/earleh/.termcap"

     Then put the experimental termcap entries in the file (/people1/earleh
is me) and Gnu Emacs or any other program will get the descriptions from
your private termcap file, rather than from /etc/termcap.

 
 
 

Termcaps in Gnu Emacs

Post by Barry She » Mon, 03 Dec 1990 00:48:00


Quote:>I would like to play with a termcap for a particular terminal.  I
>don't want to have to edit /etc/termcap to do this.  But it seems that
>Gnu Emacs (at least version 17) only looks at the TERM environment
>variable.  Could it be altered so that it uses TERMCAP environment
>variable if it is present, and if not, then the TERM variable?

>Dale

Gnu Emacs uses the TERMCAP variable, look in src/termcap.c, tgetent().

Or (easier), just set your TERMCAP variable to the full path name
(ie. starting with a '/') to the file in which you have put your
experimental TERMCAP entry:

For csh:
                setenv TERMCAP /usr/myname/termcap.test # whatever file/path
for sh:
                TERMCAP=/usr/myname/termcap.test        # ditto
                export TERMCAP

and see if it doesn't "take" (apologies if you knew this, but this is
all true under 17.64 so something else must need explaining, perhaps
you're confusing what's going on the lisp files and startup.el and the
C source that does what you're referring to?)

        -Barry Shein, Boston University

 
 
 

1. gnu emacs vs. the termcap?

Bruce> I must be missing something obvious, but how does one coerce
Bruce> gnu emacs into using /etc/termcap for things like arrow keys?

See lisp/term/* and lisp/keypad.el in your emacs file tree for starters.

Bruce> I'm using it under SunOS 4.1, occasionally dialup with an H19,
Bruce> occasionally with xterm.  Any help would be appreciated
Bruce> (anything to get me out of using vi! :-) ).

Bruce> ps - Alternately, and perhaps even preferably, how tough would
Bruce> it be to get gnu emacs to use wordstar key conventions?  I've
Bruce> been a cp/m hacker for many years now, and wordstar is burned
Bruce> into my brain.

A new wordstar mode was recently posted to gnu.emacs.sources.

2. FS: Picasso IV and Distant Suns CD 5.01 NTSC/PAL

3. termcap entry for wyse75 sufficient to run gnu emacs at 19.2 baud

4. HELP with 4/490 SCSI Device IDs for SCSI disk drives.

5. Incomplete termcap entry in Gnu emacs

6. FA: 10 Kids and Educational Titles for IIGS

7. Problem with termcap under GNU Emacs 18.52 (but not 18.48) on vt200

8. VB5 - Is it the end of life as we know it?

9. TVI 950 termcap for GNU emacs?

10. gnu emacs termcap for SunView

11. Custom termcaps for GNU Emacs

12. Adding C-code plug-ins to Emacs?

13. EMACS/AUCTEX and dtx/ins file types