[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

3. To integrate shell with Emacs.

You can integrate shell with Emacs with `e-pipe'.

3.1 e-Pipe  e-pipe and pipe-buffer
3.2.1 syntax of 'e-pipe'  syntax


[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

3.1 e-Pipe

Almost UNIX shell can connect the command's stdout with the another command's stdin with `|' syntax.

On the other hand, Oneliner can connect the command's stdout with the Emacs-buffer, and it can connect the Emacs-buffer with the command's stdin, with `|' syntax. We call the syntax by the name of 'e-pipe'. The image diagram is as follows:

 
(Emacs Buffer) -> | commands | -> (Emacs Buffer)


[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

3.2 PipeBuffer

You will use 'pipe-buffer' frequently on Oneliner.

'pipe-buffer' can be connected command with `|'(e-pipe).

'pipe-buffer' is appeared with simple operation as follows:

 
commands |

'pipe-buffer' has the number. When you append the number, you can select one 'pipe-buffer' from some 'pipe-buffer's.

We defined terms as follows:


[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

3.2.1 syntax of 'e-pipe'


[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

3.3 This is an explanation of 'e-pipe' syntax. You can omit the syntax in '[]'.

 
[buf-spec]| commands [+]|[buf-spec][!]

This is explanations syntax in '[]'.

`buf-spec'
`When omited.'
It means the default pipe-buffer.
`When specified a number.'
It means the numbered pipe-buffer.
`When specified `@buffer-name''
It means a Emacs-buffer( This is not a pipe-buffer ). Do not insert space character at around the buffer name.

`+'
It means addition to pipe-buffer.

`!'
It means a request of evaluation of output pipe-buffer. The action starts after output process was done.

Some examples with 'e-pipe' syntax is as follows:
 
 find ./ -name \*.c | 
 | wc 
 | sort | 
 1| awk '{print $1}' | grep 10 | sort -n |9 
 cat file +| 
 cat file +|@*scratch* 
 @sample.c| wc 
 echo "(emacs-version)" |! 
 echo "(find-file \"a.c\")" |! 


[ << ] [ >> ]           [Top] [Contents] [Index] [ ? ]

This document was generated by Kiyoka Nishiyama on December, 7 2003 using texi2html