home *** CD-ROM | disk | FTP | other *** search
/ InfoMagic Source Code 1993 July / THE_SOURCE_CODE_CD_ROM.iso / gnu / lucid / help-lucid-emacs / text0139.txt < prev    next >
Encoding:
Text File  |  1993-07-14  |  981 b   |  30 lines

  1.  
  2.  
  3. > I would like to redirect the standard error of a process I start from
  4. > within Emacs into one buffer while the standard output goes into
  5. > another buffer.  The output and error both look fairly identical, so
  6. > there is no way to filter the process output and do the separation
  7. > myself.  It seems like there should be some way of doing what I want,
  8. > but I have been completely unable to figure it out.
  9.  
  10. I think that this is non-trivial since the C code only opens a single
  11. pipe or pty to the child. However would it suffice to send std{out,err}
  12. to two files then read those ?
  13.  
  14. eg (in sh or bash, not csh, don't know about ksh)
  15.  
  16. some-command 1>stdout 2>stderr
  17.  
  18. (in csh (I think - it's been a long time...))
  19.  
  20. (some-command > stdout) >& stderr
  21.  
  22. You could wrap this up in some lisp so that you have a function which just takes
  23. the command string & two buffer names.
  24.  
  25. --
  26. Paul Flinders            Mail: ptf@delcam.co.uk
  27. Delcam International PLC.    Tel:  +44 21 766 5544    Fax: +44 21 766 5511
  28.  
  29.  
  30.