Museum

Home

Lab Overview

Retrotechnology Articles

Online Manuals

⇒ e(1) — Reliant UNIX 5.44c4

Media Vault

Software Library

Restoration Projects

Artifacts Sought

e(1)                                                                   e(1)

NAME
     e - the Rand editor

SYNOPSIS
     e [options] [mainfile [altfile]]

DESCRIPTION
     The Rand editor e is a full screen editor which treats a text file as
     a two-dimensional surface with text on it. Among its more unusual
     features are manipulating rectangular areas of text, editing several
     files at once, and displaying text in one or more windows. While it is
     not as powerful as emacs, or as widely used as vi, most people at Rand
     prefer its easy to learn commands and use it to edit both programs and
     text. e is a complete rewrite of the Rand NED editor of several years
     back. The current version (E18) has been improved to take advantage of
     terminals that have the ability to do local insert/delete line, and it
     can now use terminfo so that most terminals with direct cursor
     addressing can be used.

     The mainfile on the command line is the file which is initially
     displayed in the editor. If the file doesn't exist, the user will be
     asked if it should be created. If in addition, an altfile is specified
     on the command line, it will be read in as the initial alternate file.
     If no filenames are present on the command line, e will attempt to
     continue from your previous editing session. To do this it saves
     "state" in a file called .es1 in your current working directory.
     Before invoking the editor, be sure and specify your terminal type by
     setting the TERM environment variable.

OPTIONS
     -help
          This causes a display of the currently available options and
          their values along with the version number of the editor.

     -bullets or -nobullets
          Options -bullets and -nobullets forces border bullets on or off
          regardless of line speed or terminal type. Line speeds of 1200
          baud and slower and some terminal types set border bullets off in
          the absence of these options.

     -i[nplace]
          Option -inplace preserves file links except for singly-linked
          files. From within the editor, link preservation can be turned on
          and off, even for singly-linked files, by the update command.

     -te[rminal]=termtype
          Option -terminal=termtype identifies the terminal type expli-
          citly. In the absence of the -terminal option the terminal type
          is retrieved from the TERM environment variable.






Page 1                       Reliant UNIX 5.44                Printed 11/98

e(1)                                                                   e(1)

          If there is no compiled-in code for the terminal, the terminfo
          entry for the terminal type will be used and the "standard" key-
          board will be assigned.

     -ke[yboard]=termtype
          Option -keyboard=termtype sets the keyboard type to termtype. It
          overrides any -terminal= argument and also any EKBD environment
          variable.

     -kb[file]=keyboardfile
          Option -kbfile=keyboardfile replaces the keys assignment as
          described in keyboardfile. This option overrides any EKBFILE
          environment variable.

     -notracks
          Option -notracks will allow you to edit a file without using or
          disturbing the work files (keys, state, and change files) from
          your previous session.

     -l[ock]
          Option -lock enables the editor to lock the edited files and to
          perceive locked files by other sessions. This is not possible via
          NFS.

     -reg[exp]
          Option -regexp will allow you to state regular expressions for
          searching and replacing.

     -replay=filename
          Option -replay=filename allows you to replay with a specified
          keys file, where filename represents that keys file. Use -silent
          when the replay display is not desired. The message "***replay
          completed" or "***replay aborted" signals the end of the replay.
          The <CTRL-E> key can be used to stop the replay short of comple-
          tion. Files .ec1* and .ek1* must not be present if the replay is
          to work.

     -norecover
          Option -norecover will open the edit session as defined by the
          .es1 state file, ignoring any recovery processing of a prior
          crashed or aborted session.

     -v[iew]
          Option -view allows you only to look at the files but not to
          change them.

COMMANDS
     The following commands are available to the user by opening the com-
     mand line via the <CMD> key and entering the command. The entered com-
     mand is parsed and executed when the <RETURN> key is typed.




Page 2                       Reliant UNIX 5.44                Printed 11/98

e(1)                                                                   e(1)

     In the following discussion, brackets ("[", "]") indicate options, and
     vertical bar ("|") indicates optional choices.

     There are two types of areas: a range of lines (indicated by range)
     and a marked retangle of text (indicated by rectangle). Some commands
     will take either type of area, this is indicated by area.

     A range can be specified either by marking or by a number followed by
     "l" for lines or "p" for paragraphs; rectangular areas must be marked.
     The default range is one line for most commands (fill, adjust and
     center default to one paragraph).

     b | bye | ex | exit [n[o[save]]] | quit | a[bort] | dump]
          Exit the editor. The different exit options affect whether or not
          the editor updates the edited files or not, and whether the ".e"
          state files are changed. The following table give the complete
          exit story.
          _________________________________________________________________
         |              |   Saves |   Update |   Remove    |  Remove      |
         |              |   Files |   State  |   Key file  |  Change file |
         |______________|_________|__________|_____________|______________|
         |  exit        |     X   |     X    |      X      |       X      |
         |  exit nosave |     -   |     X    |      X      |       X      |
         |  exit quit   |     -   |     -    |      X      |       X      |
         |  exit abort  |     -   |     -    |      -      |       X      |
         |  exit dump   |     -   |     -    |      -      |       -      |
         |______________|_________|__________|_____________|______________|

     blot     adjust | close | erase | pick | run | box
     -blot    adjust | close | erase | pick | run | box
     cover    adjust | close | erase | pick | run | box
     insert   adjust | close | erase | pick | run | box
     overlay  adjust | close | erase | pick | run | box
     underlay adjust | close | erase | pick | run | box
          All of these commands take the named buffer (one of adjust,
          close, erase, pick, run, or box) and add or merge it into the
          current file.

          insert takes the named buffer, moves the existing text to make
          room for it, and then inserts it at the current text location. It
          is identical to the -pick command, except that now the other
          named buffers can also be inserted.

          cover places the named buffer over top of the text without moving
          anything.

          overlay is like cover, except that only the printing characters
          in the buffer clobber the original text.

          underlay is the reverse of overlay, i.e. the buffer covers only
          the non-printing characters of the original text.



Page 3                       Reliant UNIX 5.44                Printed 11/98

e(1)                                                                   e(1)

          blot is like overlay except that positions in the file corre-
          sponding to printing characters in the buffer are erased.

          -blot is like blot except that positions in the file correspond-
          ing to blanks in the buffer are erased.

     [g]box rectangle
          Draws a box around the rectangle with "+", "|", and "-" charac-
          ters.

     ce[nter] [range] w[idth]=n
     fi[ll] [range] w[idth]=n
     ju[stify] [range] w[idth]=n
          These commands all act upon the range of text and then replace
          them with the modified results. center centers the text around
          the column (width/2), fill places as many words as possible on
          each line, and justify is like fill except that it also provides
          a smooth right-margin by embedding blanks. The old text is saved
          in the adjust buffer.

     cl[ose] [area]
     -cl[ose]
          close deletes the text from the file and remembers it in a close
          buffer, -close puts the close buffer back into the file at the
          current cursor position.

     command
     -command
          Usually you issue commands one at a time by typing the <CMD> key,
          the command, and then <RETURN>. The command command places you in
          a mode where you can keep typing commands without hitting the
          <CMD> key each time. To return to normal edit mode, issue the
          -command command.

     delete
          Tells the editor to delete the current file on exit.

     e[edit] [filename]
          If no filename is specified, the alternate file (if any) is
          brought up in the current window. Otherwise the specified file is
          displayed.

     er[ase] [area]
     -erase
          erase replaces the area by blanks and puts the contents into an
          erase buffer; -erase inserts the contents of this buffer at the
          current cursor position.

     feed [range] command-string
          A shell is started with the command-string, and the text in range
          is supplied to the shell as the standard input. Any results of
          the command are inserted before the first line in the range.


Page 4                       Reliant UNIX 5.44                Printed 11/98

e(1)                                                                   e(1)

     goto | go | g [b | line-number | e | rb | re]
          goto is a quick way of moving around a file. goto b moves to the
          beginning of the file, goto e moves to the end. A goto
          line-number goes to that line of the file; goto rb and goto re
          move to the beginning or end of a marked range (see the range
          command).

     jo[in] | -split
     sp[lit] | -join
          join (or -split) combines two lines, split (or -join) breaks a
          line in two.

     n[ame] newfilename
          Tells the editor to rename the current file to newfilename when
          it exits.

     op[en] [area]
          Move existing text to make room for area worth of blank lines (or
          a rectangle of blanks).

     p[ick] [area]
     -pi[ck]
          pick copies the area to a pick buffer, -pick inserts the pick
          buffer at the current cursor position.

     range [range]
     -range
     ?range
          The range command is another method of limiting the range of some
          commands (notably the replace, fill, justify and center com-
          mands). -range turns it off, ?range tells you the line numbers of
          the range area.

     red[raw]
          The redraw command is used to erase and redraw the editor windows
          in case something has happened to it (for example, line noise on
          dialup lines, or messages from the operator).

     rep[lace] [range] [option] /search-string/replace-string/
     -rep[lace] [range] [option] /search-string/replace-string/
          The replace command searches forward over the range replacing the
          search-string with the replace-string; -replace searches back-
          wards doing the same thing. The "/" delimiter can be replaced by
          other symbols if the search or replace strings contain a slash.
          Any non-control, non-alphanumeric character can be used as the
          delimiter.

          Two options can also be specified, they are show and
          int[eractive]. The show option allows the user to see the
          replacements as they occur, the interactive option additionally
          allows the user control over whether or not to make each replace-
          ment.


Page 5                       Reliant UNIX 5.44                Printed 11/98

e(1)                                                                   e(1)

     run [range] command-string
          The run command is similar to the feed command, except that the
          marked text is deleted and replaced by the results of running the
          command-string.

     sa[ve] newfilename
          Immediately write a copy of the file to newfilename.

     tab [column ...]
     -tab [column ...]
          tab sets tabs in the specified columns; -tab removes tabs in
          specified columns.

     tabs n
     -tabs
          tabs sets tabs every nth column, and -tabs removes all tabs.

     tabfile tabfilename
     -tabfile tabfilename
          tabfile sets tabs (-tabfile clears tabs) at every column listed
          in the tabfilename.

     track
     -track
          The track command is used to scroll the main and alternate files
          together. This is normally used to visually compare the main file
          and the alternate file by rapidly changing between them and
          watching what changes on the screen (similar to blink-comparators
          as used in astronomy). The -track command turns off the tracking
          mode.

     up[date] | -up[date] [i[nplace] | -i[nplace]]
          The update command tells the editor what to do on exit with the
          current file. The update command can be used to specify whether
          or not to break links, the -update command causes any changes to
          the current file to be ignored.

     w | windowcursor-pos [filename]
     -w | -window
          The window command will create a new window at the current cursor
          position (as long as the cursor is along the top or left mar-
          gins). If a filename is specified, that file is displayed in the
          new window, otherwise the current file is used. The -window com-
          mand deletes the current window.

STANDARD EDITOR KEYBOARD
     There is now a "standard" e keyboard, that is designed to be usable on
     all video display terminals. Either say e -keyboard=standard or setenv
     EKBD standard before running e to select this keyboard. This is also
     the keyboard that e will use if there is no specific knowledge of your
     type of terminal compiled into the editor.



Page 6                       Reliant UNIX 5.44                Printed 11/98

e(1)                                                                   e(1)

     This keyboard layout is designed to be used on terminals with no func-
     tion keys. ^H means <CTRL-H> and ^X-^U means <CTRL-X> followed by
     <CTRL-U>. The ALT entry gives you a choice of ^/ or ^ because one or
     the other or both will not work on some terminals ( is correct ASCII.)

                              Standard e keyboard
     ______________________________________________________________________
    |  Key (in alphabe- |             |   Function (in alphabe- |         |
    |  tical order)     |   Function  |   tical order)          |   Key   |
    |||||
    |  ^@               |   CMD       |   (extend)              |   ^X    |
    |___________________|_____________|_________________________|_________|
    |  ^A               |   CMD       |   +LINE                 |   ^F    |
    |___________________|_____________|_________________________|_________|
    |  ^B               |   -WORD     |   +PAGE                 |   ^R    |
    |___________________|_____________|_________________________|_________|
    |  ^C               |   BSP       |   +SRCH                 |   ^Y    |
    |___________________|_____________|_________________________|_________|
    |  ^D               |   -LINE     |   +TAB                  |   ^I    |
    |___________________|_____________|_________________________|_________|
    |  ^E               |   -PAGE     |   +WORD                 |   ^N    |
    |___________________|_____________|_________________________|_________|
    |  ^F               |   +LINE     |   -LINE                 |   ^D    |
    |___________________|_____________|_________________________|_________|
    |  ^G               |   HOME      |   -PAGE                 |   ^E    |
    |___________________|_____________|_________________________|_________|
    |  ^H               |   LEFT      |   -SRCH                 |   ^T    |
    |___________________|_____________|_________________________|_________|
    |  ^I               |   +TAB      |   -TAB                  |   ^X-^U |
    |___________________|_____________|_________________________|_________|
























Page 7                       Reliant UNIX 5.44                Printed 11/98

e(1)                                                                   e(1)

     ______________________________________________________________________
    | Key (in alphabe-  |             |  Function (in alphabe- |          |
    | tical order)      |  Function   |  tical order)          |  Key     |
    |||||
    | ^J                |  DOWN       |  -WORD                 |  ^B      |
    |___________________|_____________|________________________|__________|
    | ^K                |  UP         |  ALT                   |  ^X-^A   |
    |                   |             |                        |  or ^_   |
    |                   |             |                        |  or ^/   |
    |___________________|_____________|________________________|__________|
    | ^L                |  RIGHT      |  BSP                   |  ^C      |
    |___________________|_____________|________________________|__________|
    | ^M                |  RETURN     |  CHG WIN               |  ^X-^W   |
    |___________________|_____________|________________________|__________|
    | ^N                |  +WORD      |  CLOSE                 |  ^V      |
    |___________________|_____________|________________________|__________|
    | ^O                |  OPEN       |  CMD                   |  ^A      |
    |                   |             |                        |  or NULL |
    |                   |             |                        |  or ^@   |
    |___________________|_____________|________________________|__________|
    | ^P                |  PICK       |  CTRLCHAR              |  ^X-^C   |
    |___________________|_____________|________________________|__________|
    | ^Q                |  (not used) |  DELCHAR               |  ^W      |
    |___________________|_____________|________________________|__________|
    | ^R                |  +PAGE      |  DOWN                  |  ^J      |
    |___________________|_____________|________________________|__________|
    | ^S                |  (not used) |  ERASE                 |  ^X-^E   |
    |                   |             |                        |  or ^^   |
    |___________________|_____________|________________________|__________|
    | ^T                |  -SRCH      |  HOME                  |  ^G      |
    |___________________|_____________|________________________|__________|
    | ^U                |  MARK       |  INSERT                |  ^Z      |
    |                   |             |                        |  or ESC  |
    |                   |             |                        |  or ^[   |
    |___________________|_____________|________________________|__________|
    | ^V                |  CLOSE      |  INT                   |  ^\      |
    |___________________|_____________|________________________|__________|
    | ^W                |  DELCHAR    |  JOIN                  |  ^X-^J   |
    |___________________|_____________|________________________|__________|
    | ^X                |  (extend)   |  LEFT                  |  ^H      |
    |___________________|_____________|________________________|__________|
    | ^Y                |  +SRCH      |  MARK                  |  ^U      |
    |___________________|_____________|________________________|__________|
    | ^Z                |  INSMODE    |  OPEN                  |  ^O      |
    |___________________|_____________|________________________|__________|
    | ^[                |  INSERT     |  PICK                  |  ^P      |
    |___________________|_____________|________________________|__________|
    | ^\                |  INT        |  REPL                  |  ^X-^R   |
    |                   |             |                        |  or ^]   |
    |___________________|_____________|________________________|__________|




Page 8                       Reliant UNIX 5.44                Printed 11/98

e(1)                                                                   e(1)

     ______________________________________________________________________
    |  Key (in alphabe- |             |   Function (in alphabe- |         |
    |  tical order)     |   Function  |   tical order)          |   Key   |
    |||||
    |  ^]               |   REPL      |   RETURN                |   ^M    |
    |___________________|_____________|_________________________|_________|
    |  ^^               |   ERASE     |   RIGHT                 |   ^L    |
    |___________________|_____________|_________________________|_________|
    |  ^_               |   ALT       |   SPLIT                 |   ^X-^B |
    |___________________|_____________|_________________________|_________|
    |  ^/               |   ALT       |   TABS                  |   ^X-^T |
    |___________________|_____________|_________________________|_________|
    |  ^X-^A            |   ALT       |   UP                    |   ^K    |
    |___________________|_____________|_________________________|_________|
    |  ^X-^C            |   CTRLCHAR  |   WIN LEFT              |   ^X-^H |
    |___________________|_____________|_________________________|_________|
    |  ^X-^E            |   ERASE     |   WIN RIGHT             |   ^X-^L |
    |___________________|_____________|_________________________|_________|
    |  ^X-^H            |   WIN LEFT  |                         |         |
    |___________________|_____________|_________________________|_________|
    |  ^X-^J            |   JOIN      |                         |         |
    |___________________|_____________|_________________________|_________|
    |  ^X-^L            |   WIN RIGHT |                         |         |
    |___________________|_____________|_________________________|_________|
    |  ^X-^R            |   REPL      |                         |         |
    |___________________|_____________|_________________________|_________|
    |  ^X-^B            |   SPLIT     |                         |         |
    |___________________|_____________|_________________________|_________|
    |  ^X-^T            |   TABS      |                         |         |
    |___________________|_____________|_________________________|_________|
    |  ^X-^U            |   -TAB      |                         |         |
    |___________________|_____________|_________________________|_________|
    |  ^X-^W            |   CHG WIN   |                         |         |
    |___________________|_____________|_________________________|_________|

ENVIRONMENT VARIABLES
     TERM The TERM environment variable defines the terminal type. If there
          is no compiled in code for the terminal e will look in
          $TERMINFO/firstletterof$TERM/$TERM for a definition of the
          terminal.

     EKDB The environment variable EKBD defines the keyboard type if dif-
          ferent from the TERM type.

     editalt
          The editalt environment variable will be used as the name of the
          alternate file. If an alternate filename is given on both the
          command line and with the editalt variable, the editalt name wins
          (this is the reverse of what it should be and will change in
          future versions).




Page 9                       Reliant UNIX 5.44                Printed 11/98

e(1)                                                                   e(1)

     EKBFILE
          The EKBFILE environment variable will be used as the name of a
          special keyboard file used by the Rand editor. The default mean-
          ing of keys are listed below.

     EEDFILE
          The Rand editor sets the environment variable EEDFILE to the
          filename that is just edited in the current session.

FILES
     e creates and maintains several ".e" files. They are used to keep
     track of the current editing session and can normally be ignored by
     the user. The following information is for the curious.

     .es1 File .es1 contains state information on the last edit session. It
          is created or updated at the end of a normally terminated edit
          session.

     .ec1 File .ec1 indicates the last edit session in this directory
          crashed.

     .ek1 File .ek1 contains a history of the last edit sessions keyboard
          inputs. The .ek1 file is updated at regular intervals so that a
          minimum of work is lost on edit or system crashes.

     .ek1b
          File .ek1b is the .ek1 file prior to a recovery replay.

     .ek1*
          The presence of any .ek1* file indicates that the last session in
          this directory abnormally terminated and that the next edit ses-
          sion will do recovery processing unless option -norecover is
          used. File .ek1 means abort, .ec1 means crash.

     Note that if the login user is not the owner of the current directory
     the above files will be suffixed with the login users name. If the
     user has no write permission in the current directory, these files are
     created in the directory /usr/etmp.

     There are also a few utility files in the directory /etc/e.

     #p   The pick file #p is re-created for each editor. It is used to
          store all text portions you can plach in the pick buffer during
          the editor session. The file is continually updated on the disk,
          and it can be used for recovery in the event of an abnormal ter-
          mination.

          During the editor session you can display this file as an alter-
          nate text in your window or another window to copy once more any
          text fragments you once had in the pick buffer.




Page 10                      Reliant UNIX 5.44                Printed 11/98

e(1)                                                                   e(1)

     #o   The open file #o is also re-created for each editor session. It
          is used to store all text fragments you place in the close or
          erase buffer during the editor session or that were processed
          with the fill, justify or center command (in the original condi-
          tion). The file is continually updated on the disk and can be
          used for recovery in the event of abnormal termination.

          During the editor session, you can display this file as an alter-
          nate text in your window or another window to copy in their ori-
          ginal condition any text fragments you have processed in this way
          or deleted.

NOTES
     By far the worst problem with e is its treatment of tabs. e is a
     "white space" editor, all white space is considered equal. On any line
     that e modifies, it will compress multiple initial blanks to tabs,
     strip trailing blanks, and convert any embedded tabs to blanks. This
     is acceptable for most editing, but some programs expect real tab
     characters as input, for example tbl(1M) and some nroff(1M) commands.



































Page 11                      Reliant UNIX 5.44                Printed 11/98

Typewritten Software • bear@typewritten.org • Edmonds, WA 98026