GNU bug report logs - #78508
Tramp confused by bracketed paste after remote prompt

Please note: This is a static page, with minimal formatting, updated once a day.
Click here to see this page with the latest information and nicer formatting.

Package: emacs; Reported by: Daniel Colascione <dancol@HIDDEN>; dated Tue, 20 May 2025 13:59:01 UTC; Maintainer for emacs is bug-gnu-emacs@HIDDEN.

Message received at 78508 <at> debbugs.gnu.org:


Received: (at 78508) by debbugs.gnu.org; 22 May 2025 11:25:59 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Thu May 22 07:25:59 2025
Received: from localhost ([127.0.0.1]:60944 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1uI43j-0002lC-D5
	for submit <at> debbugs.gnu.org; Thu, 22 May 2025 07:25:59 -0400
Received: from mout.gmx.net ([212.227.15.19]:51361)
 by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.84_2) (envelope-from <michael.albinus@HIDDEN>)
 id 1uI43f-0002ki-6I
 for 78508 <at> debbugs.gnu.org; Thu, 22 May 2025 07:25:56 -0400
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmx.de;
 s=s31663417; t=1747913149; x=1748517949; i=michael.albinus@HIDDEN;
 bh=JEVVRxX1EZEg3Duw6CofSnGbpcSvgJXki3wJ9/Qjz0o=;
 h=X-UI-Sender-Class:From:To:Cc:Subject:In-Reply-To:References:Date:
 Message-ID:MIME-Version:Content-Type:cc:content-transfer-encoding:
 content-type:date:from:message-id:mime-version:reply-to:subject:
 to;
 b=irTKAPpcp4hImlM+/79ul+tP16bXmwrsH01xydBc8L4SzwbMbtcgoD1IbCcRtuK3
 g+PIVLp8RJmRfJGKEYFIbGiX9VCqHppHLjZhQF9lVTfi+50eukRm2IGcd+5vIjZDZ
 TmC52qA2J4hRxbSPWy/W3hggZVIhqGButIrmgVKyO0soaO0vk4NHD9GpEri9/0LwD
 pHcPJLn995oz9YXLavOFSztZLuZloeLIOll0Xw/m8gkSX0DKt90rVBid5BeZpkEOH
 ulfEEZIbvapvJol81PtFYAWMczpCZuQzmb6OC/bYFFn0A/Tss7tUKvSj7JDONDj6X
 bX+A5gCsSfIywB/YVA==
X-UI-Sender-Class: 724b4f7f-cbec-4199-ad4e-598c01a50d3a
Received: from gandalf.gmx.de ([185.89.37.61]) by mail.gmx.net (mrgmx004
 [212.227.17.190]) with ESMTPSA (Nemesis) id 1MyKDe-1vABCi3l52-00zImq; Thu, 22
 May 2025 13:25:48 +0200
From: Michael Albinus <michael.albinus@HIDDEN>
To: Daniel Colascione <dancol@HIDDEN>
Subject: Re: bug#78508: Tramp confused by bracketed paste after remote prompt
In-Reply-To: <D48F793D-4DB6-4ED9-9744-B01768554167@HIDDEN>
References: <m1o6vnqt8w.fsf@HIDDEN> <87bjrmpgb5.fsf@HIDDEN>
 <D48F793D-4DB6-4ED9-9744-B01768554167@HIDDEN>
Date: Thu, 22 May 2025 13:25:47 +0200
Message-ID: <87y0uohop0.fsf@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13)
MIME-Version: 1.0
Content-Type: text/plain
X-Provags-ID: V03:K1:HamBEb40p9RtCHw94EMB4jDtx+24QzxItkWlBhAWGvfl8Oh2R5X
 64Kx+/fH22QBZ4tcg/7weQfPoy0hKj4h2NB8he0VT0kLCPDMVYndvOSO+WGnURlTXYCWX/E
 iOSnUur+NojIX4q4bifdJWcIGvrUxbsRcGT6YwFcnXFEpPKtgUpBxTe545hNQQMlKTXsY1Y
 E/oygjyEymuKgdRUIzgyQ==
X-Spam-Flag: NO
UI-OutboundReport: notjunk:1;M01:P0:qKh/ThDOgBE=;fwCWTwc8yC0zFJ8hObnhMQ2wGgB
 jK25LwaU3meD/U3Ultp6q0w/8GxkpHWLITo/aMW2TF9rgaC+z+qGyiSRHm7PI2/+sd2zk9JS7
 hi5xIDuRUz/XT3fy+J9jRYaCvIDLIzw34d1tm0dzbpEsq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-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.7 (-)

Daniel Colascione <dancol@HIDDEN> writes:

Hi Daniel,

>>> When the remote shell emits bracketed paste escape codes (as zsh does
>>> even when TERM=dumb), tramp ends up timing out unable to find the shell
>>> prompt on initial connection.
>>
>>Have you checked the recipe from the Tramp manual in (info "(tramp)
>>Frequently Asked Questions") ?
>
> It shouldn't be necessary to do that. Sometimes modifying the target
> system isn't all that straightforward, and control sequences should be
> straightforward to strip. There's already an attempt to strip ANSI
> color, yes? It's not like Tramp is trying to avail itself of the
> opportunities SSH provides to make noninteractive use feasible.

Tramp won't go into the prompt parsing business. Filtering ANSI color
sequences out was a compromise a while ago. You let feel me that it was
an error to do so.

> Failure mode is just "when I try to use Emacs to connect to
> this family of hosts, it hangs. VSCode works. I guess I'll stick with
> that"

That's unfair, and you know it.

Have you tried the patch I've shown?

Best regards, Michael.




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#78508; Package emacs. Full text available.

Message received at 78508 <at> debbugs.gnu.org:


Received: (at 78508) by debbugs.gnu.org; 22 May 2025 07:23:41 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Thu May 22 03:23:41 2025
Received: from localhost ([127.0.0.1]:59331 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1uI0HE-0001mJ-RL
	for submit <at> debbugs.gnu.org; Thu, 22 May 2025 03:23:41 -0400
Received: from dancol.org ([2600:3c01:e000:3d8::1]:42174)
 by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.84_2) (envelope-from <dancol@HIDDEN>) id 1uI0HB-0001m5-BP
 for 78508 <at> debbugs.gnu.org; Thu, 22 May 2025 03:23:38 -0400
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=dancol.org; 
 s=x;
 h=Content-Transfer-Encoding:Content-Type:MIME-Version:Message-ID:
 References:In-Reply-To:Subject:CC:To:From:Date:Sender:Reply-To:Content-ID:
 Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc
 :Resent-Message-ID:List-Id:List-Help:List-Unsubscribe:List-Subscribe:
 List-Post:List-Owner:List-Archive;
 bh=kOudYTSDehC/Yc+nFSWwjeIWc8kNjpI5ve/TqXYt8PI=; b=O8YAPeNZnv4ZosExgHh8J8kEdf
 nkitc0SUv4OpN0nRPIyp9Zeu87ZBEucxMRXrAOhrTati7Y/3ghU/OIO+6qglb47FRkBdz8UVkS+3O
 ZTz7go/zQqsuo5PK2SrX48HfdRIKmRHew00DMfB8JXwY47NUbZdQ1uX29NEuWaNl0vxrG/i+jkKF0
 SgH9xASvpJxxy4+3IlK2sFdx+yXHhXOY2Bj17a2sCv0DLrgRUAeikTCtYtpmblQ4EeAMkuiXUlApL
 LuK53MWYkwYqJ5ipf3pnRCHaYlZfoZTYhlx3YgrebbP5EhZfbKQNruFnWrK+y9oDcvtKzynmhhnxN
 aJqdIzTA==;
Received: from 2603-9001-4203-1ab2-a4db-cc40-dc15-f259.inf6.spectrum.com
 ([2603:9001:4203:1ab2:a4db:cc40:dc15:f259]:39880 helo=[IPv6:::1])
 by dancol.org with esmtpsa (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256
 (Exim 4.96) (envelope-from <dancol@HIDDEN>) id 1uI0G5-00AE5V-37;
 Thu, 22 May 2025 03:22:30 -0400
Date: Thu, 22 May 2025 03:23:34 -0400
From: Daniel Colascione <dancol@HIDDEN>
To: Michael Albinus <michael.albinus@HIDDEN>
Subject: Re: bug#78508: Tramp confused by bracketed paste after remote prompt
User-Agent: K-9 Mail for Android
In-Reply-To: <87bjrmpgb5.fsf@HIDDEN>
References: <m1o6vnqt8w.fsf@HIDDEN> <87bjrmpgb5.fsf@HIDDEN>
Message-ID: <D48F793D-4DB6-4ED9-9744-B01768554167@HIDDEN>
MIME-Version: 1.0
Content-Type: text/plain;
 charset=utf-8
Content-Transfer-Encoding: quoted-printable
X-Spam-Score: -0.0 (/)
X-Debbugs-Envelope-To: 78508
Cc: 78508 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)



On May 21, 2025 3:35:10 AM EDT, Michael Albinus <michael=2Ealbinus@gmx=2Ed=
e> wrote:
>Daniel Colascione <dancol@dancol=2Eorg> writes:
>
>Hi Daniel,
>
>> When the remote shell emits bracketed paste escape codes (as zsh does
>> even when TERM=3Ddumb), tramp ends up timing out unable to find the she=
ll
>> prompt on initial connection=2E
>
>Have you checked the recipe from the Tramp manual in (info "(tramp)
>Frequently Asked Questions") ?

It shouldn't be necessary to do that=2E Sometimes modifying the target sys=
tem isn't all that straightforward, and control sequences should be straigh=
tforward to strip=2E There's already an attempt to strip ANSI color, yes? I=
t's not like Tramp is trying to avail itself of the opportunities SSH provi=
des to make noninteractive use feasible=2E Failure mode is just "when I try=
 to use Emacs to connect to this family of hosts, it hangs=2E VSCode works=
=2E I guess I'll stick with that"=20




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#78508; Package emacs. Full text available.

Message received at 78508 <at> debbugs.gnu.org:


Received: (at 78508) by debbugs.gnu.org; 21 May 2025 07:35:23 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Wed May 21 03:35:23 2025
Received: from localhost ([127.0.0.1]:43946 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1uHdz0-0001fC-Hz
	for submit <at> debbugs.gnu.org; Wed, 21 May 2025 03:35:23 -0400
Received: from mout.gmx.net ([212.227.15.19]:36013)
 by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.84_2) (envelope-from <michael.albinus@HIDDEN>)
 id 1uHdyw-0001dM-P4
 for 78508 <at> debbugs.gnu.org; Wed, 21 May 2025 03:35:20 -0400
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmx.de;
 s=s31663417; t=1747812912; x=1748417712; i=michael.albinus@HIDDEN;
 bh=hsjH/1F+LLyGnQSDkuw0Ws1PGF4v1BHzSzOR2+hs10E=;
 h=X-UI-Sender-Class:From:To:Cc:Subject:In-Reply-To:References:Date:
 Message-ID:MIME-Version:Content-Type:cc:content-transfer-encoding:
 content-type:date:from:message-id:mime-version:reply-to:subject:
 to;
 b=TZo65DZAbnh7RZLqic15gIqtGUOJaG35X0pG+fn6SlFKa/+NS7g1elcQ2ZicEdB8
 bS7Rpuwy41eAAMPbUWx99qEVG+TolAX974mw2FRlx/KKNkTJyaUV8cwEJx9rFs2z1
 fpiGW7UqY6cz/QVh3uhk2hVkkOL03sWlTPd40DP14/iDpPNZFHyYpGgTo0BFXQnIO
 MFXGsaNVIeLYwm5HilrWDjGDz+3MDmi0VawzdwMv5x6EII496oJoSDZcoe0QoghpH
 b37/VdevNEU8WFETCgMDB4jlhu4Lz3rpRMAfPU3ATjX9S9wMV8FUDBqcKQ3hZxvpp
 halmmn2S+vishjgSHg==
X-UI-Sender-Class: 724b4f7f-cbec-4199-ad4e-598c01a50d3a
Received: from gandalf.gmx.de ([185.89.37.61]) by mail.gmx.net (mrgmx005
 [212.227.17.190]) with ESMTPSA (Nemesis) id 1MV67o-1uPzyr3FY6-00U0Ht; Wed, 21
 May 2025 09:35:11 +0200
From: Michael Albinus <michael.albinus@HIDDEN>
To: Daniel Colascione <dancol@HIDDEN>
Subject: Re: bug#78508: Tramp confused by bracketed paste after remote prompt
In-Reply-To: <m1o6vnqt8w.fsf@HIDDEN>
References: <m1o6vnqt8w.fsf@HIDDEN>
Date: Wed, 21 May 2025 09:35:10 +0200
Message-ID: <87bjrmpgb5.fsf@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13)
MIME-Version: 1.0
Content-Type: multipart/mixed; boundary="=-=-="
X-Provags-ID: V03:K1:d3YsgWEqdHM74FaKIcHjBdkzaL2h3z4SG/0nGBVOoyaQFh0uFg3
 1lgSHceVK3/TP84jXZRR032PQqgbtd5yhFNfKdzTPd/CEr0RPC0t4s0JQaC7+1HX4QR74P0
 2oybv1PfLlnLi2XOsc7V1Uxp53yo7FBsrcYh4RvMk5WrMacSp+MoNolANgzZROV9hv8dpLf
 IvfH6U2zvvyhyaF75fP9g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N4tuWo6nHEiBzfubvC8jDpKi
 WrUemysxxOOhnTa4+skTbbo76j12K0OYdS3gC1dpZpgPqHXjdRzzXQePI4kwAAnjkwImYQXwY
 UGVVHt4fxU1pvjl8Of+J0B5nUrABL2ev6Bb9raGfHngv04KhZEB2XxLrshYmqGnpFBfTApJjz
 JgM6R9P4jsiv7ujuYK7ndNf15gC9vkESG6eXgNV+sy9Iz2Q==
X-Spam-Score: -0.7 (/)
X-Debbugs-Envelope-To: 78508
Cc: 78508 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.7 (-)

--=-=-=
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: quoted-printable

Daniel Colascione <dancol@HIDDEN> writes:

Hi Daniel,

> When the remote shell emits bracketed paste escape codes (as zsh does
> even when TERM=3Ddumb), tramp ends up timing out unable to find the shell
> prompt on initial connection.

Have you checked the recipe from the Tramp manual in (info "(tramp)
Frequently Asked Questions") ?

--8<---------------cut here---------------start------------->8---
          When using zsh on remote hosts, disable zsh line editor
          because zsh uses left-hand side and right-hand side prompts in
          parallel.  Add the following line to =E2=80=98~/.zshrc=E2=80=99:

               [[ $TERM =3D=3D "dumb" ]] && unsetopt zle && PS1=3D'$ ' && r=
eturn

          This uses the default value of =E2=80=98tramp-terminal-type=E2=80=
=99, "dumb",
          as value of the =E2=80=98TERM=E2=80=99 environment variable.  If =
you want to
          use another value for =E2=80=98TERM=E2=80=99, change =E2=80=98tra=
mp-terminal-type=E2=80=99 and
          this line accordingly.
--8<---------------cut here---------------end--------------->8---

Note, that until recently TERM wasn't set properly initially, when
calling ssh. I have a WIP patch for this (being under regression test
for some days), see appended. Does this help?

> BTW: is there any particular reason that sshx uses RemoteCommand but ssh
> method does not?

Yes: They are different methods, and they are designed for this
difference. For example, using RemoteCommand disables direct async
processes for sshx connections.

Best regards, Michael.


--=-=-=
Content-Type: text/x-patch
Content-Disposition: attachment

diff --git a/lisp/tramp-sh.el b/lisp/tramp-sh.el
index 64ad3d49..648b2e13 100644
--- a/lisp/tramp-sh.el
+++ b/lisp/tramp-sh.el
@@ -190,7 +190,10 @@ The string is used in `tramp-methods'.")
               `("scp"
                 (tramp-login-program        "ssh")
                 (tramp-login-args           (("-l" "%u") ("-p" "%p") ("%c")
-				             ("-e" "none") ("%h")))
+					     ("-e" "none")
+				             ("-o" ,(format "SetEnv=\"TERM=%s\""
+							    tramp-terminal-type))
+					     ("%h")))
                 (tramp-async-args           (("-q")))
 		(tramp-direct-async         ("-t" "-t"))
                 (tramp-remote-shell         ,tramp-default-remote-shell)
@@ -208,6 +211,8 @@ The string is used in `tramp-methods'.")
                 (tramp-login-args           (("-l" "%u") ("-p" "%p") ("%c")
 				             ("-e" "none") ("-t" "-t")
 					     ("-o" "RemoteCommand=\"%l\"")
+				             ("-o" ,(format "SetEnv=\"TERM=%s\""
+							    tramp-terminal-type))
 					     ("%h")))
                 (tramp-async-args           (("-q")))
                 (tramp-remote-shell         ,tramp-default-remote-shell)
@@ -223,7 +228,10 @@ The string is used in `tramp-methods'.")
               `("rsync"
                 (tramp-login-program        "ssh")
                 (tramp-login-args           (("-l" "%u") ("-p" "%p") ("%c")
-				             ("-e" "none") ("%h")))
+				             ("-e" "none")
+				             ("-o" ,(format "SetEnv=\"TERM=%s\""
+							    tramp-terminal-type))
+					     ("%h")))
                 (tramp-async-args           (("-q")))
                 (tramp-direct-async         t)
                 (tramp-remote-shell         ,tramp-default-remote-shell)
@@ -254,7 +262,10 @@ The string is used in `tramp-methods'.")
               `("ssh"
                 (tramp-login-program        "ssh")
                 (tramp-login-args           (("-l" "%u") ("-p" "%p") ("%c")
-				             ("-e" "none") ("%h")))
+				             ("-e" "none")
+				             ("-o" ,(format "SetEnv=\"TERM=%s\""
+							    tramp-terminal-type))
+					     ("%h")))
                 (tramp-async-args           (("-q")))
 		(tramp-direct-async         ("-t" "-t"))
                 (tramp-remote-shell         ,tramp-default-remote-shell)
@@ -265,6 +276,8 @@ The string is used in `tramp-methods'.")
                 (tramp-login-program        "ssh")
                 (tramp-login-args           (("-l" "%u") ("-p" "%p") ("%c")
 				             ("-e" "none") ("-t" "-t")
+				             ("-o" ,(format "SetEnv=\"TERM=%s\""
+							    tramp-terminal-type))
 					     ("-o" "RemoteCommand=\"%l\"")
 					     ("%h")))
                 (tramp-async-args           (("-q")))
@@ -301,6 +314,7 @@ The string is used in `tramp-methods'.")
                 ;; remote host echoes the command.
 		;; The "-p" argument doesn't work reliably, see Bug#50594.
                 (tramp-login-args           (("SUDO_PROMPT=P\"\"a\"\"s\"\"s\"\"w\"\"o\"\"r\"\"d\"\":")
+                                             (,(format "TERM=%s" tramp-terminal-type))
                                              ("sudo") ("-u" "%u") ("-s") ("-H")
 				             ("%l")))
                 (tramp-remote-shell         ,tramp-default-remote-shell)
@@ -4271,7 +4285,7 @@ file exists and nonzero exit status otherwise."
     (tramp-send-command
      vec (format
 	  (concat
-	   "exec env TERM='%s' INSIDE_EMACS='%s' "
+	   "env; exec env TERM='%s' INSIDE_EMACS='%s' "
 	   "ENV=%s %s PROMPT_COMMAND='' PS1=%s PS2='' PS3='' %s %s -i")
           tramp-terminal-type (tramp-inside-emacs)
           (or (getenv-internal "ENV" tramp-remote-process-environment) "")

--=-=-=--




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#78508; Package emacs. Full text available.

Message received at submit <at> debbugs.gnu.org:


Received: (at submit) by debbugs.gnu.org; 20 May 2025 13:58:27 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Tue May 20 09:58:27 2025
Received: from localhost ([127.0.0.1]:60228 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1uHNUB-0008Cj-2r
	for submit <at> debbugs.gnu.org; Tue, 20 May 2025 09:58:27 -0400
Received: from lists.gnu.org ([2001:470:142::17]:42362)
 by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.84_2) (envelope-from <dancol@HIDDEN>) id 1uHNU6-0008CB-IX
 for submit <at> debbugs.gnu.org; Tue, 20 May 2025 09:58:22 -0400
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 <dancol@HIDDEN>) id 1uHNTy-0004BY-Jy
 for bug-gnu-emacs@HIDDEN; Tue, 20 May 2025 09:58:14 -0400
Received: from dancol.org ([2600:3c01:e000:3d8::1])
 by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.90_1) (envelope-from <dancol@HIDDEN>) id 1uHNTv-0005kE-FU
 for bug-gnu-emacs@HIDDEN; Tue, 20 May 2025 09:58:13 -0400
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=dancol.org; 
 s=x;
 h=Content-Type:MIME-Version:Message-ID:Date:Subject:To:From:Sender:
 Reply-To:Cc:Content-Transfer-Encoding:Content-ID:Content-Description:
 Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:
 In-Reply-To:References:List-Id:List-Help:List-Unsubscribe:List-Subscribe:
 List-Post:List-Owner:List-Archive;
 bh=s/SIUuwPe0y6G1vBIkc+R/4UizaN6yPk+jzpfk1rNVk=; b=Vx7JUXzjY53HLfXAkuXnSIktvm
 r98x0/ibqd/bH8AhssEsOFMBdT05GesVFZ0SOVYyeZed+IMG52/XkrZV2hcnw+WKMBqkVlSwaDUFq
 R8iAmAw+Yum5yHCuFZH+OUZFNy3xnmwqB92KA+o3ce2STXP1cJknKdXR48apRTpsNCPdSjO8/8crq
 1gWwhjnjwxUkGaOD+pjAsfoa5Fn/h60QxgNvjFsF6TyvlOiVYvlU7A7YzuZ4u8sAWySs8tOmjA5Lm
 0drgSfsKQqrlWYUYCmT7lfTeKE4SLBuJ7mQGCtfPMwMDSu/Ipzm+GiHJq2mN1PE2KbmCyXrZcHxJ2
 A0soPsvw==;
Received: from dancol by dancol.org with local (Exim 4.96)
 (envelope-from <dancol@HIDDEN>) id 1uHNSq-00A6Ud-1Z
 for bug-gnu-emacs@HIDDEN; Tue, 20 May 2025 09:57:04 -0400
From: Daniel Colascione <dancol@HIDDEN>
To: bug-gnu-emacs@HIDDEN
Subject: Tramp confused by bracketed paste after remote prompt
User-Agent: mu4e 1.12.10; emacs 31.0.50
Date: Tue, 20 May 2025 09:58:07 -0400
Message-ID: <m1o6vnqt8w.fsf@HIDDEN>
MIME-Version: 1.0
Content-Type: text/plain
Received-SPF: pass client-ip=2600:3c01:e000:3d8::1;
 envelope-from=dancol@HIDDEN; helo=dancol.org
X-Spam_score_int: -20
X-Spam_score: -2.1
X-Spam_bar: --
X-Spam_report: (-2.1 / 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, SPF_HELO_PASS=-0.001,
 SPF_PASS=-0.001 autolearn=ham autolearn_force=no
X-Spam_action: no action
X-Spam-Score: 0.9 (/)
X-Debbugs-Envelope-To: submit
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -0.1 (/)

When the remote shell emits bracketed paste escape codes (as zsh does
even when TERM=dumb), tramp ends up timing out unable to find the shell
prompt on initial connection.

BTW: is there any particular reason that sshx uses RemoteCommand but ssh
method does not?




Acknowledgement sent to Daniel Colascione <dancol@HIDDEN>:
New bug report received and forwarded. Copy sent to bug-gnu-emacs@HIDDEN. Full text available.
Report forwarded to bug-gnu-emacs@HIDDEN:
bug#78508; Package emacs. Full text available.
Please note: This is a static page, with minimal formatting, updated once a day.
Click here to see this page with the latest information and nicer formatting.
Last modified: Thu, 22 May 2025 11:30:02 UTC

GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997 nCipher Corporation Ltd, 1994-97 Ian Jackson.