From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Haiwei Zhou Newsgroups: gmane.emacs.bugs Subject: bug#61341: Tramp process truncate messages to 4096 bytes Date: Tue, 7 Feb 2023 11:36:49 +0800 Message-ID: Mime-Version: 1.0 Content-Type: multipart/alternative; boundary="00000000000048180c05f413dce1" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="29286"; mail-complaints-to="usenet@ciao.gmane.io" To: 61341@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Tue Feb 07 09:01:41 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 1pPIv7-0007S3-9O for geb-bug-gnu-emacs@m.gmane-mx.org; Tue, 07 Feb 2023 09:01:41 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pPIuf-0003t4-Eb; Tue, 07 Feb 2023 03:01:13 -0500 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 1pPIuV-0003rq-SY for bug-gnu-emacs@gnu.org; Tue, 07 Feb 2023 03:01:10 -0500 Original-Received: from debbugs.gnu.org ([209.51.188.43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1pPIuU-0002o5-S0 for bug-gnu-emacs@gnu.org; Tue, 07 Feb 2023 03:01:03 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1pPIuU-0000Lm-Fx for bug-gnu-emacs@gnu.org; Tue, 07 Feb 2023 03:01:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Haiwei Zhou Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 07 Feb 2023 08:01:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 61341 X-GNU-PR-Package: emacs X-Debbugs-Original-To: bug-gnu-emacs@gnu.org Original-Received: via spool by submit@debbugs.gnu.org id=B.167575684131728 (code B ref -1); Tue, 07 Feb 2023 08:01:02 +0000 Original-Received: (at submit) by debbugs.gnu.org; 7 Feb 2023 08:00:41 +0000 Original-Received: from localhost ([127.0.0.1]:50914 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pPIu8-0008EX-TZ for submit@debbugs.gnu.org; Tue, 07 Feb 2023 03:00:41 -0500 Original-Received: from lists.gnu.org ([209.51.188.17]:39192) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pPEn4-0007PY-Gk for submit@debbugs.gnu.org; Mon, 06 Feb 2023 22:37:06 -0500 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 1pPEn4-0003uz-AA for bug-gnu-emacs@gnu.org; Mon, 06 Feb 2023 22:37:06 -0500 Original-Received: from mail-ej1-x62f.google.com ([2a00:1450:4864:20::62f]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1pPEn1-0005zd-3Y for bug-gnu-emacs@gnu.org; Mon, 06 Feb 2023 22:37:06 -0500 Original-Received: by mail-ej1-x62f.google.com with SMTP id hx15so39817751ejc.11 for ; Mon, 06 Feb 2023 19:37:02 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=to:subject:message-id:date:from:mime-version:from:to:cc:subject :date:message-id:reply-to; bh=kYxd2Pd4fxPsri1XA2E7PyoNusXuqK+HRbz9BuN54B8=; b=IrbdJW4OecV/ofXUUFuiYJOCCZ/mFOy86WCVKUonwaXW1f6LFnSINDvM7jmXz4wJ0H HLGS3gh7EgowrX6RCfgm2E6hJrJFhtFT5v5PlywrQQRywFnFA9TdewsmxlUr/6o4d2d2 /plswROEh7kp1N47X5qYdfouuNFrcm6XAkFwmDycn0jwZ+K+BY8cKo3f1WJ3PF9VvaoJ YkvjT3pVj66sr3lSIaXVX7M0GXw3g+rfvZNnoTr88YWAs7970qCEDjIxjPrtQAgJiac+ 2LSD5NJcOn2pWCQnDLfNVcVntR53IXC8oAEZn7S4cXRAFXIneI8eXGazYElIsLvqZA12 HJ6g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=to:subject:message-id:date:from:mime-version:x-gm-message-state :from:to:cc:subject:date:message-id:reply-to; bh=kYxd2Pd4fxPsri1XA2E7PyoNusXuqK+HRbz9BuN54B8=; b=OTAsjho4FtGKL3Tjqs5+/rjAnDgDXjw72qZWsAjc+koChpc+Tr7jVfGFS1H+QHMq5a CmMQM34IfQ/JA3iUTOugRX7UifPOuvO+mE80/PZZWpcreZQyzA0pSxtlLrLb0I5AMuvq WUUFllszabBppm1kvbT74l9rxX8XXPIb7F1ZUh+ZQc7nbu+DEErqqos9VIGkkJ7WEc5V Go44P3g9ddoIvVs8GaUrKnKnp1DwDX5AENenECr3jlxYERsl2ZI7qAoATTkqHOJrlbdz unwjU/8rW5rBBUjacAngefuBQCp5+BgTXwqZFm23Ib2L/iTMWXigxznCY6JZ6+rbNwdi Gwng== X-Gm-Message-State: AO0yUKUaNdm7SLrMMZLyOBPNvlaWzbQxc9f8qkt8+UBtOj+MM2XRrvbl rFKF11RdvXnIZ1WTltc2X6E0MqGdk2mH1KAZc9WDwj/T4T/XJQ== X-Google-Smtp-Source: AK7set/xYQOSQPJlvYXXMmb7jGtdESYDIIlec2dTYIXtuWfXwH1VLkuWwORYc1AjaTn+gywQ1d6Td9zS66exnc/2xrE= X-Received: by 2002:a17:906:a409:b0:8a6:91d9:c7b8 with SMTP id l9-20020a170906a40900b008a691d9c7b8mr423189ejz.83.1675741020820; Mon, 06 Feb 2023 19:37:00 -0800 (PST) Received-SPF: pass client-ip=2a00:1450:4864:20::62f; envelope-from=highfly22@gmail.com; helo=mail-ej1-x62f.google.com X-Spam_score_int: -17 X-Spam_score: -1.8 X-Spam_bar: - X-Spam_report: (-1.8 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_ENVFROM_END_DIGIT=0.25, FREEMAIL_FROM=0.001, HTML_MESSAGE=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-Mailman-Approved-At: Tue, 07 Feb 2023 03:00:40 -0500 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:255022 Archived-At: --00000000000048180c05f413dce1 Content-Type: text/plain; charset="UTF-8" Hi, According to this link , Linux terminals truncated messages to 4096 bytes under the tty canonical mode. To fix this issue, the following patch will help. I tested on emacs 28.2 with tramp 2.5.3. --- tramp-sh.el.orig 2022-05-12 19:59:16.000000000 +0800 +++ tramp-sh.el 2023-01-28 11:14:40.371519390 +0800 @@ -2959,7 +2959,7 @@ ;; macOS, see Bug#50748. (when (and (memq connection-type '(nil pipe)) (not (tramp-check-remote-uname v "Darwin"))) - (tramp-send-command v "stty -icrnl")) + (tramp-send-command v "stty -icrnl -icanon")) ;; `tramp-maybe-open-connection' and ;; `tramp-send-command-and-read' could have ;; trashed the connection buffer. Remove this. Thanks, Haiwei --00000000000048180c05f413dce1 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
Hi,

=C2=A0 According to=C2=A0this link, Linux ter= minals truncated messages to 4096 bytes under the tty canonical mode. To fi= x this issue, the following patch will help. I tested on emacs 28.2 with tr= amp 2.5.3.

--- tramp-sh.el.orig	2022-05-12 19:59:16.000000000 +0800
+++ tramp-sh.el	2023-01-28 11:14:40.371519390 +0800
@@ -2959,7 +2959,7 @@
 			  ;; macOS, see Bug#50748.
 			  (when (and (memq connection-type '(nil pipe))
                                      (not (tramp-check-remote-uname v &quo=
t;Darwin")))
-			    (tramp-send-command v "stty -icrnl"))
+			    (tramp-send-command v "stty -icrnl -icanon"))
 			  ;; `tramp-maybe-open-connection' and
 			  ;; `tramp-send-command-and-read' could have
 			  ;; trashed the connection buffer.  Remove this.


Thanks,
Haiwei
--00000000000048180c05f413dce1--