|Version 1 (modified by rme, 6 years ago)|
12 System Interface
Hemlock provides a number of commands that access operating system resources such as the filesystem and print servers. These commands offer an alternative to leaving the editor and using the normal operating system command language (such as the Unix shell), but they are implementation dependent. Therefore, they might not even exist in some implementations.
12.1 File Utility Commands
This section describes some general file operation commands and quick directory commands.
See section 6.1 for a description Hemlock's directory editing mechanism, Dired mode.
Copy File [Command]
This command copies a file, allowing one wildcard in the filename. It prompts for source and destination specifications.
If these are both directories, then the copying process is recursive on the source, and if the destination is in the subdirectory structure of the source, the recursion excludes this portion of the directory tree. Use dir-spec-1/* to copy only the files in a source directory without recursively descending into subdirectories.
If the destination specification is a directory, and the source is a file, then it is copied into the destination with the same filename.
The copying process copies files maintaining the source's write date.
See the description of Dired Copy File Confirm, page 6.1.5, for controlling user interaction when the destination exists.
Rename File [Command]
This command renames a file, allowing one wildcard in the filename. It prompts for source and destination specifications.
If the destination is a directory, then the renaming process moves file(s) indicated by the source into the directory with their original filenames.
For Unix-based implementations, if you want to rename a directory, do not specify the trailing slash in the source specification.
Delete File [Command]
This command prompts for the name of a file and deletes it.
Directory (bound to C-x C-d) [Command]
Verbose Directory (bound to C-x C-D) [Command]
These commands prompt for a pathname (which may contain wildcards), and display a directory listing in a pop-up window. If a prefix argument is supplied, then normally hidden files such as Unix dot-files will also be displayed. Directory uses a compact, multiple-column format; Verbose Directory displays one file on a line, with information about protection, size, etc.
Print Region [Command]
Print Buffer [Command]
Print File [Command]
Print Region and Print Buffer print the contents of the current region and the current buffer, respectively. Print File prompts for a the name of a file and prints that file. Any error messages will be displayed in the echo area.
Print Utility (initial value "/usr/cs/bin/lpr") [Variable]
Print Utility Switches (initial value ()) [Variable]
Print Utility is the program the print commands use to send files to the printer. The program should act like lpr: if a filename is given as an argument, it should print that file, and if no name appears, standard input should be assumed. Print Utility Switches is a list of strings specifying the options to pass to the program.
Scribe Buffer File [Command]
Scribe Buffer File Confirm (initial value t) [Variable]
Scribe File [Command]
Scribe Buffer File invokes Scribe Utility on the file associated with the current buffer. That process's default directory is the directory of the file. The process sends its output to the Scribe Warnings buffer. Before doing anything, this asks the user to confirm saving and formatting the file. This prompting can be inhibited with "Scribe Buffer File Confirm".
Scribe File invokes Scribe Utility on a file supplied by the user in the same manner as describe above.
Scribe Utility (initial value "/usr/misc/bin/scribe") [Variable]
Scribe Utility Switches (initial value ) [Variable]
Scribe Utility is the program the Scribe commands use to compile the text formatting. Scribe Utility Switches is a list of strings whose contents would be contiguous characters, other than space, had the user invoked this program on a command line outside of Hemlock. Do not include the name of the file to compile in this variable; the Scribe commands supply this.
Select Scribe Warnings (bound to Scribe: C-M-C) [Command]
This command makes the Scribe Warnings buffer current if it exists.
Manual Page [Command]
This command displays a Unix manual page in a buffer which is in View mode. When given an argument, this puts the manual page in a pop-up display.
Unix Filter Region [Command]
This command prompts for a UNIX program and then passes the current region to the program as standard input. The standard output from the program is used to replace the region. This command is undoable.