Skip to content

Instantly share code, notes, and snippets.

@zarkzork
Created July 30, 2012 14:28
Show Gist options
  • Save zarkzork/3207347 to your computer and use it in GitHub Desktop.
Save zarkzork/3207347 to your computer and use it in GitHub Desktop.
(start-process "ls" nil "ls")
(defun keep-output (process output)
(setq kept (cons output kept)))
(setq kept nil)
(set-process-filter (get-process "ls") 'keep-output)
(set-process-filter (start-process "ls" "foo" "ls") 'keep-output)
(start-process "shell" nil "/bin/bash")
(set-process-filter (get-process "shell") 'keep-output)
(process-send-string "shell" "echo test\n")
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment