[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
start-process and set-process-filter sequence
From: |
William Xu |
Subject: |
start-process and set-process-filter sequence |
Date: |
Thu, 14 Apr 2011 11:10:20 +0800 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/24.0.50 (windows-nt) |
Hi,
Because set-process-filter will be done after the process is created by
start-process, it seems there is a possibility that the filter may miss
some process output. Consider this:
(defun foo (proc output)
(setq a output))
(let ((proc (start-process "ls" "ls" "ls")))
;; (read-string "Mood: ")
(setq a nil)
(set-process-filter proc 'foo))
Compare comment and uncomment the read-string line, `a' would be
different.
Is there a way to set a process filter before the process starts? so
that we won't miss any output.
--
William
http://xwl.appspot.com
- start-process and set-process-filter sequence,
William Xu <=