Skip to content

nicferrier/emacs-pipe

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 

Repository files navigation

Pipes

Unix pipes are a powerful tool. In Emacs we don't have much support for them so this package aims to add such support.

API

The Pipe API consists of a few functions and macros to spawn processes and communicate with them in the Pipe style.

pipe

A macro allowing piping to be represented simply:

(pipe "ls -la"
  (catch :eof
    (with-current-buffer somebuf
      (-each
       (->> (pipe-read)
         (-keep (lambda (a) a)))
       (lambda (x) (print x)))

pipe takes a command as a string and a body of code which is executed with (pipe-read) providing a line from the command.

pipe-eof proc

Has proc been marked EOF?

pipe-shell-command command thunk &optional name

Pipe the shell command to the thunk function.

Within thunk the function pipe-read is bound to deliver whatever came over the pipe.

About

use pipes to communicate with processes in Emacs

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published