Subject: Re: bug#78508: Tramp confused by bracketed paste after remote prompt

From: Michael Albinus <[email-masked]>
Date: Thu, 22 May 2025 18:59:00 +0200

Daniel Colascione <[email-masked]> writes:

Hi Daniel,

>>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.
>
> We live in a world in which people spew hard coded terminal escape
> sequences constantly, often without regard for isatty, TERM, or basic
> common sense. Tramp can either work or refuse to work. It's no excuse
> to say people are just all holding it wrong when other systems that
> talk to shells work fine.

I said "Tramp won't go into the prompt parsing business." It doesn't
mean, that Tramp couldn't use an existing function to do the job.

What we have is shell-prompt-pattern, which doesn't fit your request.

>>Have you tried the patch I've shown?
>
> Doesn't help. This system emits the control codes regardless of TERM.
> Is that wrong? Yes. Are people going to stop? No, they are not. 

You fail to show a recipe for this problem, that I could work on. At
minimum, an Emacs session started with "-Q", and a Tramp debug buffer
with tramp-verbose set to 10.

Best regards, Michael.