[comp.editors] EDT for Unix

brunette@sjuphil.uucp (Glenn M. Brunette) (02/12/91)

Could you also mail me any and all info on EDT for UNIX.  Also any other
editors for the MENU-DRIVEN crowd.  We would like to expand the usage of UNIX
into the various departments at our University, but most people are all to 
uneager to learn UNIX, so we are looking for all kinds of menu driven
applications such as mail, shells, editors, etc.

We are currently using ELM as a menu driven mailer, but are in the process of
looking at MUSH.  We will be obtaining CRISP in the near future.  Is it as
good as it is said to be (for the extremely computer-illiterate).  As for
shells we are looking at BaSH.  So any help with the editor part would be 
a tremendous help.



Thanks in advance,
Glenn

forward all flames to /dev/null

-- 
******************************************************************************* 
 Glenn Brunette,  Academic Computing Network Consultant      sssss
                                                           ss      jjjjjjj
 Addresses:                                                 ss       j
             brunette@sjuphil.UUCP                           ss     j  u    u
             brunette%sjuphil.sju.edu@RELAY.cs.net      sssss      j  u    u

ohagan@qut.edu.au (02/13/91)

An age old question I feel sure ...
I'm looking for a version of the VAX editor EDT to install on Unix.
No flames please - just mail me.  

	Thanks,
	Tony O'Hagan
 
-- 
Tony O'Hagan	School of Computing Science,   Email: tonyo@snow.fit.qut.edu.au
 _--_|\  	Queensland University of Technology,
/      QUT 	Gardens Point Campus,
\_.--._/ 	GPO Box 2434, Brisbane, AUSTRALIA 4001
      v  	Phone: +61 7 864-2961  Fax: 229-1510

Dan_Jacobson@ATT.COM (02/15/91)

>>>>> On 12 Feb 91 03:49:01 GMT, brunette@sjuphil.uucp (Glenn M. Brunette) said:

Glenn> Could you also mail me any and all info on EDT for UNIX.

GNU Emacs can do it, and it costs $0.  see *.emacs.* gnu.* newsgroups.
From the GNU Emacs manual:
#################################
File: emacs  Node: Emulation, Prev: Amusements, Up: Top, Next: Customization

Emulation
=========

  GNU Emacs can be programmed to emulate (more or less) most other
editors.  Standard facilities can emulate these:

EDT (DEC VMS editor)     
     Turn on EDT emulation with `M-x edt-emulation-on'.  `M-x
     edt-emulation-off' restores normal Emacs command bindings.
     
     Most of the EDT emulation commands are keypad keys, and most standard Emacs
     key bindings are still available.  The EDT emulation rebindings are done in
     the global keymap, so there is no problem switching buffers or major modes
     while in EDT emulation.
     
Gosling Emacs     
     Turn on emulation of Gosling Emacs (aka Unipress Emacs) with `M-x
     set-gosmacs-bindings'.  This redefines many keys, mostly on the
     `C-x' and `ESC' prefixes, to work as they do in Gosmacs.
     `M-x set-gnu-bindings' returns to normal GNU Emacs by rebinding
     the same keys to the definitions they had at the time `M-x
     set-gosmacs-bindings' was done.
     
     It is also possible to run Mocklisp code written for Gosling Emacs.
     *Note Mocklisp::.
     
vi (Berkeley Unix editor)     
     Turn on vi emulation with `M-x vi-mode'.  This is a major mode
     that replaces the previously established major mode.  All of the
     vi commands that, in real vi, enter "input" mode are programmed
     in the Emacs emulator to return to the previous major mode.  Thus,
     ordinary Emacs serves as vi's "input" mode.
     
     Because vi emulation works through major modes, it does not work
     to switch buffers during emulation.  Return to normal Emacs first.
     
     If you plan to use vi emulation much, you probably want to bind a key
     to the `vi-mode' command.
     
vi (alternate emulator)     
     Another vi emulator said to resemble real vi more thoroughly is
     invoked by `M-x vip-mode'.  "Input" mode in this emulator is
     changed from ordinary Emacs so you can use ESC to go back to
     emulated vi command mode.  To get from emulated vi command mode back
     to ordinary Emacs, type `C-z'.
     
     This emulation does not work through major modes, and it is possible
     to switch buffers in various ways within the emulator.  It is not
     so necessary to assign a key to the command `vip-mode' as
     it is with `vi-mode' because terminating insert mode does
     not use it.
     
     For full information, see the long comment at the beginning of the
     source file, which is `lisp/vip.el' in the Emacs distribution.

I am interested in hearing which vi emulator users prefer, as well as in
receiving more complete user documentation for either or both emulators.
Warning: loading both at once may cause name conficts; no one has checked.
#################################
-- 
Dan_Jacobson@ATT.COM  Naperville IL USA  +1 708-979-6364

kswanson@casbah.acns.nwu.edu (Kurt Swanson) (02/15/91)

In article <DANJ1.91Feb14101134@cbnewse.ATT.COM> Dan_Jacobson@ATT.COM writes:
>>>>>> On 12 Feb 91 03:49:01 GMT, brunette@sjuphil.uucp (Glenn M. Brunette) said:
>
>Glenn> Could you also mail me any and all info on EDT for UNIX.
>
>GNU Emacs can do it, and it costs $0.  see *.emacs.* gnu.* newsgroups.

	I'm sorry, but this is not exactly true. I've tried it, and it seems
that not only is the emulation woefully incomplete, but that one is required
to learn emacs in order to be able to use it properly (slight exaggeration).
This, of course, is contrary to the reason for finding a Unix EDT - so that
one does not have to learn another $#%^#& editor! (Yes I know that if I did
learn emacs I'd probably never have to learn another...)

	So I'm still looking for a REAL Edt on UNIX - one that's free or
nearly free. BBC computing (a mass. company), has such for sale, but at an
exorbitant price... So if anybody ever finds one, please notify me...

K.

markh@squirrel.LABS.TEK.COM (Mark C. Henderson) (02/18/91)

In article <3514@casbah.acns.nwu.edu> kswanson@casbah.acns.nwu.edu (Kurt Swanson) writes:
>In article <DANJ1.91Feb14101134@cbnewse.ATT.COM> Dan_Jacobson@ATT.COM writes:
>>>>>>> On 12 Feb 91 03:49:01 GMT, brunette@sjuphil.uucp (Glenn M. Brunette) said:
>>
>>Glenn> Could you also mail me any and all info on EDT for UNIX.
>>
>>GNU Emacs can do it, and it costs $0.  see *.emacs.* gnu.* newsgroups.
>
>	I'm sorry, but this is not exactly true. I've tried it, and it seems
>that not only is the emulation woefully incomplete, but that one is required
Although I'm not a great fan of GNU emacs, I do have a copy of an improved
EDT mode for GNU Emacs. 

Disclaimer: I haven't tried it. I use EVE/TPU on VMS and before that came
out I used TECO.

You can get this of the tut.cis.ohio-state.edu GNU EMACS LISP archives. I'll
append the description and send the complete file (tpu.el) to anyone who 
requests it (N.B. It is misnamed somewhat, it is an EDT emulator).


Mark Henderson

--------CUT HERE---------------

Hack, hack, hack.
This represents a serious series of hacks to edt.el (as
supplied with GNU Emacs) in order to more closely simulate
the edt editor.  I was wrong when I called it a TPU emulator.
TPU would be tough to emulate in Emacs since TPU is a language.
What I meant was that tpu.el simualtes the EDT interface to TPU.

Well, with a few extensions.

There's a truly nice new style of abbrevs that uses alists.
Try typing the partial word "Heu", then GOLD-H a few times.
See where the cursor goes?

I don't have up to date docs for my toy, but I'll include
what I gave the students last semester, along with tpu.el

Have fun, mail me bugs, questions, chocolate chip cookies.

Jeff

CADIF Swamp
172 Hollister Hall
Cornell University
Ithaca, NY 14853

----------
GUIDE
---------
The long-heralded emulation of the highly acclaimed BOBTPU is here!

What is bobtpu?  It's simply the most extended editor ever.  Written by
system programmer par-excellence Bob Covey, it was formerly available
only on VMS systems supporting tpu.  Now, through the miracle of modern
pharmaceuticals, Jeff Kowalski has just completed a complete emulation
of the incredible editor under Unix.  That's right, UNIX!  For the first
time ever in the history of CADIF, the Unix user, previously hindered by
such evil tortures as vi and ed, will finally be able to complete work!

"How can I, so simple an undeserving a student, gain access to the
fruits of Jeff's laudable accomplishment?"  Well, I will tell you.  But
first, you must suffer through the incredible mind-expanding description
of what the bobtpu emulator can do for you (or you must turn the page).

Firstly, the bobtpu emulator (hereafter called bobtpu) is written in
elisp, which is the emacs native language.  This means that the
behind-the-scenes editor is GNU Emacs, not VAX TPU.  There are,
therefore, a few subtle differences between VMS bobtpu and Unix bobtpu.
For the most part, however, you'll probably never notice.  If you have
questions, you should refer to both the EDT and Emacs guides.  Ask the
room monitor for them.

At the very least, bobtpu is an EDT emulator.  That means that the
arrows work and the keypad at the right has special meaning, among other
things.  If you are not familiar with EDT, ask the room monitor for
information (a manual or online CAI on VMS).  In addition to the basics
of EDT, bobtpu provides all of these extras:

				TERMINOLOGY

   The GOLD key is the PF1 key on DEC-style keyboards, F9 on SGI style
keyboards.  It is not a modifier in the same sense as the shift or
control keys: you don't hold it down while striking another key, you
simply strike it first.  Thus GOLD-a means strike PF1, then the letter
"a."  On the VMS version, GOLD-a and GOLD-A are equivalent.  On my unix
version, the letters are different, so we have twice the functionality.
In general, the lowercase version is the same as the VMS version, while
the uppercase version, since it is harder to type, performs an extended
operation, or an operation with no query.  For example, GOLD-q quits,
but asks about saving unsaved files first; GOLD-Q quits without asking.
In the cases where case is insignificant, I will represent the sequence
as GOLD-[Aa] which means use either case.
   If you get stuck in some crazy mode, you can type CTRL-G (cancel) to
get out.  So if you're being prompted for a filename and you don't know
why (ie you're lost), just hit a CTRL-G.

				MULTIPLE FILES

   It is possible to edit many files at a time.  They may be entered
using wildcards or lists on the command line. Any files which are not
found and do not contain wildcards will be created and marked as
modified. You are placed in the first file read/created (if no files are
found and all specifications have wildcards, you will be placed in a
default buffer).  The files are marked for update on exit.  A status
line shows information about the current buffer, just as in Emacs.

    The easiest way to move between files is by hitting GOLD-W to "walk"
to the next one.  GOLD-w will "walk" to the previous one.  GOLD-f will
ask you for the name of a file to jump to, it will try to find one it
has that best matches the name you give.  GOLD-F will do the same, but
will show the selected buffer in another window.

    You can add more files to the list (just as if you had included them
on the original edit command) by hitting GOLD-e.  It will prompt for the
file(s), which may contain wildcards/lists.  The new files will be
marked for update on exit.  There is and equivalent line-mode "find-file
filespec(s)".  GOLD-E will read the file into another window.

    CTRL-F allows you to specify a new filename to be attached to the
current buffer.

    Hitting GOLD-[Uu] will change the update mode of a buffer.  Only
those buffers marked with the double star in the status line will be
written out on exit.
 
    GOLD-[Bb] will generate a list of the current buffers.  The list
will show a dot in the first column to indicate the current buffer, a
star in the second for each buffer that has been modified, and a "%" in
the third if the buffer is marked readonly.  It also shows the number of
characters in each buffer and the filename and mode associated with it.

    GOLD-[Ii] is a handy shorthand for the line mode "insert-file
filename" command.  It will prompt for the name of a file, which is
included into the current buffer immediately after the current cursor
location.  The file name specified may contain wildcards and/or lists.

    GOLD-CTRL-W allows you to have the current versions of all buffers
written out (saved), without exiting the editor.

    GOLD-k will throw away the current buffer and move onto the next,
but will ask for confirmation first.  GOLD-K doesn't ask.  Be really
careful...


				 SHELL COMMANDS

    It is possible to execute shell commands from within the editor, and
get the results.  Hitting GOLD-[Dd] will prompt you for a shell command,
then place you in the shell buffer.  The command is executed in a
subprocess in that other buffer.  Commands which try to take over the
screen (such as talk) may not work.


				DEFINING KEYS

    Defining keys is almost the same as in EDT, the only major
difference is that it executes the keys as you build the definition --
you don't have to try to visualize what the sequence will do.  The
definitions properly handle repeat counts (even if you use a repeat
count on a defined key containing a repeat on some other keys), and
execution of a key definition halts immediately if it encounters any
error (string not found, move past end of buffer, etc.).


				SUBSTITUTIONS

    GOLD-s or GOLD-/ allows you to easily specify a substitution.  It
will prompt for the old string you want to replace, and the new
replacement string.  Then, the function will pause at each occurence of
the original and wait for a response.  Typical responses are "Y"
(replace), "N" (don't replace), "Q" (stop replacing).  For more
information, see the Emacs manual under query-replace.  GOLD-S will
replace all the old strings with the new ones, without asking for any
confirmation.


				   AUTO-TAB

    When enabled (disabled by default), hitting RETURN will act as if
you hit RETURN, followed by appropriate spacing if the resulting line is
blank.  TAB at the beginning of a line (still in the whitespace) will
re-indent the line according to the language you are using.  TAB
anywhere in the text is still a tab.  GOLD-[Aa] is provided as an easy
way to toggle autotab mode on and off.


				    OTHER

    GOLD-DEL (GOLD-BS on some) will remove the current window, if it's
not the only one.  CTRL-X 1 will make the current window the only one,
by removing all the others.  Remember, buffers and windows are not the
same thing.  Don't worry: removing a window doesn't erase that buffer!

    You can get help at any time by pressing the HELP key on VT200
keyboards, or using "GOLD-KP7 info RETURN"

    You can get the description of any key's function by using the PF2
key, then pressing a key sequence.  Neat, huh?

    As with normal EDT at CADIF, GOLD-q and GOLD-x provide any easy way
to quit without saving any changes or exit & write out all buffers
marked update which have been modified.  The lowercase versions ask for
confirmation if necessary; GOLD-Q and GOLD-X do not.  Be careful...

    GOLD-[Yy] is defined to copy the selected region into the paste
buffer.  It is similar to the CUT command, but you don't have to paste
the text back in, and it doesn't mark the buffer as changing.

    GOLD-CTRL-L and GOLD-CTRL-U act the same as CHANGE CASE (GOLD-KP1),
except that all the text is forced to be lower or upper case instead of
switching to the opposite case.

    GOLD-UP and GOLD-DOWN will move up or down a full screen.  GOLD-LEFT
and GOLD-RIGHT will ask you for a new screen size, in case your terminal
is screwed up.

    GOLD-SPACE is an undo.  You can typically undo about 500 major
changes.  After that, you're on your own.

    GOLD-~ swaps the current location with the other end of the selected
region, allowing you to check where it is or easily adjust both ends.



			      ADVANCED FUNCTIONS

    And now some more advanced (pronounced "bizarre") definitions...


				   MARKERS

    GOLD-. (keyboard period, not the one on the keypad) will set a
marker that can be returned to later using GOLD-, (also not the one on
the keypad).  You may use a repeat count to specify which marker (1 is
normally the default).  On DEC-style keyboards, the keys F17-F20 retrieve
markers 2 through 5 automatically, and GOLD-F17 through GOLD-F20
insert them.  Pretty convenient, huh?

			       SEARCH PATTERNS

    GOLD-' or GOLD-" will allow you to search for a regular expression
instead of just a simple string.  The pattern matching is relatively
powerful, but takes a little practice.  See a good Unix manual (ha!) for
more details on patterns.  After a pattern search is entered, FIND NEXT
(PF3) may be used to search with the same pattern.

			       MATCH DELIMITERS

    The VMS version of bobtpu has special keys for matching delimiters.
The unix version does it constantly, by blinking on the matching open
delimiter briefly.  For example, if you type a closing brace (}) in
c-mode, the editor rests the cursor briefly on the mathing opening
brace, then returns the cursor to its proper place.

				   COUNTERS

    There is an internal counter that may be useful.  GOLD-= will set
the counter to the repeat count, zero if not specified.  GOLD-> and
GOLD-< will increment and decrement the counter by the repeat count (1
by default).  GOLD-# will copy the value of the counter into the buffer
using the current format, which is C-like format that may be changed
using GOLD-! (the default is %d).  GOLD-* inserts the ASCII character
corresponding to the counter value (mod 256).

				TEXT EXPANSION

    GOLD-h (also DO on VT200-style keyboards or F1 on SGI-styles) will
invoke an automatic text expander.  This will search a special list for
the word which is under the cursor.  If it finds a line containing the
word (called the key), the word is replaced by a "tag".  Repeating will
find successive occurrences, replacing the text each time.  If no more
matches are found, it will restore the original word.  For instance, if
you enter "open<GOLD-h>", it might first replace "open" with
"HC_Open_Segment ();", then "HC_KOpen_Segment ();", and then return to
"open" if requested a third time.  Gold-DO or GOLD-H will cause the
original text to be restored.  Currently, all the HOOPS commands are in
the list.  If you'd like to add more, I'll provide a facility for doing
so.

				SPELLING CHECKER

    If spell has been installed on the system it can be invoked to check
all or part of a file/buffer.  The simplest means of using it is to use
GOLD-?.  This will cause it to generate Spell as a subprocess and have
it check the selected region, or the whole buffer if no region was
selected.  If any changes are made in Spell and then saved, the changes
will be incorporated back into the editor.

				  NUMERIC KEYPAD

    GOLD-$ toggles between numeric keypad mode (the digits and
punctuation characters on the keypad merely insert the corresponding
text into the buffer) and function mode (the keypad keys have their
normal editing functions).

 				    LINE MODE

    You can enter commands directly to the emulator with GOLD-KP7.  You
can evaluate elisp s-espressions with GOLD-PF2.


** If for some obscure reason you want plain emacs, 
** you can type "GOLD-KP7 cancel-tpu"
** Use "ESC-X use-tpu" to get it back.


--
       Mark C. Henderson, Computer Research Laboratory, Tektronix, Inc.
             MS 50-662, P.O. Box 500, Beaverton, OR 97077, U.S.A.
    INTERNET: markh@crl.labs.tek.com  (alternate: mchenderson@attmail.com)
    Tel: +1 503 627 6280   Fax: +1 503 627 5502    AT&T Mail: !mchenderson