emacs-deferred
emacs-deferred copied to clipboard
Is there a way to extract the stderr of a process that returns a non-zero status code?
I'm writing an emacs mode that relies on a parser that returns a non-zero status code if there are certain types of parsing errors. I'd like to extract the stderr output in these cases, however the best I've been able to figure out how to do is to extract the text that also specifies that there has been an error within the deferred library.
Looking in the source code, it looks like the message is immediately run through a format function. Is there a way to get the stderr output without having to parse this string?
Hi @MiloDavis
In the current implementation, there is no method to receive stdout
output and stderr
one separately, because previous emacs doesn't provide any convenient function.
From emacs 25, we can use make-process
to handle stderr output in elisp.
So, we need the wrapper function for make-process
like deferred:process
which wraps start-process
.
However, I'm not familiar enough with make-process
, so, I think it is not trivial for me to design the deferred wrapper function.
I'm sorry I don't have time to do that soon.
Your PR is welcome.
I'll see if I can figure out how to do it. Thanks for the response.