emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Proposal for extending set-process-filter


From: David Kastrup
Subject: Re: Proposal for extending set-process-filter
Date: 27 Apr 2004 23:10:35 +0200
User-agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.3.50

Richard Stallman <address@hidden> writes:

>     1) a function which gets two arguments. [insert old description]
>     2) a buffer into which output gets inserted.
> 
> You should use set-process-buffer for that.

That is used for the _controlling_ buffer associated with the process
(which incidentally is also the default where to insert stuff when no
other output is given).

>     3) a file name for output.
> 
> Writing it directly into a file is somewhat ugly as an idea.

Definitely.  I was confused into thinking that one could redirect the
file descriptors directly, but that can't happen after
start-process.  I did a revamped proposal to take care of that.  See
separate post.

>     4) t to stop accepting output.
> 
> Why do we need that option?  A filter function can easily discard the
> data.

Closing a file and discard output are two different things.  For
example, the "yes" command line utility will stop once its output is
closed, but will continue to infinitely produce output if it is only
thrown away.

Basically, I am again mostly thinking of eshell here: again, the
utility is minor after start-process has already been done.

>     5) a list of filter/file descriptor associations.  The car's of
>     the elements of this list are an item from 1)-4) as above, while
>     the cdr is a list of file ids for which this item is supposed to
>     apply.
> 
> That is very ugly.  There has to be a better way.
> 
> Anyway, the hard part of separating stdin from stderr
> is that they both come through the same channel in the pty.

set-process-filter is too late for this.  But if we do that at
start-process-time, we don't need to use a pty here except maybe for
stdout when specified in the ordinary manner?

Commands that don't specify different buffers/filter
functions/whatever for stdout and stderr can still receive them
through a single channel.

For that idea to make sense, the separation of course would have to
happen at start-process time already.

-- 
David Kastrup, Kriemhildstr. 15, 44793 Bochum




reply via email to

[Prev in Thread] Current Thread [Next in Thread]