Subject: bug#28139: 25.2; TRAMP vs bash 4.4 / readline 7.0 "bracketed paste" mode

From: Daniel Pittman <[email-masked]>
Date: Tue, 31 Oct 2017 16:40:13 -0400

On Fri, Aug 25, 2017 at 3:31 AM, Michael Albinus <[email-masked]>
wrote:

> Daniel Pittman <[email-masked]> writes:
> >     (I wouldn't reject a patch from your side :-)
> >
> > If I confirm it still exists in the current version I'll try and cut a
> > patch for this, but my contribution time is limited, I'm afraid.
>
> Take your time, there's no rush. The next regular Tramp release is
> scheduled for end of the year.
>

Please find attached a patch that resolves the bracketed paste issues
nicely for me.  It does so by setting two environment variables when
initially establishing the remote shell: `EMACS=t`, which bash interprets
to disable line editing, and `TERM=dumb`, which is a better match than the
default interactive terminal type I get.

Google own the copyright on this change, such as it is, but they have
papers on file with the FSF.  (As do I, for TRAMP, though I have not
contributed since 2000 or so, haha.)