emacs-bug-tracker
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#61341: closed (Tramp process truncate messages to 4096 bytes)


From: GNU bug Tracking System
Subject: bug#61341: closed (Tramp process truncate messages to 4096 bytes)
Date: Fri, 17 Feb 2023 09:28:02 +0000

Your message dated Fri, 17 Feb 2023 10:27:16 +0100
with message-id <874jrk8wwb.fsf@gmx.de>
and subject line Re: bug#61341: Tramp process truncate messages to 4096 bytes
has caused the debbugs.gnu.org bug report #61341,
regarding Tramp process truncate messages to 4096 bytes
to be marked as done.

(If you believe you have received this mail in error, please contact
help-debbugs@gnu.org.)


-- 
61341: https://debbugs.gnu.org/cgi/bugreport.cgi?bug=61341
GNU Bug Tracking System
Contact help-debbugs@gnu.org with problems
--- Begin Message --- Subject: Tramp process truncate messages to 4096 bytes Date: Tue, 7 Feb 2023 11:36:49 +0800
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

--- End Message ---
--- Begin Message --- Subject: Re: bug#61341: Tramp process truncate messages to 4096 bytes Date: Fri, 17 Feb 2023 10:27:16 +0100 User-agent: Gnus/5.13 (Gnus v5.13)
Version: 29.2

Haiwei Zhou <highfly22@gmail.com> writes:

> Hi,

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.

In general, your patch looks good. Since I don't use lsp-mode I cannot
check it there, but I trust you that it helps.

However, two enhancements must be done. First, it shall be applied for
remote macOS hosts as well. And secondly, when setting -icanon, one must
also set min and time.

Finally, I've changed this to

--8<---------------cut here---------------start------------->8---
                            (when (memq connection-type '(nil pipe))
                              (if (tramp-check-remote-uname v "Darwin")
                                  (tramp-send-command
                                   v "stty -icanon min 1 time 0")
                                (tramp-send-command
                                 v "stty -icrnl -icanon min 1 time 0")))
--8<---------------cut here---------------end--------------->8---

Pushed to the Emacs master branch. This patch will be contained also in
Tramp 2.6.0.2, scheduled for relase later this month on GNU ELPA.

Closing the bug.

> Thanks,
> Haiwei

Best regards, Michael.


--- End Message ---

reply via email to

[Prev in Thread] Current Thread [Next in Thread]