ECCE

KEY The Edinburgh Compatible Context Editor is available on EMAS as a standard command. It is fully described in the EMAS 2900 User's Guide. Note that other editors are available: CHEF, EDIT, EM

TITLE The ECCE command KEY ECCE(oldfile) - to amend an existing file ECCE(oldfile,newfile) - creates (or overwrites) 'newfile' with the edited 'oldfile', leaving 'oldfile' unaltered. ECCE(,newfile) - creates (or overwrites) 'newfile'

TITLE Simple commands KEY A ADJUST the current paragraph according to the %A parameters when in primary input mode ABSTRACT all text between the last NOTEd position and the file pointer when in secondary input mode B BREAK: insert a newline at the current position C cause CASE inversion of the next character if a letter D/TEXT/ DELETE the first occurrence of TEXT on the current line E ERASE the next character F/TEXT/ FIND the first occurrence of TEXT G GET a line of input H HORIZONTALLY move the cursor to the column specified on the current line. H0 = H1 = H = start of line I/TEXT/ INSERT TEXT at the current position J JOIN the current line to the next line K KILL the current line L LEFT shift the file pointer by one character position M MOVE the file pointer to the next line N NOTE the current position (secondary input mode only) O OK the spelling of the word just queried (by Q) P PRINT the current line Q QUERY the spelling of the next unknown word in the file R RIGHT shift the file pointer by one character position S/STR/ SUBSTITUTE STR for the TEXT just FOUND, UNCOVERED or VERIFIED T/TEXT/ TRAVERSE TEXT. Move file pointer past first occurrence on current line U/TEXT/ UNCOVER TEXT. Remove all characters between the file pointer and the next occurrence of TEXT on the current line V/TEXT/ VERIFY that TEXT occurs immediately to the right of the file pointer W Macro invocation X Macro invocation Y Macro invocation Z Macro invocation ^ Mark the current position. Second use on same file line defines a string which can be referred to by @.

Summary of special (%) commands

KEY %A Assign, or get report of, parameters used by 'A' command ('Adjust') %B write Backup copy to file ECCE#BACKUP %C Close the editing session and delete ECCE#BACKUP if it exists %F FULL monitoring %H get HELP information (branches to View file describing ECCE) %I Specify input file of ECCE commands, to be obeyed immediately %L LOWER case terminal (case of input is always significant) %M MONITOR normally (default) %O secondary OUTPUT mode %P save Profile of currently defined macros and modes %Q QUIT edit without writing output file; confirmation requested %R RETRIEVE state of file before last file-changing command line %S Secondary input mode %T TERSE monitoring (used to be %Q - quiet) %U UPPER case terminal (default) %W Macro definition %X Macro definition %Y Macro definition %Z Macro definition %^ Unwind editing to before last command line (whether file changed or not)

TITLE Command Qualifiers KEY ( ) Bracket a group of commands for purposes of repetition and failure n Repeat last command line n times ? Optional execution of command \ Invert the failure condition - succeed if and only if the command fails , Alternative execution (IF-THEN-ELSE...) " Used after F, T or V to mean last text string specified with F, T or V, or found via Q " Used after D, I, S or U to mean last text string specified with D, I, S or U @ Refers to last (primary or secondary) file text defined by use of a ^....^ pair. Thus I@, F@, U@, etc. !COMMAND Use EMAS COMMAND while editing

TITLE Changes to ECCE (Spring 1985) KEY H Horizontal position - e.g. H10 moves current position to column 10 of current line, adding spaces to the line if necessary. Note: H0 = H1 = start of line. %R Retrieves editing - unwinds to before last file-changing command line. %^ Unwinds to before last command line, whether it changed the file or not. '%R' and '%^' replace '-' and '->' respectively. %H Help facility - branches to VIEW command without closing edit session. %T Terse monitoring. (Replaces %Q - quiet.) %Q Quit (abandon edit). Y/N confirmation required following %Q. Ctrl Y causes an immediate exit from ECCE, discarding the editing. %I=filename Specifies an input file of ECCE commands to be obeyed, up to the end of the file or %C (or %Q). Using the %I mechanism, ECCE now checks for the existence of file ECCE#START in the user's process, and obeys it if it exists, at the start of the edit session.
%A Adjust (formatting) facility. Used with 'A' command (see below). Adjusts paragraphs. Parameters are specified in the form >%A=pstart, start, line, justify, print, sgapxs E.g. >%a=1, 1, 75, 1, 0, 1 (these are the defaults) Any parameters not specified retain their former values. Parameters cannot be set negative; any attempt to do so is ignored. pstart: Starting column position for first line of paragraph. (Column positions go from 1 upwards - invalid settings are ignored.) start: Starting column position for subsequent lines. If start is greater than pstart, so that the first line of the paragraph is 'outdented' with respect to the remainder, then no spaces are added or removed from the outdented part of the first line when the paragraph is Adjusted. line: Column position for end of line (maximum).
justify: =0 lines filled but not right justified #0 lines filled and right justified. print: =0 paragraph not printed as it is Adjusted #0 paragraph printed as it is Adjusted. sgapxs The number of EXTRA spaces to be inserted between sentences. Parameter settings are remembered by the Profile (%P) facility. >%A (no parameter settings) causes current settings to be printed. A Adjusts current paragraph (lines delimited by blank lines or beginning or end of file), according to %A parameters (see above). No adjusting is done if current line is blank. In either case 'A' moves current position to start of next non-blank line. Meaning of 'A' in secondary input mode ('Abstract') is unchanged.
" can be used instead of a delimited string. Refers to the last string specified with a text location command (F,T,V or Q - see below) or a text manipulation command (D,I,S or U), as appropriate. For example: >f/Fred/ s/Joe/ m3 f" s" first " = /Fred/, second " = /Joe/ Q Query spelling. Moves to next questionable word (i.e. not found in System dictionary or user's private dictionary). See also 'O'. A 'word' is any sequence of letters. Case is ignored, as are one-letter words. Once a questionable word has been found it will not be found again in the same session. Q can be followed by S, the text replaced being the questionable word. Following Q, " can be used to refer to the word (see above). Any digit following Q specifies range of search, in lines. Thus Q3 looks for a questionable word in the next three lines - it does NOT execute Q three times.
O Spelling OK. Can ONLY be used following Q - thus repetition (e.g. O2) is not allowed. Causes word found by Q to be put into user's private dictionary (text file E#TEXTDICT in user's process). The dictionary created by the EDIT editor (file E#EDITDICT) will be used, and added to, if present; in this case E#TEXTDICT will only contain the words OK'd via ECCE. If Q is not followed by O then the word is not put into the user's dictionary.
^ Can be used in a command line. Two occurrences delimit text within a line of the primary or secondary file, as defined by the current position when ^ is specified. Thus: Here^ is a short piece of text >f/short/^r0^ would delimit the text 'short piece of text'. Delimited text can subsequently be referenced by use of @ instead of a normal string. Thus: >f@ following the above command line would find the next occurrence of the string 'short piece of text'. The current position must stay on the same file line while the two ^s are given, and the file must not be altered during this process. The start and finish positions can be specified in either order. Further examples: >m-0(^r0^bi@m)0 causes every line in the file to be repeated. >^(rv/ /\)*^(pf@)0 marks the text from the current position to the next space (or end-of-line), and then locates and prints all subsequent occurrences of it.