[gnu.emacs.vms] emacs on the VAX???

JONES@ohstpy.mps.ohio-state.edu (Bob Jones [VAX-Man] Home: (614)447-0214) (07/16/89)

As you might know, EDT in VMS does not support non-ANSI terminals because
it does not access TERMTABLE.EXE. Does anyone know if emacs does? That is,
will emacs running under VMS [v 4.7] on a VAX 8650 understand non-ANSI type 
terminals?  If it uses SMG$ routines, it probably will.

If anyone can help me on this, I would be very interested in perhaps getting
a [free?] copy of the emacs source code.

            Bob Jones        VAX-man

jv@mh.nl (Johan Vromans) (07/17/89)

In article <2850@ohstpy.mps.ohio-state.edu> JONES@ohstpy.mps.ohio-state.edu (Bob Jones [VAX-Man] Home: (614)447-0214) writes:

>  As you might know, EDT in VMS does not support non-ANSI terminals because
>  it does not access TERMTABLE.EXE. Does anyone know if emacs does? That is,
>  will emacs running under VMS [v 4.7] on a VAX 8650 understand non-ANSI type 
>  terminals?  If it uses SMG$ routines, it probably will.

SMG$ and TERMTABLE.EXE won't help, they are *VERY* limited in the
support of non-ANSI terminals.  Emacs doesn't use SMG$ routines nor
TERMTABLE.EXE. It uses a different mechanism (termcap) to parametrize
terminal control. It can and will understand all kinds of terminals,
see EMACS_LIBRARY:[ETC]TERMCAP.DAT or type C-h i and select the menu
entry for termcap.
--
Johan Vromans				       jv@mh.nl via internet backbones
Multihouse Automatisering bv		       uucp: ..!{mcvax,hp4nl}!mh.nl!jv
Doesburgweg 7, 2803 PL Gouda, The Netherlands  phone/fax: +31 1820 62944/62500
------------------------ "Arms are made for hugging" -------------------------

jv@mh.nl (Johan Vromans) (07/17/89)

In article <2850@ohstpy.mps.ohio-state.edu> JONES@ohstpy.mps.ohio-state.edu (Bob Jones [VAX-Man] Home: (614)447-0214) writes:

> Subject: Re: emacs on the VAX???
For the umpteenth time: ^^^^^^^ does not necessarily mean "VMS".

--
Johan Vromans				       jv@mh.nl via internet backbones
Multihouse Automatisering bv		       uucp: ..!{mcvax,hp4nl}!mh.nl!jv
Doesburgweg 7, 2803 PL Gouda, The Netherlands  phone/fax: +31 1820 62944/62500
------------------------ "Arms are made for hugging" -------------------------

JONES@ohstpy.mps.ohio-state.edu (Bob Jones [VAX-Man] Home: (614)447-0214) (07/17/89)

>> Subject: Re: emacs on the VAX???
> For the umpteenth time: ^^^^^^^ does not necessarily mean "VMS".

Thank you for replying; however, the reason I assumed that VMS was
implied is that the name of this newsgroup is gnu.emacs.vms.
Needless to say, my machine is runnining VMS and I am looking for
an incarnation of emacs that runs under VMS.

The way VMS understands the different terminals is similar to the 
way UNIX does. [I am not a UNIX guru!] UNIX uses termcap and VMS 
uses TERMTABLE.EXE.  In fact, I translated a UNIX termcap into a 
TERMTABLE.TXT and compiled it into a TERMTABLE.EXE. [I did this for 
a Lear Siegler ADM5 for example.]  The next step is to:
$ SET TERM/DEV=ADM5 [In the example].

There is a whole bunch of routines [SMG$] that look at TERMTABLE.EXE
which make the the terminal type invisible to the type of terminal.
These routines are ofcourse callable from any high level language
like FORTRAN [Why FORTRAN!?!?!].

The only documented difference between termcap TERMTABLE.EXE is that
TERMTABLE.EXE does not support "padding" and termcap does.

Unfortunatly, EDT does not use TERMTABLE.EXE and there is no other
editor here that does. I was just hoping that emacs might work.

                         Bob Jones  VAX-Man

wsincc@eutrc3.urc.tue.nl (Wim van Dorst) (07/18/89)

In article <2850@ohstpy.mps.ohio-state.edu> JONES@ohstpy.mps.ohio-state.edu (Bob Jones [VAX-Man] Home: (614)447-0214) writes:
>will emacs running under VMS [v 4.7] on a VAX 8650 understand non-ANSI type 
>terminals?  If it uses SMG$ routines, it probably will.
>If anyone can help me on this, I would be very interested in perhaps getting
>a [free?] copy of the emacs source code.

Although this is mailed to gnu.emacs may I point you to the
existence of MicroEmacs, a small version for many OS'ses
available. I have this running unde vms4.7. This uses SMG$... for
all the screen manipulation and keyboard manipulation. As I only
have proper Digital equipment I don't know whether non-ANIS will
be supported. Free copies are available on many sites, e.g.
simtel20. Version 3.10 in the present.

Greetings. Wim van Dorst. Akzo Centre for Materials and
Corrosion Engineering wsincc@tuerc3.urc.tue.nl +31 74 443937

jv@mh.nl (Johan Vromans) (07/18/89)

In article <2871@ohstpy.mps.ohio-state.edu> JONES@ohstpy.mps.ohio-state.edu (Bob Jones [VAX-Man] Home: (614)447-0214) writes:
> The only documented difference between termcap TERMTABLE.EXE is that
> TERMTABLE.EXE does not support "padding" and termcap does.

The last time I tried TERMTABLE.EXE I could not describe a terminal
which used zero-based cursor addressing (e.g. HOME = move 0 0 instead
of 1 1). I then gave up forever.

Anyway, if your terminal type is in termcap (lots of them are already
there!), just $DEFINE EMACS_TERM "whatever_your_terminal_is" and run
emacs. If it's not in there, it is often esy to add it.

	Johan

--
Johan Vromans				       jv@mh.nl via internet backbones
Multihouse Automatisering bv		       uucp: ..!{mcvax,hp4nl}!mh.nl!jv
Doesburgweg 7, 2803 PL Gouda, The Netherlands  phone/fax: +31 1820 62944/62500
------------------------ "Arms are made for hugging" -------------------------

JONES@ohstpy.mps.ohio-state.edu (Bob Jones [VAX-Man] Home: (614)447-0214) (07/18/89)

In article <JV.89Jul17143625@mhres.mh.nl>, jv@mh.nl (Johan Vromans) writes:
> In article <2871@ohstpy.mps.ohio-state.edu> JONES@ohstpy.mps.ohio-state.edu (Bob Jones [VAX-Man] Home: (614)447-0214) writes:
>> The only documented difference between termcap TERMTABLE.EXE is that
>> TERMTABLE.EXE does not support "padding" and termcap does.
> 
> The last time I tried TERMTABLE.EXE I could not describe a terminal
> which used zero-based cursor addressing (e.g. HOME = move 0 0 instead
> of 1 1). I then gave up forever.
> 
> Anyway, if your terminal type is in termcap (lots of them are already
> there!), just $DEFINE EMACS_TERM "whatever_your_terminal_is" and run
> emacs. If it's not in there, it is often esy to add it.
> 
    I now understand that perhaps termcap is much better to use than termtable.
exe. My problem, which may be solved soon, is that we don't have emacs on the
VAX here. It is clear to me that emacs uses its own terminal definitions and
doesn't rely on termtable.exe or SMG. This is good.

    Here at OHSTPY, the termtable.exe is set up mostly for DEC terminals.
When I started wrestling with termtable so that it would understand an old
ADM5 terminal, I went to termcap in UNIX and translated the few very limited
entries into the format used by termtable. I was only partially successful.
I could not get the video attributes to work properly [eg:  <ESC>G is a toggle
for light [invisible?] and normal attributes] and so I "gave up" and just
left that entry out. Oh well. It does seem that DEC wants VMS people to use 
[and buy] only DEC terminals - this is unlike UNIX.

    I am new to the NEWS network [and computers in general]. I must apologize
for the grammar mistakes in my previous posting. I pressed ^Z and then
"proof read" the entry and saw the mistakes. :-)

    Let me comment on the zero-based cursor addressing. The ADM terminal
used a similar addressing? To move the cursor to the upper left hand corner
we need to send <ESC>=    where there are two blanks after the equal sign.
To move it to the row=1, col=2; the sequence is <ESC>=!"  recall ! is char(33)
and " is char(34). the termcap entry is cm=\E=%+ %+  where a space follows
each plus sign. The corresponding TERMTABLE.TXT entry is:

            set_cursor_abs = "$=(%1+31)(%2+31)"

It took me a long time to get this right! This is really getting off the
subject. Oh well.

========================================================================== 
JONES@ohstpy.mps.ohio-state.edu (Bob Jones [VAX-Man] Home: (614)447-0214)

   Bob Jones
   POBox 3194
   Columbus, OH 43210                                                    
============================= I think I forgot my towel ================= 

mh@korppi.tut.fi (Harjula Mikko) (07/24/89)

In article <802@eutrc3.urc.tue.nl> wsincc@eutrc3.urc.tue.nl (Wim van Dorst) writes:
>In article <2850@ohstpy.mps.ohio-state.edu> JONES@ohstpy.mps.ohio-state.edu (Bob Jones [VAX-Man] Home: (614)447-0214) writes:
>>will emacs running under VMS [v 4.7] on a VAX 8650 understand non-ANSI type 
>>terminals?  If it uses SMG$ routines, it probably will.
>>If anyone can help me on this, I would be very interested in perhaps getting
>>a [free?] copy of the emacs source code.

...

>Although this is mailed to gnu.emacs may I point you to the
>existence of MicroEmacs, a small version for many OS'ses

I used to use GNU Emacs in VMS 4.7 for some time because of its
superior capabilities (I think it was version 18.47) .  It works well
with almost any terminal, and it was the only way I could use my own
exotic terminal at home. Another main reason for using emacs in VMS
was that I had to use UNIX and VMS side by side and changing from
editor to another was a PAIN.

I have to point out some problems though. Getting the editor to work
on a non-DEC terminal is not the whole picture even if it is the most
vital part.  First you cannot use any VMS commands that rely on a
certain terminal type and there are more of them that you would want
to believe. I couldn't even get the command line editing to work
properly even though my exotic terminal is pretty close to VT52 (but
not close enough). Not having all the commands you are used to becomes
a real pain in a while.

The second problem is that emacs is not designed to such an exotic
system as VMS and has some problems when used there. I didn't look
what country you are from, but in most european countries the native
language includes characters outside of the 27-character US set. This
causes a problem because DEC has decided to place those characters in
the range 128-255 (that is in VT200 national mode) and Emacs cannot
handle these 8-bit characters properly. It displays \XXX for each
character where XXX is an octal number and that messes up your line
lengths etc. But what's even worse you cannot insert those characters.
What I did was that I set my terminal to seven bit VT100 mode and used
those {, | and } characters I am used to. Then I used a program to
convert these to DEC 8-bit equivalents when printing. This was a bit
cumbersome.

One problem is that starting emacs in VMS is painfully slow. This is
avoided by using a special command file KEPT_EDITOR.COM which is
included in emacs distribution. The first time you run it, it spawns
your emacs and if you leave it using CTRL-Z (which detaches from the
process) the next time you run KEPT_EDITOR.COM it attaches to the old
emacs process. This is faster than starting any DEC editor and has the
advantage of getting you to the same place where you left last time.

One really annoying problem is that emacs uses CTRL-S and CTRL-Q for
editing commands. You can disable these but there stil remains a
problem with slow VT100 compatible terminals (for example, I think
VT132 uses software to interpret various control sequences as opposed
to VT100 that has it all in hardware). So VT100 termcap entry is much
too fast for VT132 and the screen doesn't update correctly (sometimes
you have to reset the terminal to get it working again). I assume the
same applies to all slow VT100 emulators. Of course you could add your
own terminal definition with some added padding. I tried it, but I
didn't have termcap documentation and fiddling with termcap didn't
produce results soon enough so I decided to stick with real VT100's.

And of course you would have to move those useful commands (CTRL-S and
CTRL-Q) to some other key sequency (possibly disabling some other
useful commands) and end up having different command definitions on
VMS and UNIX. And one of the reasons for going to emacs was to have
the same editing commands in both machines...

In spite of all these problems I used emacs in all my work in VMS
because I feel it has superior capabilities. Now those problems are
over for me because I no longer have to work with VMS. At least not at
the moment, but I stil have that emacs in TK50 somewhere :-)

Mikko Harjula     UUCP: ...mcvax!tut!mh	INTERNET: mh@tut.fi
Home: Lukonmaenkatu 5 H 40 33700 Tre, Finland; phone +358 31 181177
Work: SQ Consulting OY Kanslerink. 8 33720 Tre, Finland; phone +358 31 165205