unofficial mirror of help-gnu-emacs@gnu.org
 help / color / mirror / Atom feed
* start-process and set-process-filter sequence
@ 2011-04-14  3:10 William Xu
  2011-04-14  5:11 ` Thierry Volpiatto
  0 siblings, 1 reply; 8+ messages in thread
From: William Xu @ 2011-04-14  3:10 UTC (permalink / raw)
  To: help-gnu-emacs

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




^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2011-04-15 10:01 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-04-14  3:10 start-process and set-process-filter sequence William Xu
2011-04-14  5:11 ` Thierry Volpiatto
2011-04-14  8:22   ` William Xu
2011-04-14 12:02     ` Thien-Thi Nguyen
2011-04-15  2:16       ` William Xu
2011-04-15 10:01         ` Thien-Thi Nguyen
2011-04-14 14:02     ` Thierry Volpiatto
2011-04-15  2:21       ` William Xu

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).