Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Is there a way to extract the stderr of a process that returns a non-zero status code? #47

Open
MiloDavis opened this issue Aug 15, 2017 · 2 comments

Comments

@MiloDavis
Copy link

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?

@kiwanami
Copy link
Owner

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.

@MiloDavis
Copy link
Author

I'll see if I can figure out how to do it. Thanks for the response.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants