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, 01 May 2021 09:09:39 +0300 Message-ID: <83o8dv9e8s.fsf@gnu.org> References: Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="10295"; 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 01 08:10:22 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 1lcipZ-0002as-T6 for geb-bug-gnu-emacs@m.gmane-mx.org; Sat, 01 May 2021 08:10:21 +0200 Original-Received: from localhost ([::1]:46202 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lcipY-0001mD-Vw for geb-bug-gnu-emacs@m.gmane-mx.org; Sat, 01 May 2021 02:10:21 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:48020) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lcipG-0001m1-QW for bug-gnu-emacs@gnu.org; Sat, 01 May 2021 02:10:03 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:48623) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1lcipG-00071s-0q for bug-gnu-emacs@gnu.org; Sat, 01 May 2021 02:10:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1lcipF-0000uc-Qu for bug-gnu-emacs@gnu.org; Sat, 01 May 2021 02:10:01 -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, 01 May 2021 06:10:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 48129 X-GNU-PR-Package: emacs Original-Received: via spool by 48129-submit@debbugs.gnu.org id=B48129.16198493933483 (code B ref 48129); Sat, 01 May 2021 06:10:01 +0000 Original-Received: (at 48129) by debbugs.gnu.org; 1 May 2021 06:09:53 +0000 Original-Received: from localhost ([127.0.0.1]:60169 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lcip7-0000u7-EN for submit@debbugs.gnu.org; Sat, 01 May 2021 02:09:53 -0400 Original-Received: from eggs.gnu.org ([209.51.188.92]:39724) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lcip5-0000ts-Oz for 48129@debbugs.gnu.org; Sat, 01 May 2021 02:09:52 -0400 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]:40053) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lcioz-0006pD-ND; Sat, 01 May 2021 02:09:45 -0400 Original-Received: from 84.94.185.95.cable.012.net.il ([84.94.185.95]:3181 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1lcioz-0004aK-74; Sat, 01 May 2021 02:09:45 -0400 In-Reply-To: (message from Thomas Hisch on Sat, 1 May 2021 01:10:10 +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:205315 Archived-At: > From: Thomas Hisch > Date: Sat, 1 May 2021 01:10:10 +0200 > > > I would like that the configuration options of the three file > handles (stdin, stdout and stderr), when a new process is created > in emacs, are improved. What I'm specifically asking for is to > add support for individually specifying for each file-handle > whether it should be connected to a pty or not. Currently the > value of the process-connection-type variable applies to all > three file handles at once, which leads to a problem with the > following use-case: > > Usually a program outputs ANSI escape sequences when its stdout > file-handle is connected to a pty. It is currently not possible to > communicate with a subprocess that is created by `start-file-process' by > writing to a pty (via stdin) and avoiding that this subprocess writes > ANSI escape sequences to stdout. This use-case is needed by magit, which > currently doesn't have support for displaying ANSI escape sequences but > it needs to communicate with it's started subprocesses via a PTY > (https://github.com/magit/magit/issues/3549). 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?