$buffer-ipipe(5)$buffer-ipipe - Divert buffer incremental pipe input through macro.
$buffer-ipipe-flags - Incremental pipe creation flags.
$buffer-ipipe commandName
$buffer-ipipe-flags flags ; read-only
$buffer-ipipe allows the buffer incremental pipe input mechanism to be diverted through a command macro defined by commandName. On a buffer running an ipipe-shell-command(2) the command, set by this variable, will be called whenever new text has been inserted by the executing process. Two alpha-marks will be set in the buffer, 'i' denotes the start of the newly inserted text and 'I' denotes the end.
When the ipiped command exits the commandName is called with a numeric argument of 0 and the $result(5) variable is set to the exit code of the process, this will be the last call of the command. The following values of $result are also used by MicroEmacs:
-1000
-1009
-1011
-1015
Not all platforms support all of these exit codes.
$buffer-ipipe-flags is a read-only variable which records how the incremental pipe running, or last run, in the current buffer was created by ipipe-shell-command(2). It allows macros to determine how the process was launched, and how its output was processed, without having to retain this information themselves. flags is a bit based flag where:
0x01
0x02
0x04
0x08
0x10
0x20
The remaining bits are reserved for future use and are currently always 0.
The following example, taken from the ipipe-rerun macro, uses $buffer-ipipe-flags to construct the numeric argument required to re-launch the command in the current buffer with the same settings:
; A raw pipe leaves no command-line in the buffer to re-run !iif &band 0x04 $buffer-ipipe-flags \ -8 ml-write "[ipipe-rerun Error: command-line lost]" ; Convert the flags back into an ipipe-shell-command argument set-variable #l0 &con &band 0x02 $buffer-ipipe-flags 0x08 0x2000 set-variable #l0 &add #l0 &con &band 0x08 $buffer-ipipe-flags 0 0x200 set-variable #l0 &add #l0 &con &band 0x20 $buffer-ipipe-flags 0x1000 0
Note that bits 0x02 and 0x08 are inverted in the construction as ipipe-shell-command bits 0x2000 and 0x200 disable the features which $buffer-ipipe-flags reports as enabled.
Ref: $buffer-ipipe(5) File: m5var006.5 Date: 2025/10/27
(c) Copyright JASSPA 2026