ipipe-shell-command - Incremental pipe (non-suspending system call)
ipipe-kill - Kill a incremental pipe
ipipe-write - Write a string to an incremental pipe
n ipipe-shell-command "command" ["buffer-name"] ["buffer-ipipe-command"] (esc backslash)
n ipipe-write "string"
n ipipe-kill
UNIX - irix, hpux, sunos, freebsd, linux.
Windows NT - win32.
ipipe-shell-command executes the given system command command, opening up a *icommand* buffer into which the results of the command execution are displayed. Unlike the pipe-shell-command(2), the user may continue editing during command execution. The command may be terminated by deleting the buffer or issuing a ipipe-kill command.
The argument n can be used to change the default behavior of pipe-shell-command described above, n is a bit based flag where:-
0x01
0x02
0x04
%COMSPEC% /c command
Where %COMSPEC% is typically command.com. If this bit is set "command" is launched directly.
0x08
0x10
0x20
0x40
0x80
0x100
0x200
Many other macro commands (see compile(3), grep(3), etc.) use this command.
ipipe-write writes a string string to an open ipipe, n times.
ipipe-kill terminates an open ipipe and is automatically invoked when the ipipe buffer is deleted using delete-buffer(2) or when MicroEmacs is exited. The numeric argument n may be used to change the signal generated, where n takes the following values:
1
2
On UNIX platforms the TERM environment variable of the new process may be set by setting the user variable %ipipe-term to the required value, e.g.:
set-variable %ipipe-term "TERM=vt100-nam"
Ipipe shells support a large sub-set of vt100 terminal commands, notable exceptions are color, font support and auto-margins. Using the terminal type "vt100-nam" disables the use of auto-margins, thereby providing better support.
On platforms which do not support ipipe-shell-command, such as MS-DOS, executing ipipe-shell-command automatically invokes pipe-shell-command. Therefore macros may safely use ipipes without explicitly checking the platform type. ipipe-shell-command does not run reliably on Windows 3.11 and Windows 95; Windows NT does support ipipes.
While the pipe command is running, mode pipe(2m) is enabled. Modes lock(2m) and wrap(2m) effect the output behavior of an ipipe-shell-command.
The following example is the xgrep(3) command macro which utilizes the ipipe-shell-command, diverting the output to a buffer called *grep*.
define-macro xgrep !force set-variable #l0 @1 !if ¬ $status set-variable #l0 @ml00 %xgrep-com !endif !if @? 1 pipe-shell-command &cat %xgrep-com #l0 "*grep*" @mna !else 1 ipipe-shell-command &cat %xgrep-com #l0 "*grep*" @mna !endif !emacro
Note that if an argument is passed to grep then it uses pipe-shell-command instead. This is useful if another command is using grep which must finish before the calling command can continue, see replace-all-string(3) for an example.
On MicroSoft Windows platforms, ipipe-shell-command spawns the shell (e.g. command.com) with the appropriate command line to make it execute the given command. If the command to be run detaches from the shell and creates its own window, for example me.exe, ipipe-kill will only kill the shell, it will not kill the actual process, i.e. the me.exe.
On MicroSoft Windows platforms ipipe-shell-command does not work on Novell's Intranet Client v2.2 networked drives, version 2.5 does appear to work.
$buffer-ipipe(5), $buffer-input(5), compile(3), grep(3), pipe-shell-command(2), replace-all-string(3), shell-command(2), pipe(2m), lock(2m), wrap(2m).
(c) Copyright JASSPA 2009
Last Modified: 2009/08/29
Generated On: 2009/10/12