GNU bug report logs - #24287
Process filters received stderr output, not documented

Previous Next

Package: emacs;

Reported by: "Paul A. Steckler" <steck <at> stecksoft.com>

Date: Mon, 22 Aug 2016 18:06:02 UTC

Severity: minor

Done: Eli Zaretskii <eliz <at> gnu.org>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: Clément Pit--Claudel <clement.pit <at> gmail.com>
To: 24287 <at> debbugs.gnu.org
Subject: bug#24287: Process filters received stderr output, not documented
Date: Tue, 23 Aug 2016 17:47:16 -0400
[Message part 1 (text/plain, inline)]
On 2016-08-22 14:23, Eli Zaretskii wrote:
>> From: "Paul A. Steckler" <steck <at> stecksoft.com>
>> Date: Mon, 22 Aug 2016 13:35:25 -0400
>>
>> The documentation for Process Filter Functions mentions that process
>> filters receive the standard output from their associated processes. It
>> does not mention that the filters also receive standard error output.
> 
> That is described in the parent section:
> 
>      It is impossible to separate the standard output and standard error
>   streams of the subprocess, because Emacs normally spawns the subprocess
>   inside a pseudo-TTY, and a pseudo-TTY has only one output channel.  If
>   you want to keep the output to those streams separate, you should
>   redirect one of them to a file—for example, by using an appropriate
>   shell command.

Hi Eli,

Am I misunderstanding something?  This section sounds misleading, at least for Emacs 25 (I'm not sure about Emacs 24).  The documentation of make-process (which is new in Emacs 25, right?) says:

     :stderr STDERR
          Associate STDERR with the standard error of the process.
          STDERR is either a buffer or a pipe process created with
          ‘make-pipe-process’.

The docstring of start-process was updated accordingly:

    If you want to separate standard output from standard error, use
    ‘make-process’ or invoke the command through a shell and redirect
    one of them using the shell syntax.

Both of these suggest that the impossibility that the manual mention only applies to the pty case (the manual recommends against using PTYs for non-user-facing processes anyway).  What about something like this:

    It is impossible to separate the standard output and standard error streams
    of a subprocess spawned inside a pseudo-TTY, as pseudo-TTYs have only one
    output channel.  If you want to keep the output to those streams separate,
    you should either use `make-process' with the :stderr argument, or redirect
    one of the streams to a file—for example, by using
    start-process-shell-command with an appropriate redirection.

Additionally, we could update the documentation of make-process: right now, it starts with "This function is like ‘start-process’, but takes keyword arguments.", but from what I understand it can actually do more than start-process. What about this:

     This function is like ‘start-process’, but takes keyword arguments, and can
     separate output to standard output and standard error.

Btw, was there a way in Emacs 24 to separate these streams if the process was run after setting process-connection-type to nil? (I can't think of one).

Cheers,
Clément.

[signature.asc (application/pgp-signature, attachment)]

This bug report was last modified 8 years and 323 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.