From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: =?UTF-8?Q?Cl=C3=A9ment?= Pit--Claudel Newsgroups: gmane.emacs.bugs Subject: bug#24287: Process filters received stderr output, not documented Date: Tue, 23 Aug 2016 17:47:16 -0400 Message-ID: <2f595455-af39-b61e-91ce-a03c58011fba@gmail.com> References: <83y43ofysz.fsf@gnu.org> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="hHKhQ5JXQeAilrWiITp6EGC7tL6DX8eUc" X-Trace: blaine.gmane.org 1471988902 22463 195.159.176.226 (23 Aug 2016 21:48:22 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Tue, 23 Aug 2016 21:48:22 +0000 (UTC) User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.2.0 To: 24287@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Tue Aug 23 23:48:18 2016 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1bcJYP-0005V0-J5 for geb-bug-gnu-emacs@m.gmane.org; Tue, 23 Aug 2016 23:48:17 +0200 Original-Received: from localhost ([::1]:48364 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bcJYM-0007Cw-1l for geb-bug-gnu-emacs@m.gmane.org; Tue, 23 Aug 2016 17:48:14 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:34849) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bcJYF-0007Bv-3B for bug-gnu-emacs@gnu.org; Tue, 23 Aug 2016 17:48:08 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bcJYA-0004lA-UK for bug-gnu-emacs@gnu.org; Tue, 23 Aug 2016 17:48:06 -0400 Original-Received: from debbugs.gnu.org ([208.118.235.43]:40545) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bcJYA-0004l6-R2 for bug-gnu-emacs@gnu.org; Tue, 23 Aug 2016 17:48:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1bcJY9-0004hW-TH for bug-gnu-emacs@gnu.org; Tue, 23 Aug 2016 17:48:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: =?UTF-8?Q?Cl=C3=A9ment?= Pit--Claudel Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 23 Aug 2016 21:48:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 24287 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: X-Debbugs-Original-To: bug-gnu-emacs@gnu.org Original-Received: via spool by submit@debbugs.gnu.org id=B.147198885918036 (code B ref -1); Tue, 23 Aug 2016 21:48:01 +0000 Original-Received: (at submit) by debbugs.gnu.org; 23 Aug 2016 21:47:39 +0000 Original-Received: from localhost ([127.0.0.1]:38257 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1bcJXn-0004gp-7Z for submit@debbugs.gnu.org; Tue, 23 Aug 2016 17:47:39 -0400 Original-Received: from eggs.gnu.org ([208.118.235.92]:43800) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1bcJXm-0004ge-4N for submit@debbugs.gnu.org; Tue, 23 Aug 2016 17:47:38 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bcJXf-0004g4-Pu for submit@debbugs.gnu.org; Tue, 23 Aug 2016 17:47:32 -0400 Original-Received: from lists.gnu.org ([2001:4830:134:3::11]:40254) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bcJXf-0004fx-NG for submit@debbugs.gnu.org; Tue, 23 Aug 2016 17:47:31 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:34761) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bcJXd-0006fu-9d for bug-gnu-emacs@gnu.org; Tue, 23 Aug 2016 17:47:30 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bcJXa-0004f1-5C for bug-gnu-emacs@gnu.org; Tue, 23 Aug 2016 17:47:29 -0400 Original-Received: from mout.kundenserver.de ([212.227.126.131]:53477) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bcJXZ-0004eQ-NT for bug-gnu-emacs@gnu.org; Tue, 23 Aug 2016 17:47:26 -0400 Original-Received: from [18.26.2.123] ([18.26.2.123]) by mrelayeu.kundenserver.de (mreue001) with ESMTPSA (Nemesis) id 0MVmFr-1beEGB006B-00Z0lz for ; Tue, 23 Aug 2016 23:47:24 +0200 In-Reply-To: <83y43ofysz.fsf@gnu.org> X-Provags-ID: V03:K0:mFR/1kCOR2WB3/Ght7IVPhgu68wQneWsI+S0m3InjWIAt2yyUNA XEZDcY+YmgXCiHKeKj2KT2RAZAy7h90i7DrkwaPZZyE7mhuNrI2VaVb0nLPYdVaOWeEmOxM i9FZhgZW4BDZfcuxij++0ADBkYayy/nMfp33NEiotrB6RWoSmjCtIwaxbiRSxHHimYg2SwN yVe+dd+LWIQ+i3IZ06hGA== X-UI-Out-Filterresults: notjunk:1;V01:K0:MAT5SKqWFDk=:CuuqAsjUdt2sdishAhM5PB ByJV9A0ipXxnyLOeMCbfVKEWGdQ/YvQVeTaA2RNgkUST0N/Fb6O7opbNv5bWepxcYUWlwn134 THJ5ci420eCd0u2wBDHes67O3sUGxmeXRxZ5k1T+Moer11tptyA3tBto7sH053k6Ex3gQZD/D fLlGSkznQ51fh5OHmAqNe7DzhlqzCT6D6nMbT6ANDir7A/WSVQoCIg/JASGsDjsjymZxF7mA2 0GkGJU2OO8kAJ38BYvwBKFN5rPkQ7I99ZlAL+qkFd++osnZ/fjcac1mUmAfgJQGiJLelMUQR+ /D5Vet8ryZu8yU1k3h8L/16Rk2jz+z3P2TcjULVPMvLvz2Iemk26CfeiI7fJb0YqsulgVeJ3Y 7pXP8cXhMiB2G3c3IjLdS2wr4Y7I8IAekMoBq0mxwiqUBo565w/Hft/N2WTXW0my9tCNXwNbF AJvZ01qwME9i2W1+sCrpTEv6q7Svx7vBCZJ0KuR28oHQ5cr+ovgKbyEjYcMuiGvaPYlC+cuvE ilP6E0hkYlyJDT9ilTPrzfrHSvbdsYOFrgV8dpmCER4la7ExUQff70/w50izZ4ebAMwG1BQsV X6c+ibsgt+X/FRYdSsilRV4cVx+Zs62QNABZmvUNQzXZSbK101UP+OlKS5n6Ori5ou+S6fTMl 5ovw3suZtP9Sf9t21bhx0rSyf4x3hYCCqKTctkpjJ31qME3AnHd4bFK7U9uYRBn79h88= X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 208.118.235.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.org gmane.emacs.bugs:122559 Archived-At: This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --hHKhQ5JXQeAilrWiITp6EGC7tL6DX8eUc Content-Type: multipart/mixed; boundary="Bgw1hMGMHGU8NVxVgqOIP1LO2eiO7dGFP" From: =?UTF-8?Q?Cl=c3=a9ment_Pit--Claudel?= To: bug-gnu-emacs@gnu.org Message-ID: <2f595455-af39-b61e-91ce-a03c58011fba@gmail.com> Subject: Re: bug#24287: Process filters received stderr output, not documented References: <83y43ofysz.fsf@gnu.org> In-Reply-To: <83y43ofysz.fsf@gnu.org> --Bgw1hMGMHGU8NVxVgqOIP1LO2eiO7dGFP Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable On 2016-08-22 14:23, Eli Zaretskii wrote: >> From: "Paul A. Steckler" >> 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. I= t >> does not mention that the filters also receive standard error output. >=20 > That is described in the parent section: >=20 > It is impossible to separate the standard output and standard erro= r > streams of the subprocess, because Emacs normally spawns the subproce= ss > inside a pseudo-TTY, and a pseudo-TTY has only one output channel. I= f > you want to keep the output to those streams separate, you should > redirect one of them to a file=E2=80=94for example, by using an appro= priate > shell command. Hi Eli, Am I misunderstanding something? This section sounds misleading, at leas= t 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 =E2=80=98make-pipe-process=E2=80=99. The docstring of start-process was updated accordingly: If you want to separate standard output from standard error, use =E2=80=98make-process=E2=80=99 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 no= n-user-facing processes anyway). What about something like this: It is impossible to separate the standard output and standard error s= treams 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 sepa= rate, you should either use `make-process' with the :stderr argument, or re= direct one of the streams to a file=E2=80=94for example, by using start-process-shell-command with an appropriate redirection. Additionally, we could update the documentation of make-process: right no= w, it starts with "This function is like =E2=80=98start-process=E2=80=99,= but takes keyword arguments.", but from what I understand it can actuall= y do more than start-process. What about this: This function is like =E2=80=98start-process=E2=80=99, but takes key= word 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=C3=A9ment. --Bgw1hMGMHGU8NVxVgqOIP1LO2eiO7dGFP-- --hHKhQ5JXQeAilrWiITp6EGC7tL6DX8eUc Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 iQIcBAEBCAAGBQJXvMRpAAoJEPqg+cTm90wj1M8P/jYMG6gEZoKWJsRnyZ/8vuUD O+tMhPLeb/E2Qr8xhz2OXHLgGjU5MjEFhXGS5Uu8ZBOfppHC6gWTMpgiMgJbRdeE oiZIS29ki/K5MwkA0amAfz+wSaZiIoE+t0PJIJEeRN57hfeOTorSwQgjVDVD3Xcs tyCzCvqZOcSaj2M0cTJnDJGG0jPE6wLR+FzRUqEKqyzdMcqAKBdjdhzMudCyCGVo ggEaJKXyZRedrP1hf7xdua6MMw7xWzueR3PkFmhiQql0ycM+trKo76curjWZsTvy +7Y37gw5kVmPO8U0+zbld6y7eVnG2bRPeYZszJEp+0hG0wJMKF5pwLiGS5WkwJ21 JWAsipLmi6Jc+0yoDhZGLkaK+kSYmelKQhFedMy/pam/Iex/BZFdUUr8YDbw/pVO 6dvUGAp4xbWDfbPNO9REdSel29jSNsrfzXLBedC90z3D7K2Qerp5G4tK87Xd/5sk g7Vgcka05wQlQ+Au5s2U+MNWhSQEgLYS1uYNuHselyJAJq9AHECA6Or16E8zVKmZ fIdFOsM3JF4zWm04nowQbzDUgneFdPtwsxxtdgZyErGFsPx0kRylk56wrLJ4RJnC I271XzqnX6wHqZRVB9hX8uLzaxrdIZ9MQlBRrLpTeR8AIajiRjZzj39allb8j5ei gEmPfL3ccV32j1c/SfRT =vNOi -----END PGP SIGNATURE----- --hHKhQ5JXQeAilrWiITp6EGC7tL6DX8eUc--