From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.bugs Subject: bug#48129: 28.0.50; Per file-handle (stdin, stdout and stderr) process-connection-type variable Date: Sat, 15 May 2021 10:23:10 +0300 Message-ID: <83fsyoxxy9.fsf@gnu.org> References: <83o8dv9e8s.fsf@gnu.org> <10473f20-aad5-a4a2-528e-088ac14bfb74@ims.co.at> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="3001"; mail-complaints-to="usenet@ciao.gmane.io" Cc: 48129@debbugs.gnu.org To: Thomas Hisch Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Sat May 15 09:24:10 2021 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1lhoef-0000ZG-P6 for geb-bug-gnu-emacs@m.gmane-mx.org; Sat, 15 May 2021 09:24:09 +0200 Original-Received: from localhost ([::1]:58346 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lhoee-0008JV-RI for geb-bug-gnu-emacs@m.gmane-mx.org; Sat, 15 May 2021 03:24:08 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:40760) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lhoeY-0008JN-HO for bug-gnu-emacs@gnu.org; Sat, 15 May 2021 03:24:02 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:35880) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1lhoeY-0005AD-8t for bug-gnu-emacs@gnu.org; Sat, 15 May 2021 03:24:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1lhoeY-0001Bw-4a for bug-gnu-emacs@gnu.org; Sat, 15 May 2021 03:24:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 15 May 2021 07:24:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 48129 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: moreinfo Original-Received: via spool by 48129-submit@debbugs.gnu.org id=B48129.16210634044534 (code B ref 48129); Sat, 15 May 2021 07:24:02 +0000 Original-Received: (at 48129) by debbugs.gnu.org; 15 May 2021 07:23:24 +0000 Original-Received: from localhost ([127.0.0.1]:47426 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lhodv-0001B4-Tx for submit@debbugs.gnu.org; Sat, 15 May 2021 03:23:24 -0400 Original-Received: from eggs.gnu.org ([209.51.188.92]:47074) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lhods-0001Ao-Uy for 48129@debbugs.gnu.org; Sat, 15 May 2021 03:23:23 -0400 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]:35410) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lhodm-0004gM-M6; Sat, 15 May 2021 03:23:14 -0400 Original-Received: from 84.94.185.95.cable.012.net.il ([84.94.185.95]:1666 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lhodm-0008J4-4y; Sat, 15 May 2021 03:23:14 -0400 In-Reply-To: (message from Thomas Hisch on Fri, 7 May 2021 21:46:15 +0200) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list 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-mx.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.io gmane.emacs.bugs:206566 Archived-At: > Date: Fri, 7 May 2021 21:46:15 +0200 > From: Thomas Hisch > CC: <48129@debbugs.gnu.org> > > >> We have make-pipe-process; can't you solve your problem by connecting > >> your process's stdout to such a pipe-process? If not, why not? > >> > > > > Thx Eli for the fast reply! I had to study the docs of make-pipe-process > > and make-process to understand what you mean. However, I'm not fully > > sure if I fully get what you mean. > > > > AFAICS the pipe process which is returned by make-pipe-process can be > > passed to the :stderr keyword argument of make-process. Is that what you > > head in mind? > > > > According to the docs of make-process, process-connection-type is > > ignored if :stderr is passed to make-process: > > > >> This parameter and the value of ‘process-connection-type’ are > > ignored if a non-‘nil’ value is specified for the ‘:stderr’ parameter; > > in that case, the type will always be ‘pipe’. > > > > What I want is that stdout and stderr are connected to a pipe but stdin > > is connected to a pty. > > > > Here is the new test script that I used > > > > (let* ( > > (stderr-buffer (get-buffer-create "*stderr*")) > > (stderr-proc (make-pipe-process :name "stderr" > > :buffer stderr-buffer)) > > (process-buf (get-buffer-create "*temp*"))) > > (make-process > > :name "isatty" > > :buffer process-buf ;; it is not possible to pass the output of > > make-pipe-process to :buffer > > :connection-type 'pty ;; unfortunately ignored if :stderr is used > > :stderr stderr-proc > > :command (list "/tmp/output-isatty.py"))) > > > > Eli can you tell me if you meant that we should use make-process in > combination with make-pipe-process? If it's possible to solve your problem by using make-pipe-process, I'd prefer such a solution. Introducing yet another obscure option to make-process should best be avoided, IMO.