emacs-devel
[Top][All Lists]
Advanced

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

Re: no buffer to flush the error output in ?


From: Eli Zaretskii
Subject: Re: no buffer to flush the error output in ?
Date: Tue, 17 Sep 2024 16:06:09 +0300

> Date: Tue, 17 Sep 2024 12:06:54 +0200
> From: Phil Estival <pe@7d.nz>
> 
> [[info:elisp#Synchronous Processes]] says
> 
>    You can’t directly specify a buffer to put the
>    error output in; that is too difficult to
>    implement.
> 
> Can someone explain why please ?

Because you'd need to read process output from two independent file
descriptors at the same time, I guess.  E.g., the rate of writing to
each one of the descriptors could be (and very frequently is) very
different, and you don't want to slow down reading from stdout because
you want to check stderr.

>    But you can achieve this result by
>    sending the error output to a temporary file and
>    then inserting the file into a buffer when the
>    subprocess finishes.
> 
> Only when it finishes? But there must certainly exist a way
> to have stdout/err be separated buffered streams... right ?

You can separate them, yes, but the problem is how to read from both,
see above.  And since Emacs waits for the process to exit anyway, why
does it matter that you get the stderr stuff only after it exits?



reply via email to

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