PMDF User's Guide
OpenVMS Edition


Previous Contents Index

8.9.1 Selecting an Editor

When you use the EDIT command or the /EDIT qualifier with the ANSWER, SEND, FORWARD, READ, REPLY, and DIRECTORY commands, an editor is invoked from which you can compose or edit your message. PMDF MAIL provides two methods for selecting which editor to use for editing operations. The first method is controlled with the SET EDITOR command while the second method is controlled through the MAIL$EDIT logical. If the MAIL$EDIT logical is defined, it will take precedence over any SET EDITOR setting.

If neither of these methods is used, then the EDT editor will be used to for editing.

To select system-wide a different choice of editor, use the SET EDITOR/SYSTEM_DEFAULT command. Individual users can then override this with either the SET EDITOR command or the MAIL$EDIT logical.

8.9.1.1 The SET EDITOR Command

Use the SET EDITOR command to specify which editor you would like to use. For instance, to select TPU as the default editor, issue the command


EMAIL> SET EDITOR TPU
EMAIL> 

Use the SHOW EDITOR command to determine what your editor selection is set to:


EMAIL> SHOW EDITOR
Your editor is TPU. 
EMAIL> 

Any SET EDITOR setting will be ignored if the MAIL$EDIT logical is defined and translates to a non-blank string. This logical is described in Section 8.9.1.2.

8.9.1.2 The MAIL$EDIT Logical

The logical MAIL$EDIT, if it is defined, will override any SET EDITOR setting. If the translation value has the form CALLABLE_x, then "x" is assumed to be the name of a callable editor accessible through a shareable image. Otherwise, the translation value is assumed to be a DCL command to issue from a spawned subprocess.

When MAIL$EDIT translates to a string of the form CALLABLE_x, then the remainder of the translation value must be the name of an editor which has a shareable image pointed at by the logical xSHR. The image must contain a routine named x$EDIT which takes as its two arguments the input and output file names passed by reference to string descriptors. The shareable image must be installed and the logical must be an executive mode logical so that the routine can be dynamically loaded and linked from PMDF MAIL which is a privileged image.

If MAIL$EDIT's translation value does not begin with "CALLABLE_", then the translation value is assumed to be a DCL command to execute from a spawned subprocess. Usually, MAIL$EDIT will be defined as follows


$ DEFINE MAIL$EDIT "@file-spec" 
with file-spec the full file specification of a DCL command procedure. Prior to executing the command, four parameters will be appended to it: the input file name, the output file name, the PMDF MAIL command which was issued, and the initial line number on which to place the edit insertion point (i.e., the line to initially place the cursor on). The third parameter will always be one of EDIT, DIRECTORY, DIRECTORY/FOLDER, FORWARD, READ, REPLY, or SEND.


Previous Next Contents Index