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#71472: [PATCH] Add pty support by using ConPTY on Windows Date: Mon, 10 Jun 2024 18:40:48 +0300 Message-ID: <86jziw956n.fsf@gnu.org> References: <874ja1m6u1.fsf@zohomail.jp> Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="22777"; mail-complaints-to="usenet@ciao.gmane.io" Cc: 71472@debbugs.gnu.org To: Ke Wu Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Mon Jun 10 17:42:16 2024 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 1sGh9x-0005g9-Le for geb-bug-gnu-emacs@m.gmane-mx.org; Mon, 10 Jun 2024 17:42:13 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1sGh9a-0008Ip-St; Mon, 10 Jun 2024 11:41:50 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1sGh9Y-0008IO-QP for bug-gnu-emacs@gnu.org; Mon, 10 Jun 2024 11:41:48 -0400 Original-Received: from debbugs.gnu.org ([2001:470:142:5::43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1sGh9V-0001OM-CL for bug-gnu-emacs@gnu.org; Mon, 10 Jun 2024 11:41:48 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1sGh9m-00080f-Bj for bug-gnu-emacs@gnu.org; Mon, 10 Jun 2024 11:42: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: Mon, 10 Jun 2024 15:42:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 71472 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch Original-Received: via spool by 71472-submit@debbugs.gnu.org id=B71472.171803407930654 (code B ref 71472); Mon, 10 Jun 2024 15:42:02 +0000 Original-Received: (at 71472) by debbugs.gnu.org; 10 Jun 2024 15:41:19 +0000 Original-Received: from localhost ([127.0.0.1]:42754 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sGh94-0007yM-Ql for submit@debbugs.gnu.org; Mon, 10 Jun 2024 11:41:19 -0400 Original-Received: from eggs.gnu.org ([209.51.188.92]:42104) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sGh92-0007xx-W2 for 71472@debbugs.gnu.org; Mon, 10 Jun 2024 11:41:17 -0400 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1sGh8e-0000zI-0m; Mon, 10 Jun 2024 11:40:52 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=References:Subject:In-Reply-To:To:From:Date: mime-version; bh=g23sbqiFSTU0ofHwdn6N6B+VxOE2YcAfTYuft+5IeHk=; b=puu7fktm6slu mdszOjbgQ4omgfRqYxwjhgTu9JBiCp/E2E3wmbutSJYwp92+stv37Hd9T9b03Z7NZEguyAihC5hW5 skYBQxYe024vvSnkaTiv3+1IRQYPEXiehKESs0DsFVoPQl1PlILP/KJd6Wk4jafC9AVNbOIKYu36V HxRvJ0XzTk5lwDlvTLkKVqYaAiF+dJd2w7AfNYOaHcAw6e1dVwkUj5/eo/M9ZJDzLa//LtanmB2kA 0Zxu/3LRs+z4weUW51NzbyFImuomZvppt9d318yFLdceCgAKNLIzU1G5SiYwCx5kDgs5XeD0grJN8 uFIBmwNwz/bn9jtxdsZLUA==; In-Reply-To: <874ja1m6u1.fsf@zohomail.jp> (message from Ke Wu on Mon, 10 Jun 2024 18:26:46 +0800) 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-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.bugs:287046 Archived-At: > From: Ke Wu > Date: Mon, 10 Jun 2024 18:26:46 +0800 > > This patch adds pty support by using ConPTY on Windows. The conhost.exe > runs in pty mode and provides pty interface. The package term is also > patched to make it usable on Windows. Thanks. It's a pity you didn't discuss this before working on the code, because ConPTY is not very useful on MS-Windows due to the limitations of its encoding. See this issue I opened 3 years ago, and which they meanwhile closed (I guess they don't plan on fixing this anytime soon). See https://github.com/microsoft/terminal/issues/9174 If we must use UTF-8 as the only encoding to talk to sub-processes via ConPTY, that makes the number of applications that can be used this way very small, since most programs we are used to run as subprocesses, in particularly ports of GNU software like GCC, GDB, Grep, Find, and many others, cannot reliably talk to Emacs in UTF-8 encoding on MS-Windows. And without that, what would we use this feature for? So unfortunately, I don't think we should install these patches.