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#24531: process-send-string seems to truncate lines over 4096 characters Date: Fri, 21 Jul 2023 17:18:34 +0300 Message-ID: <83edl1bb5x.fsf@gnu.org> References: <87aas81jgh.fsf@jidanni.org> <83sf9h257b.fsf@gnu.org> Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="18725"; mail-complaints-to="usenet@ciao.gmane.io" Cc: 24531@debbugs.gnu.org, 6149@debbugs.gnu.org, monnier@iro.umontreal.ca, jidanni@jidanni.org To: Spencer Baugh Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Fri Jul 21 16:19:31 2023 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 1qMqyg-0004cZ-7U for geb-bug-gnu-emacs@m.gmane-mx.org; Fri, 21 Jul 2023 16:19:30 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qMqyG-0002h6-Pc; Fri, 21 Jul 2023 10:19:04 -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 1qMqyD-0002gc-VK for bug-gnu-emacs@gnu.org; Fri, 21 Jul 2023 10:19:01 -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 1qMqyD-0003sw-NW for bug-gnu-emacs@gnu.org; Fri, 21 Jul 2023 10:19:01 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1qMqyD-0003EC-JJ for bug-gnu-emacs@gnu.org; Fri, 21 Jul 2023 10:19: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: Fri, 21 Jul 2023 14:19:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 24531 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: confirmed Original-Received: via spool by 24531-submit@debbugs.gnu.org id=B24531.168994909112342 (code B ref 24531); Fri, 21 Jul 2023 14:19:01 +0000 Original-Received: (at 24531) by debbugs.gnu.org; 21 Jul 2023 14:18:11 +0000 Original-Received: from localhost ([127.0.0.1]:34334 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qMqxO-0003Cv-FH for submit@debbugs.gnu.org; Fri, 21 Jul 2023 10:18:10 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:37356) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qMqxL-0003Cc-7P; Fri, 21 Jul 2023 10:18:09 -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 1qMqxE-0003dh-PF; Fri, 21 Jul 2023 10:18:00 -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=t9KuBf7oYux5laraWfRTHJ1OQMMJXSd436pIbHu+gic=; b=Z9cPQNMF47fT PrhLWsCCvqhibPzFItrdAMdJFrPg3BR9GJQo1nQQIVvFgNOFk1cQloj/E1twj8B266RbH1pbbfQ7Q sJF+CNFXoUKqUKnrzY7x2iP8Iclf2EnypplbDDj1ljjXCTtzHey3VyjxOUc7t5MbzT/uA6tgB0ziv z0yvarzrz64nW3ANKjxpiRBwAj/VaDXOCJta4kMrcEQyZwCuufUVTpkVFN7gS2sAKre4wMi9viZqQ WK7dlGcdixOw2GCFb0J1UMLK90Ttv21xkgscYLYW5ZFzN1RTn52O45FhmDqjof6B0APMUCjMbeSrc yzt/9SpHzcYBiAMNFPQwhw==; Original-Received: from [87.69.77.57] (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 1qMqxE-00008z-8s; Fri, 21 Jul 2023 10:18:00 -0400 In-Reply-To: (message from Spencer Baugh on Fri, 21 Jul 2023 09:58:38 -0400) 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:265715 Archived-At: > From: Spencer Baugh > Cc: Stefan Monnier , 24531@debbugs.gnu.org, > 6149@debbugs.gnu.org, jidanni@jidanni.org > Date: Fri, 21 Jul 2023 09:58:38 -0400 > > Eli Zaretskii writes: > > > The number of applications that (a) don't need console-like behavior > > and (b) need to send larger-than-4KB buffers to sub-processes is quite > > small. Which is why this issue comes up only very rarely. So making > > pipes the default will fix a very small fraction of applications, and > > break the vast majority -- clearly a wrong balance. > > I see your point, but at the same time, the PTY interface on its own is > not sufficient to make these applications work, not at all. Specialized > modes are necessary to make M-x term (to implement a terminal) and M-x > grep (to parse ANSI color codes) and other such programs work. Running > things in a PTY without such specialized code doesn't give you anything, > AFAIK, because a PTY alone is far from enough to make the Emacs end > behave like a terminal. So such programs need to be aware and careful > about such things anyway, and need additional infrastructure on top of > make-process. So the default being "pty" gives such programs very > little: it doesn't save them any complexity. That Emacs needs to do something doesn't invalidate my point. My point is that communications via a PTY is a necessary (though a sufficient) condition for these features. Basically, you cannot use pipes for any interactive feature, because pipes are buffered. > However, what about my patch adding a warning about this to > process-send-string? I think that is independently valuable. Right now > we have no documentation of this problem... This should be documented in the ELisp manual, and in more detail, not just as a vague warning.