home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Fresh Fish 8
/
FreshFishVol8-CD1.bin
/
new
/
util
/
edit
/
jade
/
man
/
jade.info-10
(
.txt
)
< prev
next >
Wrap
GNU Info File
|
1994-10-16
|
36KB
|
687 lines
This is Info file jade.info, produced by Makeinfo-1.55 from the input
file jade.texi.
START-INFO-DIR-ENTRY
* Jade: (jade). An editor for X11 and AmigaDOS
END-INFO-DIR-ENTRY
This is Edition 1.3, last updated 7 October 1994, of `The Jade
Manual', for Jade, Version 3.2.
Jade is a text editor for X11 (on Unix) and the Amiga.
Copyright 1993, 1994 John Harper.
Permission is granted to make and distribute verbatim copies of this
manual provided the copyright notice and this permission notice are
preserved on all copies.
Permission is granted to copy and distribute modified versions of
this manual under the conditions for verbatim copying, provided that
the entire resulting derived work is distributed under the terms of a
permission notice identical to this one.
File: jade.info, Node: Process Objects, Next: Asynchronous Processes, Up: Processes
Process Objects
---------------
A "process object" is a type of Lisp object used to provide a link
between a `physical' process running in the operating system and Jade's
Lisp system. Each process object consists of a number of components
(references to other Lisp objects); these components are used when the
object is used to run a subprocess.
Process objects which aren't currently being used to run a subprocess
store the exit value of the last subprocess which was run on that
object.
- Function: processp OBJECT
This function returns `t' when its argument is a process object.
The programmer-accessible components of a process object are,
"Output stream"
A normal Lisp output stream (*note Output Streams::.), all data
which the subprocess outputs to its `stdout' channel is copied to
this output stream. *Note Process I/O::.
"State change function"
A Lisp function, called each time the state of the subprocess
being run on the object changes. *Note Process States::.
"Program name"
The name of the program (a string) to execute when the subprocess
is created.
"Program arguments"
A list of strings defining the arguments which the program executed
is given.
"Directory"
When a subprocess is started its current working directory is set
to the directory named by this component of its process object.
"Connection type"
Asynchronous subprocesses (*note Asynchronous Processes::.) use
this component to decide how to connect to the I/O channels of the
subprocess. Current options include pseudo-terminals and pipes.
- Function: make-process &optional OUTPUT-STREAM STATE-FUNCTION
DIRECTORY PROGRAM ARGS
This functions creates and returns a new process object. *No
subprocess will be started.*
The optional arguments are used to define the values of the
components of the new process object, any undefined components
will be set to default or null values.
For each component of a process object two functions exist; one to
read the component's value in a specific process object, the other to
set the component's value.
- Function: process-prog PROCESS
Returns the value of the program name component of the process
object PROCESS.
- Function: set-process-prog PROCESS PROG-NAME
Sets the value of the program name component of the process object
PROCESS to the string PROG-NAME, then returns PROG-NAME.
- Function: process-args PROCESS
Returns the value of the program arguments component of the
process object PROCESS.
- Function: set-process-args PROCESS ARG-LIST
Sets the value of the program arguments component of the process
object PROCESS to the list ARG-LIST, then returns ARG-LIST.
- Function: process-dir PROCESS
Returns the value of the directory component of the process object
PROCESS.
- Function: set-process-directory PROCESS DIRECTORY
Sets the value of the directory component of the process object
PROCESS to the string DIRECTORY, then returns DIRECTORY.
File: jade.info, Node: Asynchronous Processes, Next: Synchronous Processes, Prev: Process Objects, Up: Processes
Asynchronous Processes
----------------------
An "asynchronous process" is one that runs in parallel with the
editor, basically this means that once the subprocess has been started
(by the `start-process' function) Jade will carry on as normal.
The event loop checks for output from asynchronous processes, any
found is copied to the process' output stream, and calls the the
process' state change function when necessary (*note Process States::.).
When using asynchronous processes you have a choice as to the Unix
mechanism used to connect the `stdin', `stdout' and `stderr' streams of
the subprocess to Jade's process (note that whatever the choice
`stdout' and `stderr' always go to the same place).
The two options currently available are pipes or pseudo-terminals; in
general pseudo-terminals should only be used to provide a direct
interface between the user and a process (i.e. the `*shell*' buffer)
since they allow job control to work properly. At other times pipes
will be more efficient and are used by default.
- Function: start-process &optional PROCESS-OBJECT PROGRAM &rest ARGS
This function starts an asynchronous subprocess running on the
process object PROCESS-OBJECT. If PROCESS-OBJECT is undefined a
new process object is created (by calling the function
`make-process' with all arguments undefined).
The function always returns the process object which the subprocess
has been started on. If for some reason the subprocess can't be
created an error of type `process-error' is signalled.
The optional argument PROGRAM is a string defining the name of the
program to execute, it will be searched for in all the directories
in the `PATH' environment variable. The ARGS are strings to pass
to the subprocess as its arguments.
When defined, the optional arguments overrule the values of the
related components of the process object.
The following example runs the `ls' program asynchronously, its
output is inserted into the current buffer.
(let
((process (make-process (current-buffer))))
(start-process process "ls" "-s"))
Note that when Jade terminates it kills all of its asynchronous
subprocesses which are still running without warning.
- Function: process-connection-type PROCESS
Returns the value of the connection type component of the process
object PROCESS. See the documentation of the
`set-process-connection-type' function for the values this may
take.
- Function: set-process-connection-type PROCESS SYMBOL
Sets the value of the connection type component of the process
object PROCESS to SYMBOL, then returns SYMBOL.
SYMBOL should be one of the following symbols,
`pty'
Use pseudo-terminals to connect to subprocesses running
asynchronously on this process object.
`pipe'
Use standard Unix pipes to connect, this is the default value
of this component.
File: jade.info, Node: Synchronous Processes, Next: Process I/O, Prev: Asynchronous Processes, Up: Processes
Synchronous Processes
---------------------
When a "synchronous process" is started Jade waits for it to
terminated before continuing; they are usually used when a Lisp program
must invoke an external program as part of its function, i.e. the
auto-compression feature runs the compression program `gzip'
synchronously when it needs to compress a buffer.
Unlike asynchronous processes their is no choice between pipes and
pseudo-terminals for connecting to a subprocess. Instead, it is possible
to link the `stdin' channel of a synchronous process to a named file.
- Function: run-process &optional PROCESS-OBJECT INPUT-FILE-NAME
PROGRAM &rest ARGS
This function starts a process running on the process object
PROCESS-OBJECT. If PROCESS-OBJECT is undefined a new process object
is created by calling the `make-process' function.
If defined, the string INPUT-FILE-NAME names the file to connect to
the standard input of the subprocess, otherwise the subprocess'
input comes from the n