From:	ADVAX::"nat@drao.nrc.ca" "Natalie Prowse" 26-NOV-1990 18:54:56.91
To:	<ISIS08@ecostat.aau.dk>, <miller@ria.ccs.uwo.ca>, <alberto@pseudo.berkeley.edu>, <ROSS@bio-medical-physics.aberdeen.ac.uk>, <CAIRNS@upei.ca>, <davis@pacific.mps.ohio-state.edu>, <mike@elec.canterbury.ac.nz>, <FAUCONNE%FRSIM51.BITNET@cunyvm.cuny.edu>, <nreadwin@micrognosis.co.uk>, <DMH100@csc1.anu.oz.au>, <mats@efd.lth.se>, <GOLDICK@vulcan.psc.edu>, <peirce@gumby.cc.wmich.edu>, <NRA%ipg.ph.kcl.ac.uk@nsfnet-relay.ac.uk>, <arisia::EVERHART>
CC:	
Subj:	EVEP emulation: Part 1 of 5

Received: by ADVAX.DECnet (utk-mail11 v1.5) ; Mon, 26 Nov 90 18:52:09 EST
Received:  from mcnc by ge-dab.GE.COM (5.61/GE-DAB 1.15) with UUCP
	id AA04311 for everhart; Mon, 26 Nov 90 18:51:02 -0500
Received: from relay.CDNnet.CA by mcnc.mcnc.org (5.59/MCNC/6-11-90)
	id AA08182; Mon, 26 Nov 90 18:06:33 -0500
	for arisia.dnet.ge.com!EVERHART
Received: by relay.CDNnet.CA (4.1/1.14)
	id AA01870; Mon, 26 Nov 90 14:20:43 PST
Date: 26 Nov 90 20:10 -0800
From: Natalie Prowse <nat@drao.nrc.ca>
To: <ISIS08@ecostat.aau.dk>, <miller@ria.ccs.uwo.ca>,
        <alberto@pseudo.berkeley.edu>,
        <ROSS@bio-medical-physics.aberdeen.ac.uk>, <CAIRNS@upei.ca>,
        <davis@pacific.mps.ohio-state.edu>, <mike@elec.canterbury.ac.nz>,
        <FAUCONNE%FRSIM51.BITNET@cunyvm.cuny.edu>,
        <nreadwin@micrognosis.co.uk>, <DMH100@csc1.anu.oz.au>,
        <mats@efd.lth.se>, <GOLDICK@vulcan.psc.edu>,
        <peirce@gumby.cc.wmich.edu>, <NRA%ipg.ph.kcl.ac.uk@nsfnet-relay.ac.uk>,
        <arisia::EVERHART>
Message-Id: <205*nat@drao.nrc.CA>
Subject: EVEP emulation: Part 1 of 5
 
$! ------------------ CUT HERE -----------------------
$ v='f$verify(f$trnlnm("SHARE_VERIFY"))'
$!
$! This archive created by VMS_SHARE Version 7.1-004  3-AUG-1989
$!   On 26-NOV-1990 11:37:29.66   By user SYSTEM 
$!
$! This VMS_SHARE Written by:
$!    Andy Harper, Kings College London UK
$!
$! Acknowledgements to:
$!    James Gray       - Original VMS_SHARE
$!    Michael Bednarek - Original Concept and implementation
$!
$!+ THIS PACKAGE DISTRIBUTED IN 5 PARTS, TO KEEP EACH PART
$!  BELOW 30 BLOCKS
$!
$! TO UNPACK THIS SHARE FILE, CONCATENATE ALL PARTS IN ORDER
$! AND EXECUTE AS A COMMAND PROCEDURE  (  @name  )
$!
$! THE FOLLOWING FILE(S) WILL BE CREATED AFTER UNPACKING:
$!       1. EMACS.DOC;1
$!       2. EVEP.EL;1
$!       3. EM-FILL.EL;1
$!       4. EMACS.;1
$!
$set="set"
$set symbol/scope=(nolocal,noglobal)
$f=f$parse("SHARE_TEMP","SYS$SCRATCH:.TMP_"+f$getjpi("","PID"))
$e="write sys$error  ""%UNPACK"", "
$w="write sys$output ""%UNPACK"", "
$ if f$trnlnm("SHARE_LOG") then $ w = "!"
$ if f$getsyi("version") .ges. "V4.4" then $ goto START
$ e "-E-OLDVER, Must run at least VMS 4.4"
$ v=f$verify(v)
$ exit 44
$UNPACK: SUBROUTINE ! P1=filename, P2=checksum
$ if f$search(P1) .eqs. "" then $ goto file_absent
$ e "-W-EXISTS, File ''P1' exists. Skipped."
$ delete/nolog 'f'*
$ exit
$file_absent:
$ if f$parse(P1) .nes. "" then $ goto dirok
$ dn=f$parse(P1,,,"DIRECTORY")
$ w "-I-CREDIR, Creating directory ''dn'."
$ create/dir 'dn'
$ if $status then $ goto dirok
$ e "-E-CREDIRFAIL, Unable to create ''dn'. File skipped."
$ delete/nolog 'f'*
$ exit
$dirok:
$ w "-I-PROCESS, Processing file ''P1'."
$ define/user sys$output nl:
$ EDIT/TPU/NOSEC/NODIS/COM=SYS$INPUT 'f'/OUT='P1'
PROCEDURE Unpacker ON_ERROR ENDON_ERROR;SET(FACILITY_NAME,"UNPACK");SET(
SUCCESS,OFF);SET(INFORMATIONAL,OFF);f:=GET_INFO(COMMAND_LINE,"file_name");
buff:=CREATE_BUFFER(f,f);p:=SPAN(" ")@r&LINE_END;POSITION(BEGINNING_OF(buff))
;LOOP EXITIF SEARCH(p,FORWARD)=0;POSITION(r);ERASE(r);ENDLOOP;POSITION(
BEGINNING_OF(buff));g:=0;LOOP EXITIF MARK(NONE)=END_OF(buff);x:=
ERASE_CHARACTER(1);IF g = 0 THEN IF x="X" THEN MOVE_VERTICAL(1);ENDIF;IF x=
"V" THEN APPEND_LINE;MOVE_HORIZONTAL(-CURRENT_OFFSET);MOVE_VERTICAL(1);ENDIF;
IF x="+" THEN g:=1;ERASE_LINE;ENDIF;ELSE IF x="-" THEN g:=0;ENDIF;ERASE_LINE;
ENDIF;ENDLOOP;p:="`";POSITION(BEGINNING_OF(buff));LOOP r:=SEARCH(p,FORWARD);
EXITIF r=0;POSITION(r);ERASE(r);COPY_TEXT(ASCII(INT(ERASE_CHARACTER(3))));
ENDLOOP;o:=GET_INFO(COMMAND_LINE,"output_file");WRITE_FILE(buff,o);
ENDPROCEDURE;Unpacker;EXIT;
$ delete/nolog 'f'*
$ CHECKSUM 'P1'
$ IF CHECKSUM$CHECKSUM .eqs. P2 THEN $ EXIT
$ e "-E-CHKSMFAIL, Checksum of ''P1' failed."
$ ENDSUBROUTINE
$START:
$ create/nolog 'f'
X`009`009`009EMACS - EVE-PLUS MODE
X
X
XGOLD-`094g  `009= keyboard-quit `009- QUIT THE CURRENT FUNCTION (aka GET ME
V OUTTA THIS!)
XGOLD-U   `009= undo                  - INCREMENTALLY UNDO PREVIOUS FUNCTIONS
V!!
XGOLD-.          = redraw-display`009- aka REFRESH
XESC-?`009`009= apropos`009`009- HELP function.  Give word or phase.  returns
V help
X`009`009`009`009`009  in *Help* buffer.
XCTRL/X-CTRL/C`009= exit emacs and save files
X            `032
X                          `032
X-----------------------------
X`124  MOVING ABOUT THE SCREEN  `124
X-----------------------------                         `032
X
XCTRL-D`009`009= change direction`009   - toggle the 'direction' mode (affect
Vs searching)
XGOLD-% `009`009= goto-percent`009`009   - goto n% of the file
XGOLD-=          = goto-line`009`009   - User is prompted for line number to
V go to
XGOLD-`096`009`009= what-line`009`009   - tells WHAT LINE the user is on
XGOLD-P`009`009= fill-paragraph-and-align - Just what it says....`009   `032
XGOLD-up_arrow   = line-to-top-of-window    - make current line at top of win
Vdow
XGOLD-down-arrow = line-to-bottom-of-window - make current line at bottom of
V window
XGOLD-right-arrow= shift-screen-right`009   - Shift screen right 40 columns
XGOLD-left-arrow = shift-screen-left`009   - shift the screen left 40 columns
XGOLD-W`009`009= toggle-wrap`009`009   - toggles between wrapping and not wra
Vpping lines
X`009`009`009`009`009     longer than the screen width.  In 'no-wrap' mode,
X`009`009`009`009`009     long lines have a '$' at the end to indicate that
X`009`009`009`009`009     they are longer than the width of the screen.
X`009`009`009`009`009     In 'wrap' mode, wrapped lines end in a '\'
X
X
X---------------------------------
X`124  KEYBOARD MACROS  aka "LEARN" `124                            `032
X---------------------------------
X                  `032
XGOLD-ENTER`009= start-kbd-macro`009- Just like EVE LEARN.  Saves your keystr
Vokes.
XCTRL/R`009`009= map-keyboard-macro`009- Just like EVE 'remember'. Halts the
V saving
X`009`009`009`009`009     of keystrokes. Prompts for key to map macro to
XDO repeat       = repeat                - Prompts user for number of times t
Vo repeat a macro
X`009`009`009`009`009  key
X#$#
X-------------
X`124 SEARCHING `124
X-------------
X
XGOLD-FIND       = find       `009`009 - prompts for 'find string' and goes t
Vo next occurance
XGOLD-PF3`009
X
XFIND            = "find-next"`009`009 - goes to next occurance of previously
V entered`032
X`009`009`009`009`009   'find string' in current buffer.`032
X
XGOLD-F`009`009= occur`009`009         - prompts for string and FINDS ALL OCC
VURANCES.
X`009`009`009`009`009   Lists, by line number, all occurances found,`032
X`009`009`009`009`009   and puts in *Occur* buffer.  One can then
X`009`009`009`009`009   use GOLD-= to goto a specific line.  This
X`009`009`009`009`009   command is particularly good for checking
X`009`009`009`009`009   for matching IF-CIF, or LOOP-CLOOP.
X                                           (NOTE: a `094C`094C in the *Occur
V* buffer will take
X`009`009`009`009`009   you to the corresponding line in the original
X`009`009`009`009`009   buffer)
X
XGOLD-enter      =query-replace`009         - Prompts user for inputs. Moves
V forward through
X`009`009`009`009`009   file querying replacements.  Use the following
X`009`009`009`009`009   keys:
X`009`009`009`009`009`009space-bar - replace this one and go on to next
X`009`009`009`009`009`009,         - replace this one, don't move
X`009`009`009`009`009`009DEL       - skip this one, go on to next
X`009`009`009`009`009`009!`009  - replace all remaining matches
X`009`009`009`009`009`009`094         - backup to previous match
X`009`009`009`009`009`009ESC       - exit query-replace mode
X
X`009`009`009`009`009    NOTE: you may reenter query-replace after exiting,
X`009`009`009`009`009    by typing CTRL/X ESC.
X#$#
X-------------------
X`124 BUFFER COMMANDS `124`032
X-------------------
X
XGOLD-B`009`009= buffer-menu           - Lists all active buffers - "*" indic
Vates modified buffers
X`009`009`009`009`009   By moving your cursor around in the *Buffer List*, yo
Vu`032
X`009`009`009`009`009   may execute following commands on the buffer listed o
Vn`032
X`009`009`009`009`009   the current line:
X
X                                            d - request to delete buffer lis
Vted on current line
X`009`009`009`009`009    s - request to save buffer listed on current line
X`009`009`009`009`009    u - remove any request from current line
X`009`009`009`009`009    x - perform any previously requested deletes/saves
X
X`009`009`009`009`009     NOTE: you can request to both DELETE and SAVE
X`009`009`009`009`009`009   a single buffer...
X
X`009`009`009`009`009    1 - select buffer in full screen window - immediatel
Vy
X`009`009`009`009`009    f - immediately select buffer in place of *Buffer Li
Vst*
X`009`009`009`009`009    o - immediately select buffer in other window, leavi
Vng
X`009`009`009`009`009`009*Buffer List* visible
X
X
X
X`094X-B`009`009= switch-to-buffer`009 - prompts for name of buffer to switch
V to.
XKP6`009`009= switch-to-buffer-other-window `032
XGOLD-KP6        = split screen `009`009 - TOGGLE between one and two windows
XGOLD-M`009`009= save-some-buffers`009 - queries user about which (changed) b
Vuffers to write
XGOLD-S`009`009= save-buffer`009`009 - saves only the current buffer to a fil
Ve (of same name)
XGOLD-V`009`009= find-file-other-window - split screen and prompt user for ot
Vher file to`032
X`009`009`009`009`009   put in new window          `032
XGOLD-num`009= map-buffer-to-key`009 - Where "num" is a number on the top-row
V of your
X`009`009`009`009`009   keyboard.  Maps top row keys to buffers so that
X`009`009`009`009`009   you can switch rapidly between buffers.  If the
X`009`009`009`009`009   Key has not yet been mapped, you are prompted`032
X`009`009`009`009`009   for the name of a file to load.  The newly
X`009`009`009`009`009   loaded file is mapped to the buffer
XGOLD-0`009`009= buffer menu            - see description above...
XGOLD-K`009`009= kill-buffer            - Kill a buffer.  Defaults to current
V buffer, but
X`009`009`009`009`009   asks you anyway, and prompts if you wish to save
X`009`009`009`009`009   it before killing it.
X
X-----------------------
X`124 CUTTING AND PASTING `124
X-----------------------
X
X"remove" KEY`009= delete-to-cutbuffer`009 - clear the "paste" buffer, put th
Ve selected region in
X or`009`009`009`009`009   the "paste" buffer (from the point at which you
XKP9`009`009`009`009`009   pressed "select", to the current cursor position),
X`009`009`009`009`009   and delete the selected region from the current buffe
Vr.
X
X"insert" KEY`009= insert-buffer`009`009 - Insert contents of "paste" buffer
V in current buffer.
Xor GOLD-KP9`032
X
XGOLD-"remove"   = append-to-cutbuffer    - copy the selected region to the e
Vnd of the "paste"
X`009`009`009`009`009   buffer. DOES NOT clear the "paste buffer" first,
X`009`009`009`009`009   and DOES NOT delete selected region from current
X`009`009`009`009`009   buffer.
X
XDO set-rectangular`009`009         - sets rectangular mode ON so that subseq
Vuent cut and
X`009`009`009`009`009   paste functions act (sort of) like eve cut and
X`009`009`009`009`009   paste rectangular.  THE APPEND-TO-CUTBUFFER DOES
X`009`009`009`009 `009   NOT WORK IN THIS MODE! (GOLD-REMOVE). Difference
X`009`009`009`009`009   from EVE's implementation:  EVE does this in an
X`009`009`009`009`009   overstrike-mode style, whereas EMACS does it in
X`009`009`009`009`009   an insert-mode style - try it and see.
X
XDO set-norectangular`009`009`009 - Returns to standard cut and paste mode.
X#$#`009`009`009`009`009
X
X-----------
X`124  FILES  `124
X-----------
X
XGOLD-D`009`009= dired`009`009- Full screen directory editor! Prompts for dir
Vectory
X`009`009`009`009  to display - defaults to current directory.
X`009`009`009`009  Type 'h' after entering dired for more info. Some
X`009`009`009`009  functions are as follows:
X
X      `009`009`009`009        d = flag this file for deletion
X`009`009`009`009`009u = remove deletion-flag on this line
X`009`009`009`009`009# = flag all autosave files (files whose names
X`009`009`009`009`009    start and end with '#') for deletion
X`009`009`009`009`009`126 = flag all backup files  (files whose names
X`009`009`009`009`009    end with '`126') for deletion
X`009`009`009`009`009x = execute deletions on files flagged by above`032
X`009`009`009`009`009    commands
X
X`009`009`009`009`009c = copy the file on the current line. You are
X`009`009`009`009`009    prompted for the 'to' file name.
X`009`009`009`009`009f = create (if one does not already exist) a`032
X`009`009`009`009`009    a buffer, load the file, and go to that
X`009`009`009`009`009    buffer immediately.
X`009`009`009`009`009o = like 'f', but splits screen and creates
X`009`009`009`009`009    another window for the file's buffer.
X`009`009`009`009`009r = rename the file on the current line. You are
X`009`009`009`009`009    prompted for the 'to' file name.
X
X--------------------------
X`124 RECOVERY AFTER A CRASH `124
X--------------------------
X
XEmacs periodically 'auto-saves' files, as you are editing.  To recover
Xa file after a crash, enter emacs and type: ESC/X`032
XAt the command line prompt, type: recover-file
XYou will be prompted for the filename to recover.  Give the ORIGINAL file na
Vme, and
XEmacs will load it, and then recover it from the #filename# auto-save file.
XTo save the newly recovered file, type CTRL/X CTRL/S
X#$#
X
X EMACS keypad`009`009`009     `032
X`009`009`009`009     `032
X  _____________________________________
V                                     `032
X  `124        `124   Top  `124fnd-next`124Del line`124      CTRL/A   - Toggl
Ve Ovrstrk/insert
X  `124  GOLD  `124 ------ `124 ------ `124 ------ `124      CTRL/R   - Remem
Vber            `032
X  `124        `124 Bottom `124  FIND  `124 Restore`124      GOLD-E   - Execu
Vte learn seq.  `032
X  `124________`124________`124________`124________`124      CTRL/D   - Chang
Ve direction    `032
X  `124Prev scr`124Next scr`124 Remove `124Del word`124      GOLD/->  - Shift
V right 40 cols
X  `124 ------ `124 ------ `124 ------ `124 ------ `124      GOLD/<-  - Shift
V left 40 cols  `032
X  `124   Do   `124 Select `124 Insert `124UNdel wd`124      ESC/?    - appro
Vpos (aka HELP)`032
X  `124________`124________`124________`124________`124      GOLD/n   - Displ
Vay Buffer n (n=1..9)
X  `124Prev wrd`124 Nxt wrd`124Other w `124Del char`124
V                                     `032
X  `124 ------ `124 ------ `124 ------ `124 ------ `124
V                                     `032
X  `124Inc file`124Get file`124splitscr`124UNdel ch`124      GOLD-KP7 - DO
V                                   `032
X  `124--------`124--------`124--------`124--------`124
X  `124 BOL    `124 EOL    `124 upcase `124        `124      DO/describe-key
V  - press a key sequence, and
X  `124 ------ `124 ------ `124 ------ `124Replace `124
V                         it tells you the function
X  `124Write f.`124Del EOL `124Lowercas`124        `124
V                         mapped to that sequence...
X  `124________`124________`124________`124 ------ `124`032
X  `124 advance one line`124shel cmd`124        `124`032
X  `124 --------------- `124--------`124 Learn  `124      CTRL/Z   - exit and
V suspend EMACS`032
X  `124 open line above `124 REFRESH`124        `124                 (to get
V going again, type: %em )
X  `124_________________`124________`124________`124   `032
X`009`009`009`009`009     CTRL/X CTRL/C - exit emacs, and query about
X                                `009`009`009     writing modified buffers.
X     `032
X    INVOKE: $ em  `091filename`093`009
X
X
X
$ CALL UNPACK EMACS.DOC;1 2050912643
$ create/nolog 'f'
+-+-+-+-+-+-+-+-  END  OF PART 1 +-+-+-+-+-+-+-+-
