Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP
Posting-Version: version B 2.10.2 9/3/84; site teddy.UUCP
Path: utzoo!watmath!clyde!burl!ulysses!allegra!mit-eddie!think!harvard!talcott!panda!teddy!jpn
From: jpn@teddy.UUCP
Newsgroups: net.emacs
Subject: Re: Gnu Emacs on Suns/redisplay
Message-ID: <1354@teddy.UUCP>
Date: Fri, 27-Sep-85 09:24:17 EDT
Article-I.D.: teddy.1354
Posted: Fri Sep 27 09:24:17 1985
Date-Received: Wed, 2-Oct-85 00:22:58 EDT
References: <2766@sun.uucp> <1324@teddy.UUCP> <301@log-hb.UUCP>
Reply-To: jpn@teddy.UUCP (John P. Nelson)
Distribution: net
Organization: GenRad, Inc., Concord, Mass.
Lines: 32

In article <301@log-hb.UUCP> hans@log-hb.UUCP (Hans Albertsson) writes:
>
>>	:al=\E[L:dl=\E[M:im=:ei=:ic=\E[@:dc=\E[P:\
> NOTE!!!------------------^----^  This is WRONG...
>
>This ENABLES the im and ei functions, assigning the null string to both.
>Which is probably NOT what you want.
>Disabling im and ei should instead be done as follows:
>	:al=\E[L:dl=\E[M:im@:ei@:ic=\E[@:dc=\E[P:\
>according to my TERMCAP(5) manual entry, at least. Both on SUN OS 2.0
>and 4.2 BSD. Trying both shows clearly that this is indeed so.


Excuse me, but you are incorrect.  RTFM!!!!!!!  I am especially annoyed
because you site the man page.  You site it INCORRECTLY!!!!

From the list of capabilities from Termcap(5) BSD4.2 (it is the same on
Sun Version 2, also):

     ei     str         End insert mode; give ":ei=:" if ic
     im     str         Insert mode (enter); give ":im=:" if ic
    
I assume the reasoning is that this allows programs to be written that follow
a single algothim that works with all terminals that have insert capability.
Whether this is the best approach or not is irrelevent:  This is the way it
is documented to work!  I have written a fictional example:

    puts(IM);			/* use insert mode if possible */
    for (i = 0; i < strlen(data); ++i)
        puts(IC);		/* insert one char at a time if necessary */
    puts(data);			/* insert data */
    puts(EI);                   /* exit insert mode if used */