home *** CD-ROM | disk | FTP | other *** search
/ Fresh Fish 8 / FreshFishVol8-CD1.bin / new / util / edit / jade / man / jade.info-10 (.txt) < prev    next >
GNU Info File  |  1994-10-16  |  36KB  |  687 lines

  1. This is Info file jade.info, produced by Makeinfo-1.55 from the input
  2. file jade.texi.
  3. START-INFO-DIR-ENTRY
  4. * Jade: (jade).            An editor for X11 and AmigaDOS
  5. END-INFO-DIR-ENTRY
  6.    This is Edition 1.3, last updated 7 October 1994, of `The Jade
  7. Manual', for Jade, Version 3.2.
  8.    Jade is a text editor for X11 (on Unix) and the Amiga.
  9.    Copyright 1993, 1994 John Harper.
  10.    Permission is granted to make and distribute verbatim copies of this
  11. manual provided the copyright notice and this permission notice are
  12. preserved on all copies.
  13.    Permission is granted to copy and distribute modified versions of
  14. this manual under the conditions for verbatim copying, provided that
  15. the entire resulting derived work is distributed under the terms of a
  16. permission notice identical to this one.
  17. File: jade.info,  Node: Process Objects,  Next: Asynchronous Processes,  Up: Processes
  18. Process Objects
  19. ---------------
  20.    A "process object" is a type of Lisp object used to provide a link
  21. between a `physical' process running in the operating system and Jade's
  22. Lisp system. Each process object consists of a number of components
  23. (references to other Lisp objects); these components are used when the
  24. object is used to run a subprocess.
  25.    Process objects which aren't currently being used to run a subprocess
  26. store the exit value of the last subprocess which was run on that
  27. object.
  28.  - Function: processp OBJECT
  29.      This function returns `t' when its argument is a process object.
  30.    The programmer-accessible components of a process object are,
  31. "Output stream"
  32.      A normal Lisp output stream (*note Output Streams::.), all data
  33.      which the subprocess outputs to its `stdout' channel is copied to
  34.      this output stream. *Note Process I/O::.
  35. "State change function"
  36.      A Lisp function, called each time the state of the subprocess
  37.      being run on the object changes. *Note Process States::.
  38. "Program name"
  39.      The name of the program (a string) to execute when the subprocess
  40.      is created.
  41. "Program arguments"
  42.      A list of strings defining the arguments which the program executed
  43.      is given.
  44. "Directory"
  45.      When a subprocess is started its current working directory is set
  46.      to the directory named by this component of its process object.
  47. "Connection type"
  48.      Asynchronous subprocesses (*note Asynchronous Processes::.) use
  49.      this component to decide how to connect to the I/O channels of the
  50.      subprocess.  Current options include pseudo-terminals and pipes.
  51.  - Function: make-process &optional OUTPUT-STREAM STATE-FUNCTION
  52.           DIRECTORY PROGRAM ARGS
  53.      This functions creates and returns a new process object. *No
  54.      subprocess will be started.*
  55.      The optional arguments are used to define the values of the
  56.      components of the new process object, any undefined components
  57.      will be set to default or null values.
  58.    For each component of a process object two functions exist; one to
  59. read the component's value in a specific process object, the other to
  60. set the component's value.
  61.  - Function: process-prog PROCESS
  62.      Returns the value of the program name component of the process
  63.      object PROCESS.
  64.  - Function: set-process-prog PROCESS PROG-NAME
  65.      Sets the value of the program name component of the process object
  66.      PROCESS to the string PROG-NAME, then returns PROG-NAME.
  67.  - Function: process-args PROCESS
  68.      Returns the value of the program arguments component of the
  69.      process object PROCESS.
  70.  - Function: set-process-args PROCESS ARG-LIST
  71.      Sets the value of the program arguments component of the process
  72.      object PROCESS to the list ARG-LIST, then returns ARG-LIST.
  73.  - Function: process-dir PROCESS
  74.      Returns the value of the directory component of the process object
  75.      PROCESS.
  76.  - Function: set-process-directory PROCESS DIRECTORY
  77.      Sets the value of the directory component of the process object
  78.      PROCESS to the string DIRECTORY, then returns DIRECTORY.
  79. File: jade.info,  Node: Asynchronous Processes,  Next: Synchronous Processes,  Prev: Process Objects,  Up: Processes
  80. Asynchronous Processes
  81. ----------------------
  82.    An "asynchronous process" is one that runs in parallel with the
  83. editor, basically this means that once the subprocess has been started
  84. (by the `start-process' function) Jade will carry on as normal.
  85.    The event loop checks for output from asynchronous processes, any
  86. found is copied to the process' output stream, and calls the the
  87. process' state change function when necessary (*note Process States::.).
  88.    When using asynchronous processes you have a choice as to the Unix
  89. mechanism used to connect the `stdin', `stdout' and `stderr' streams of
  90. the subprocess to Jade's process (note that whatever the choice
  91. `stdout' and `stderr' always go to the same place).
  92.    The two options currently available are pipes or pseudo-terminals; in
  93. general pseudo-terminals should only be used to provide a direct
  94. interface between the user and a process (i.e. the `*shell*' buffer)
  95. since they allow job control to work properly. At other times pipes
  96. will be more efficient and are used by default.
  97.  - Function: start-process &optional PROCESS-OBJECT PROGRAM &rest ARGS
  98.      This function starts an asynchronous subprocess running on the
  99.      process object PROCESS-OBJECT. If PROCESS-OBJECT is undefined a
  100.      new process object is created (by calling the function
  101.      `make-process' with all arguments undefined).
  102.      The function always returns the process object which the subprocess
  103.      has been started on. If for some reason the subprocess can't be
  104.      created an error of type `process-error' is signalled.
  105.      The optional argument PROGRAM is a string defining the name of the
  106.      program to execute, it will be searched for in all the directories
  107.      in the `PATH' environment variable. The ARGS are strings to pass
  108.      to the subprocess as its arguments.
  109.      When defined, the optional arguments overrule the values of the
  110.      related components of the process object.
  111.      The following example runs the `ls' program asynchronously, its
  112.      output is inserted into the current buffer.
  113.           (let
  114.               ((process (make-process (current-buffer))))
  115.             (start-process process "ls" "-s"))
  116.    Note that when Jade terminates it kills all of its asynchronous
  117. subprocesses which are still running without warning.
  118.  - Function: process-connection-type PROCESS
  119.      Returns the value of the connection type component of the process
  120.      object PROCESS. See the documentation of the
  121.      `set-process-connection-type' function for the values this may
  122.      take.
  123.  - Function: set-process-connection-type PROCESS SYMBOL
  124.      Sets the value of the connection type component of the process
  125.      object PROCESS to SYMBOL, then returns SYMBOL.
  126.      SYMBOL should be one of the following symbols,
  127.     `pty'
  128.           Use pseudo-terminals to connect to subprocesses running
  129.           asynchronously on this process object.
  130.     `pipe'
  131.           Use standard Unix pipes to connect, this is the default value
  132.           of this component.
  133. File: jade.info,  Node: Synchronous Processes,  Next: Process I/O,  Prev: Asynchronous Processes,  Up: Processes
  134. Synchronous Processes
  135. ---------------------
  136.    When a "synchronous process" is started Jade waits for it to
  137. terminated before continuing; they are usually used when a Lisp program
  138. must invoke an external program as part of its function, i.e. the
  139. auto-compression feature runs the compression program `gzip'
  140. synchronously when it needs to compress a buffer.
  141.    Unlike asynchronous processes their is no choice between pipes and
  142. pseudo-terminals for connecting to a subprocess. Instead, it is possible
  143. to link the `stdin' channel of a synchronous process to a named file.
  144.  - Function: run-process &optional PROCESS-OBJECT INPUT-FILE-NAME
  145.           PROGRAM &rest ARGS
  146.      This function starts a process running on the process object
  147.      PROCESS-OBJECT. If PROCESS-OBJECT is undefined a new process object
  148.      is created by calling the `make-process' function.
  149.      If defined, the string INPUT-FILE-NAME names the file to connect to
  150.      the standard input of the subprocess, otherwise the subprocess'
  151.      input comes from the n