From unknown Sat Sep 20 01:51:43 2025 X-Loop: help-debbugs@gnu.org Subject: bug#28139: 25.2; TRAMP vs bash 4.4 / readline 7.0 "bracketed paste" mode Resent-From: Daniel Pittman Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 18 Aug 2017 15:34:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 28139 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: 28139@debbugs.gnu.org X-Debbugs-Original-To: bug-gnu-emacs@gnu.org Received: via spool by submit@debbugs.gnu.org id=B.150307043526280 (code B ref -1); Fri, 18 Aug 2017 15:34:01 +0000 Received: (at submit) by debbugs.gnu.org; 18 Aug 2017 15:33:55 +0000 Received: from localhost ([127.0.0.1]:44523 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dijHW-0006po-TI for submit@debbugs.gnu.org; Fri, 18 Aug 2017 11:33:55 -0400 Received: from eggs.gnu.org ([208.118.235.92]:53989) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dij7N-0006aj-IU for submit@debbugs.gnu.org; Fri, 18 Aug 2017 11:23:26 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1dij7G-00035D-In for submit@debbugs.gnu.org; Fri, 18 Aug 2017 11:23:20 -0400 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=0.8 required=5.0 tests=BAYES_50,HTML_MESSAGE, T_DKIM_INVALID autolearn=disabled version=3.3.2 Received: from lists.gnu.org ([2001:4830:134:3::11]:52438) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1dij7G-000359-FP for submit@debbugs.gnu.org; Fri, 18 Aug 2017 11:23:18 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:44925) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dij7E-0003vp-2M for bug-gnu-emacs@gnu.org; Fri, 18 Aug 2017 11:23:18 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1dij7C-000331-2q for bug-gnu-emacs@gnu.org; Fri, 18 Aug 2017 11:23:16 -0400 Received: from mail-qk0-x234.google.com ([2607:f8b0:400d:c09::234]:37275) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1dij7B-00031l-Sq for bug-gnu-emacs@gnu.org; Fri, 18 Aug 2017 11:23:14 -0400 Received: by mail-qk0-x234.google.com with SMTP id z18so54559032qka.4 for ; Fri, 18 Aug 2017 08:23:11 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20161025; h=mime-version:from:date:message-id:subject:to; bh=eLw+v3tze8TbrvesuymBATMuRX1hyw2PcDyDhvPAApg=; b=Yh0UxdeYXxa6n+c4mf9ZI5ThzlLCAJzX69/EyqMgkQt3Whmu0levwqOX02Vt3cnF6z lYYhlFlVTi3lJ95Sh7pKod/o90DwZoCW3XHOcuDvyr63N/reYvNgm+Dpj5FutMAzX2Br EQgd0e10Bgz5zxuIYIvQQkLz95LaNuyx8xzPUoHD73QWZ80f4J2CpMvn6l4pym+9P0NW xltWYOUSR24ZFX5x7vOh5EyR8u2osQFaL3gSzURoTvswgf/wmCJhfvDaaJAfUG8ThjU6 j6VjaIo8HLdVxm+Skc7X5aXxz0PlUNGrwUDmiDj+8aMhPzD32XRRn2hrobviEAhF5Cj0 L46A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:from:date:message-id:subject:to; bh=eLw+v3tze8TbrvesuymBATMuRX1hyw2PcDyDhvPAApg=; b=ihEukozKrDBJnFXbfHN1CVsLXNicUT+DGeLtwqoxpJCj4n8BqWag97WrUmp0D+MdC/ vF+PO+veRSw2OyJlE4C8zLYCQWkBs8yTo4bFeRTrQEjRwBFIbnqySNfz5vCwvAWtOcY8 k9iWN8CjjZtUkJ4mL6OmGd0xt3SgJOXyJo8iw+fEbDsrukxrUKnXrvhqZYIG1nIUF4mx OGQREKxfAAHh+tQrw48cq6omkS4yd0aqgaYbKVphryyYWES/XwA4KRgvjZYKvltcWls/ IU4BK7dMqH2u0qI5oiUw9Kpic4XLGFQv/rfdBrU63Dzq9np+89M+otUqi5BkUeHWHPIY Poqw== X-Gm-Message-State: AHYfb5inxaI360Bnwg28VF5S0H8kwIlO1FoRE6DmUoJJyzp0GI8JVjG6 mmw+uUf31CPbn42maRaJs8jUWzpBlCUtWcgrKw== X-Received: by 10.55.176.66 with SMTP id z63mr12673117qke.260.1503069790344; Fri, 18 Aug 2017 08:23:10 -0700 (PDT) MIME-Version: 1.0 Received: by 10.200.51.177 with HTTP; Fri, 18 Aug 2017 08:22:29 -0700 (PDT) From: Daniel Pittman Date: Fri, 18 Aug 2017 11:22:29 -0400 Message-ID: Content-Type: multipart/alternative; boundary="94eb2c065500edafca055708b4f3" X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x X-Received-From: 2001:4830:134:3::11 X-Spam-Score: -4.0 (----) X-Mailman-Approved-At: Fri, 18 Aug 2017 11:33:53 -0400 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -4.0 (----) --94eb2c065500edafca055708b4f3 Content-Type: text/plain; charset="UTF-8" After upgrading a remote system to a version of GNU/Linux that includes bash 4.4 (from Debian/testing), with the readline option `set enable-bracketed-paste on` in /etc/inputrc, and no personal inputrc, tramp breaks. The exact version of `/bin/sh --version` is: GNU bash, version 4.4.12(1)-release (x86_64-pc-linux-gnu) Specifically, it breaks because bash emits "enable bracketed paste" and "disable bracketed paste" CSI control sequences to the terminal around the shell prompt. That results in TRAMP trying to read ` [ 2 0 0 4 h "..."` as a Lisp expression, when reading the remote `uname -sr` output, which doesn't work. Passing the `--noediting` option to the remote shell command resolves the problem, by disabling readline entirely, but it should also be possible to augment the `tramp-open-connection-setup-interactive-shell` to issue, unconditionally, the command: bind 'set enable-bracketed-paste off' That will fail on some variants of /bin/sh (dash, posh, tested, but non-GNU systems may also show this.) Ignoring the failure should be harmless, however, both when this is not a valid internal command, and when it is not known to the bash / readline version. In GNU Emacs 25.2.1 (x86_64-apple-darwin16.7.0, NS appkit-1504.83 Version 10.12.6 (Build 16G29)) of 2017-08-08 built on slippycheeze-macbookpro.roam Windowing system distributor 'Apple', version 10.3.1504 Configured using: 'configure --disable-dependency-tracking --disable-silent-rules --enable-locallisppath=/Users/slippycheeze/homebrew/share/emacs/site-lisp --infodir=/Users/slippycheeze/homebrew/Cellar/emacs-edge/25.2/share/info/emacs --prefix=/Users/slippycheeze/homebrew/Cellar/emacs-edge/25.2 --with-modules --with-rsvg --with-xml2 --without-pop --disable-ns-self-contained --with-ns --without-x --without-dbus --with-gnutls' Configured features: JPEG RSVG NOTIFY ACL GNUTLS LIBXML2 ZLIB TOOLKIT_SCROLL_BARS NS MODULES Important settings: value of $LANG: en_US.UTF-8 locale-coding-system: utf-8-unix Major mode: Emacs-Lisp Minor modes in effect: diff-hl-flydiff-mode: t diff-hl-mode: t diff-auto-refine-mode: t highlight-parentheses-mode: t flyspell-mode: t ws-butler-mode: t shell-dirtrack-mode: t global-undo-tree-mode: t undo-tree-mode: t global-emojify-mode: t emojify-mode: t async-bytecomp-package-mode: t override-global-mode: t midnight-mode: t global-auto-revert-mode: t display-battery-mode: t desktop-save-mode: t auto-insert-mode: t tooltip-mode: t global-eldoc-mode: t eldoc-mode: t electric-indent-mode: t mouse-wheel-mode: t menu-bar-mode: t file-name-shadow-mode: t global-font-lock-mode: t font-lock-mode: t auto-composition-mode: t auto-encryption-mode: t auto-compression-mode: t column-number-mode: t line-number-mode: t auto-fill-function: do-auto-fill transient-mark-mode: t abbrev-mode: t Recent messages: Checking 34 files in /Users/slippycheeze/homebrew/Cellar/emacs-edge/25.2/share/emacs/25.2/lisp/emulation... Checking 167 files in /Users/slippycheeze/homebrew/Cellar/emacs-edge/25.2/share/emacs/25.2/lisp/emacs-lisp... Checking 24 files in /Users/slippycheeze/homebrew/Cellar/emacs-edge/25.2/share/emacs/25.2/lisp/cedet... Checking 57 files in /Users/slippycheeze/homebrew/Cellar/emacs-edge/25.2/share/emacs/25.2/lisp/calendar... Checking 87 files in /Users/slippycheeze/homebrew/Cellar/emacs-edge/25.2/share/emacs/25.2/lisp/calc... Checking 120 files in /Users/slippycheeze/homebrew/Cellar/emacs-edge/25.2/share/emacs/25.2/lisp/obsolete... Checking for load-path shadows...done user-error: End of history; no default available [2 times] Features: (shadow sort footnote mail-extr gnus-msg gnus-art mm-uu mml2015 mm-view mml-smime smime dig mailcap gnus-sum gnus-group gnus-undo gnus-start gnus-cloud nnimap nnmail mail-source tls gnutls utf7 netrc nnoo parse-time gnus-spec gnus-int gnus-range gnus-win emacsbug message rfc822 mml mml-sec epg mm-decode mm-bodies mm-encode mail-parse rfc2231 mailabbrev gmm-utils mailheader sendmail rfc2047 rfc2045 ietf-drums pp tabify bs executable tramp-cmds debug tramp-cache misearch multi-isearch find-func cursor-sensor diff-mode highlight-parentheses flyspell ispell ws-butler jka-compr skeleton generic-x cc-mode cc-fonts cc-guess cc-menus cc-cmds cc-styles cc-align align tramp tramp-compat auth-source eieio eieio-core password-cache tramp-loaddefs delight emojify apropos tar-mode json map subr-x ht dracula-theme edmacro kmacro async-bytecomp advice async cus-edit memoize dash-functional f dash s assoc use-package diminish bind-key easy-mmode finder-inf cl-macs cl info package epg-config seq byte-opt gv bytecomp byte-compile cl-extra cconv midnight icomplete grep compile comint ansi-color ring gnus gnus-ems nnheader gnus-util mail-utils mm-util help-fns help-mode easymenu mail-prsvr wid-edit autorevert filenotify battery desktop frameset autoinsert cus-start cus-load cl-seq cl-loaddefs pcase cl-lib time-date mule-util tooltip eldoc electric uniquify ediff-hook vc-hooks lisp-float-type mwheel ns-win ucs-normalize term/common-win tool-bar dnd fontset image regexp-opt fringe tabulated-list newcomment elisp-mode lisp-mode prog-mode register page menu-bar rfn-eshadow timer select scroll-bar mouse jit-lock font-lock syntax facemenu font-core frame cl-generic cham georgian utf-8-lang misc-lang vietnamese tibetan thai tai-viet lao korean japanese eucjp-ms cp51932 hebrew greek romanian slovak czech european ethiopic indian cyrillic chinese charscript case-table epa-hook jka-cmpr-hook help simple abbrev minibuffer cl-preloaded nadvice loaddefs button faces cus-face macroexp files text-properties overlay sha1 md5 base64 format env code-pages mule custom widget hashtable-print-readable backquote kqueue cocoa ns multi-tty make-network-process emacs) Memory information: ((conses 16 582897 386689) (symbols 48 46748 3) (miscs 40 565 2646) (strings 32 160816 184679) (string-bytes 1 4469214) (vectors 16 96463) (vector-slots 8 3893724 189356) (floats 8 11677 1729) (intervals 56 6386 3416) (buffers 976 39)) --94eb2c065500edafca055708b4f3 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
After upgrading a remote system to a version of GNU/L= inux that includes bash
4.4 (from Debian/testing), with the r= eadline option `set
enable-bracketed-paste on` in /etc/inputrc, a= nd no personal inputrc,
tramp breaks.

Th= e exact version of `/bin/sh --version` is:
GNU bash, version 4.4.= 12(1)-release (x86_64-pc-linux-gnu)

Specifically, = it breaks because bash emits "enable bracketed paste" and
"disable bracketed paste" CSI control sequences to the termina= l around the
shell prompt.

That results = in TRAMP trying to read `<ESC> [ 2 0 0 4 h "..."` as a Lisp=
expression, when reading the remote `uname -sr` output, which do= esn't work.

Passing the `--noediting` option t= o the remote shell command resolves the
problem, by disabling rea= dline entirely, but it should also be possible to
augment the `tr= amp-open-connection-setup-interactive-shell` to issue,
unconditio= nally, the command:

=C2=A0 =C2=A0 bind 'set en= able-bracketed-paste off'

That will fail on so= me variants of /bin/sh (dash, posh, tested, but non-GNU
systems m= ay also show this.)

Ignoring the failure should be= harmless, however, both when this is not a
valid internal comman= d, and when it is not known to the bash /
readline version.
=


In GNU Emacs 25.2.1 (x86_64-apple-darwin= 16.7.0, NS appkit-1504.83 Version 10.12.6 (Build 16G29))
=C2=A0of= 2017-08-08 built on slippycheeze-macbookpro.roam
Windowing syste= m distributor 'Apple', version 10.3.1504
Configured using= :
=C2=A0'configure --disable-dependency-tracking --disable-si= lent-rules
=C2=A0--enable-locallisppath=3D/Users/slippycheeze/hom= ebrew/share/emacs/site-lisp
=C2=A0--infodir=3D/Users/slippycheeze= /homebrew/Cellar/emacs-edge/25.2/share/info/emacs
=C2=A0--prefix= =3D/Users/slippycheeze/homebrew/Cellar/emacs-edge/25.2 --with-modules
=
=C2=A0--with-rsvg --with-xml2 --without-pop --disable-ns-self-containe= d --with-ns
=C2=A0--without-x --without-dbus --with-gnutls'

Configured features:
JPEG RSVG NOTIFY ACL= GNUTLS LIBXML2 ZLIB TOOLKIT_SCROLL_BARS NS MODULES

Important settings:
=C2=A0 value of $LANG: en_US.UTF-8
=C2=A0 locale-coding-system: utf-8-unix

Major mo= de: Emacs-Lisp

Minor modes in effect:
= =C2=A0 diff-hl-flydiff-mode: t
=C2=A0 diff-hl-mode: t
= =C2=A0 diff-auto-refine-mode: t
=C2=A0 highlight-parentheses-mode= : t
=C2=A0 flyspell-mode: t
=C2=A0 ws-butler-mode: t
=C2=A0 shell-dirtrack-mode: t
=C2=A0 global-undo-tree-mod= e: t
=C2=A0 undo-tree-mode: t
=C2=A0 global-emojify-mod= e: t
=C2=A0 emojify-mode: t
=C2=A0 async-bytecomp-packa= ge-mode: t
=C2=A0 override-global-mode: t
=C2=A0 midnig= ht-mode: t
=C2=A0 global-auto-revert-mode: t
=C2=A0 dis= play-battery-mode: t
=C2=A0 desktop-save-mode: t
=C2=A0= auto-insert-mode: t
=C2=A0 tooltip-mode: t
=C2=A0 glob= al-eldoc-mode: t
=C2=A0 eldoc-mode: t
=C2=A0 electric-i= ndent-mode: t
=C2=A0 mouse-wheel-mode: t
=C2=A0 menu-ba= r-mode: t
=C2=A0 file-name-shadow-mode: t
=C2=A0 global= -font-lock-mode: t
=C2=A0 font-lock-mode: t
=C2=A0 auto= -composition-mode: t
=C2=A0 auto-encryption-mode: t
=C2= =A0 auto-compression-mode: t
=C2=A0 column-number-mode: t
=C2=A0 line-number-mode: t
=C2=A0 auto-fill-function: do-auto-= fill
=C2=A0 transient-mark-mode: t
=C2=A0 abbrev-mode: = t

Recent messages:
Checking 34 files in = /Users/slippycheeze/homebrew/Cellar/emacs-edge/25.2/share/emacs/25.2/lisp/e= mulation...
Checking 167 files in /Users/slippycheeze/homebrew/Ce= llar/emacs-edge/25.2/share/emacs/25.2/lisp/emacs-lisp...
Checking= 24 files in /Users/slippycheeze/homebrew/Cellar/emacs-edge/25.2/share/emac= s/25.2/lisp/cedet...
Checking 57 files in /Users/slippycheeze/hom= ebrew/Cellar/emacs-edge/25.2/share/emacs/25.2/lisp/calendar...
Ch= ecking 87 files in /Users/slippycheeze/homebrew/Cellar/emacs-edge/25.2/shar= e/emacs/25.2/lisp/calc...
Checking 120 files in /Users/slippychee= ze/homebrew/Cellar/emacs-edge/25.2/share/emacs/25.2/lisp/obsolete...
<= div>Checking for load-path shadows...done
user-error: End of hist= ory; no default available [2 times]

Features:
(shadow sort footnote mail-extr gnus-msg gnus-art mm-uu mml2015 mm-vi= ew
mml-smime smime dig mailcap gnus-sum gnus-group gnus-undo gnus= -start
gnus-cloud nnimap nnmail mail-source tls gnutls utf7 netrc= nnoo parse-time
gnus-spec gnus-int gnus-range gnus-win emacsbug = message rfc822 mml mml-sec epg
mm-decode mm-bodies mm-encode mail= -parse rfc2231 mailabbrev gmm-utils
mailheader sendmail rfc2047 r= fc2045 ietf-drums pp tabify bs executable
tramp-cmds debug tramp-= cache misearch multi-isearch find-func cursor-sensor
diff-mode hi= ghlight-parentheses flyspell ispell ws-butler jka-compr skeleton
= generic-x cc-mode cc-fonts cc-guess cc-menus cc-cmds cc-styles cc-align ali= gn
tramp tramp-compat auth-source eieio eieio-core password-cache= tramp-loaddefs
delight emojify apropos tar-mode json map subr-x = ht dracula-theme edmacro
kmacro async-bytecomp advice async cus-e= dit memoize dash-functional f dash s
assoc use-package diminish b= ind-key easy-mmode finder-inf cl-macs cl info
package epg-config = seq byte-opt gv bytecomp byte-compile cl-extra cconv
midnight ico= mplete grep compile comint ansi-color ring gnus gnus-ems nnheader
gnus-util mail-utils mm-util help-fns help-mode easymenu mail-prsvr wid-ed= it
autorevert filenotify battery desktop frameset autoinsert cus-= start cus-load
cl-seq cl-loaddefs pcase cl-lib time-date mule-uti= l tooltip eldoc electric
uniquify ediff-hook vc-hooks lisp-float-= type mwheel ns-win ucs-normalize
term/common-win tool-bar dnd fon= tset image regexp-opt fringe tabulated-list
newcomment elisp-mode= lisp-mode prog-mode register page menu-bar rfn-eshadow
timer sel= ect scroll-bar mouse jit-lock font-lock syntax facemenu font-core
frame cl-generic cham georgian utf-8-lang misc-lang vietnamese tibetan tha= i
tai-viet lao korean japanese eucjp-ms cp51932 hebrew greek roma= nian slovak
czech european ethiopic indian cyrillic chinese chars= cript case-table epa-hook
jka-cmpr-hook help simple abbrev minibu= ffer cl-preloaded nadvice loaddefs
button faces cus-face macroexp= files text-properties overlay sha1 md5 base64
format env code-pa= ges mule custom widget hashtable-print-readable backquote
kqueue = cocoa ns multi-tty make-network-process emacs)

Mem= ory information:
((conses 16 582897 386689)
=C2=A0(symb= ols 48 46748 3)
=C2=A0(miscs 40 565 2646)
=C2=A0(string= s 32 160816 184679)
=C2=A0(string-bytes 1 4469214)
=C2= =A0(vectors 16 96463)
=C2=A0(vector-slots 8 3893724 189356)
=
=C2=A0(floats 8 11677 1729)
=C2=A0(intervals 56 6386 3416)
=C2=A0(buffers 976 39))

--94eb2c065500edafca055708b4f3-- From unknown Sat Sep 20 01:51:43 2025 X-Loop: help-debbugs@gnu.org Subject: bug#28139: 25.2; TRAMP vs bash 4.4 / readline 7.0 "bracketed paste" mode Resent-From: Michael Albinus Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 19 Aug 2017 18:00:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 28139 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Daniel Pittman Cc: 28139@debbugs.gnu.org Received: via spool by 28139-submit@debbugs.gnu.org id=B28139.150316555929594 (code B ref 28139); Sat, 19 Aug 2017 18:00:01 +0000 Received: (at 28139) by debbugs.gnu.org; 19 Aug 2017 17:59:19 +0000 Received: from localhost ([127.0.0.1]:45815 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dj81m-0007hE-Ql for submit@debbugs.gnu.org; Sat, 19 Aug 2017 13:59:19 -0400 Received: from mout.gmx.net ([212.227.15.15]:63236) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dj81k-0007h1-TH for 28139@debbugs.gnu.org; Sat, 19 Aug 2017 13:59:17 -0400 Received: from detlef.gmx.de ([212.86.41.245]) by mail.gmx.com (mrgmx003 [212.227.17.190]) with ESMTPSA (Nemesis) id 0MNIAz-1dcmN21mgr-006smq; Sat, 19 Aug 2017 19:59:09 +0200 From: Michael Albinus References: Date: Sat, 19 Aug 2017 19:59:07 +0200 In-Reply-To: (Daniel Pittman's message of "Fri, 18 Aug 2017 11:22:29 -0400") Message-ID: <87mv6vjv6c.fsf@detlef> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Provags-ID: V03:K0:Pno33tp0mchG4tavIiTrpWOK/bei2uwfOP4AHJl6/gbOtB/rQKr wbesdsOyFeHrI7Qpky7ERPbqNfNGzgiGlDWLGBjPMspDP/VuoMt2NEFj9Vba2ET99dacpbU 7Wwl2f6OQZS67YgxDLdXxYzx5TYVCpDpQuuriNoWEfyOeNG3+a7tjeaP7GCiaBlZNgi98Yp Z4lnqJuuiXtUhfKgdjetw== X-UI-Out-Filterresults: notjunk:1;V01:K0:1Yj8SZ4PqDQ=:LLJzoSQq53e3qMHH+0RmSz IyWrd366U2Ke9zZuS9N1zF0mixfRgmfduR2ZMJr8rjaqHi5dv6FzDi+uAdp6h89m56NdUC0uD 1dadf9x/4G5Tcxl4kmyemPUYCwUYfRGnv3+OZdC3WQVdRPX5NCtANM961nVL6QpmprlVA1lzQ SiBUOSKKI5LqXhukQQzqyu6EupEgJqCa7I+uJ9erktg4MCig1ai3n2HflfYQMHi4vaYJTi4cd 4aYzvhYXlpFbYFDfmrmF6iSE8+Pu4WyFkJQr9RcWnxOj7Y7htkcfAaaGF/sZaO3/i0wLkrMyY L1I6KdNoC2wYBBFzWZOgeAg4tK/Ux4IFueLtDmpNhsNl3UdcyZH1EaDRiaNv9F2duPP7eUdh1 Pk6LhXV2osrpCPlLVk3Up8pbZnygFu5UxlJH4d797KI0WvhIxx09e14hULPIAp0cE7LdnLFWT t3zQEkcftZuG1AZ3HM8MCikNYDbM9tZ+Mp52y2iHbg3UI0RIvqu6xadTNCOPSLbhB/JUvjhdb v7Cim0mR2QVR0q//sX635uNUpnTmJTcuhnK/YY7z8t6zYr0Z1dCnpFH+Sgm4F8mdDkb14iFv6 EWqvsSIJkgkZtZZ/dzr6GHJdFyOJfnmw8F6yMHfImhyNixbNhnJ5+j2ab7uo71bucxVo4Lkmb lEaEVaeergg9SjKofAKrjwmGTMlRMyTXrKHWcZChEi6DDYNxrdxuL229aoq6PSy+inKmpOCPg 5wWjmc/e7BYTECCv7EbaMpcTVEHSSXxsCMwRUByFJzKS+F4ou/XUsfVh8Kndn8NxuW6wJfBz6 kTatiRbFgfjnn755RwZJJTnffPALiqkT+syuq81WQz9V/U6ho8= X-Spam-Score: -3.5 (---) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.5 (---) Daniel Pittman writes: Hi Daniel, > After upgrading a remote system to a version of GNU/Linux that > includes bash > 4.4 (from Debian/testing), with the readline option `set > enable-bracketed-paste on` in /etc/inputrc, and no personal inputrc, > tramp breaks. Many different shells are busy to break Tramp. > Passing the `--noediting` option to the remote shell command resolves > the problem, by disabling readline entirely, but it should also be > possible to augment the > `tramp-open-connection-setup-interactive-shell` to issue, > unconditionally, the command: > > bind 'set enable-bracketed-paste off' Does it help to add the following line into your remote ~/.bashrc: [ $TERM = "dumb" ] && bind 'set enable-bracketed-paste off' Best regards, Michael. From unknown Sat Sep 20 01:51:43 2025 X-Loop: help-debbugs@gnu.org Subject: bug#28139: 25.2; TRAMP vs bash 4.4 / readline 7.0 "bracketed paste" mode Resent-From: Daniel Pittman Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Mon, 21 Aug 2017 15:21:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 28139 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: 28139@debbugs.gnu.org Received: via spool by 28139-submit@debbugs.gnu.org id=B28139.15033288203849 (code B ref 28139); Mon, 21 Aug 2017 15:21:01 +0000 Received: (at 28139) by debbugs.gnu.org; 21 Aug 2017 15:20:20 +0000 Received: from localhost ([127.0.0.1]:47980 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1djoV2-000100-Bg for submit@debbugs.gnu.org; Mon, 21 Aug 2017 11:20:20 -0400 Received: from mail-qt0-f171.google.com ([209.85.216.171]:33290) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1djoV0-0000zo-5D for 28139@debbugs.gnu.org; Mon, 21 Aug 2017 11:20:18 -0400 Received: by mail-qt0-f171.google.com with SMTP id d15so14037882qta.0 for <28139@debbugs.gnu.org>; Mon, 21 Aug 2017 08:20:18 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20161025; h=mime-version:in-reply-to:references:from:date:message-id:subject:to; bh=9F27K8Qiu573QXR2khkauvEUPEmoFqMsXRpdhlgPKWQ=; b=k7+oDy8yq0aYCoG+ZZuy6e/4/g0omS72bVWl+VqG1nDZP87Ao8oLDIJrDXE+WMA+Fm Wy8S1+wLn/zI2Uh3IN93PGYmLTPbdpbhe8HiELOqtDQxnG+ZQwchDLMu56IwH2PCKyl+ JBTF4N1D3g6DdhG6g9CnMVZ3ErvUG/NYpEqs7xEOlcSitwToyTuBmIdBDpIbShm8pgLM EF1kIk3shLQBAJaCSA4P1OwPLH3eIKAJ5jMaVoOhPV8MZnTdLqxXK1Mpc0Ea2JISC9km sqOZDzpyBtlO8LbXpXPGdGmqr/IfIqbr6m0jD4bWQaguGZRA9HYSNg7GUayBK2ZOeQos nV4g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to; bh=9F27K8Qiu573QXR2khkauvEUPEmoFqMsXRpdhlgPKWQ=; b=nY3P/To5/cfmSxwd33ZbEfvIVl+r2LjQL5sdyeLAj6/MPgzQiRXf8sdjOwjqHmN4lE XK61p81i3/ATg4H+APBENQe5J7Vea9Xf1Vkx264r1DfRTq+wzlo5MO++5j0nXivFzbY2 qgfbza1nchoIasuPaHq/xtg/Cq4uBKS/Xqly5uopG0CHqG9lYM2T83pnFmzjA21d7Kxp X4SZSnmhTFCpDke1SIZdNSl9m4LMR6gHNmqjPx8fUUaVqDR0/YD/azDIT5mEDOqA7ZZO 19L/z4aWOT7hp/GEkiVEUipdgotps3Tk8DG6y9x90gAYpjXVGEv2zdtbRM0zc0sB3Vf8 C5nA== X-Gm-Message-State: AHYfb5iNQ4d2BVDXZtDJLzpbrtl3gfWo5bdm6nU8VyLog7UjhsGidLiM XdlLmDSn2mbYQveObvGjf4d6jN4KH1AGGMBZqw== X-Received: by 10.200.45.215 with SMTP id q23mr1065038qta.133.1503328812166; Mon, 21 Aug 2017 08:20:12 -0700 (PDT) MIME-Version: 1.0 Received: by 10.200.51.177 with HTTP; Mon, 21 Aug 2017 08:19:31 -0700 (PDT) In-Reply-To: <87mv6vjv6c.fsf@detlef> References: <87mv6vjv6c.fsf@detlef> From: Daniel Pittman Date: Mon, 21 Aug 2017 11:19:31 -0400 Message-ID: Content-Type: multipart/alternative; boundary="001a1142aa9ed4da5c055745039b" X-Spam-Score: 0.5 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: 0.5 (/) --001a1142aa9ed4da5c055745039b Content-Type: text/plain; charset="UTF-8" On Sat, Aug 19, 2017 at 1:59 PM, Michael Albinus wrote: > > After upgrading a remote system to a version of GNU/Linux that > > includes bash > > 4.4 (from Debian/testing), with the readline option `set > > enable-bracketed-paste on` in /etc/inputrc, and no personal inputrc, > > tramp breaks. > > Many different shells are busy to break Tramp. > Believe me, I know the pain. This isn't my first time poking into the internals of how TRAMP hits remote shells. > > Passing the `--noediting` option to the remote shell command resolves > > the problem, by disabling readline entirely, but it should also be > > possible to augment the > > `tramp-open-connection-setup-interactive-shell` to issue, > > unconditionally, the command: > > > > bind 'set enable-bracketed-paste off' > > Does it help to add the following line into your remote ~/.bashrc: > > [ $TERM = "dumb" ] && bind 'set enable-bracketed-paste off' > Alas, no, and the bash(1) man page "INVOCATION" section makes it clear why: Since a shell invoked as sh does not attempt to read and execute commands from any other startup files, the --rcfile option has no effect. Interactive testing confirms this: if I invoke the shell the as TRAMP does, with: env ENV='' HISTFILE='' HISTFILESIZE=0 HISTSIZE=0 PROMPT_COMMAND='' PS1=\#\$\ PS2='' PS3='' /bin/sh ...then strace confirms that no init files are read, other than /etc/inputrc So, it's not possible to work around this issue without injecting additional code into the shell setup process, using `/bin/sh --noediting`, or using an interactive shell and adding that to the .profile or equivalent. note: --noediting has been present since bash 2.0 according to their changelog, so it may be reasonable to add by default to the non-interactive shell invocations. Ultimately, though, perhaps adding the ability to run additional commands during the interactive shell setup process and/or consuming any CSI sequences prior to matching, would be a more future-proof solution to this. --001a1142aa9ed4da5c055745039b Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
On S= at, Aug 19, 2017 at 1:59 PM, Michael Albinus <michael.albinus@gmx.de= > wrote:
> After upgrading a remote system to a version of GNU/Linux that
> includes bash
> 4.4 (from Debian/testing), with the readline option `set
> enable-bracketed-paste on` in /etc/inputrc, and no personal inputrc, > tramp breaks.

Many different shells are busy to break Tramp.

Believe me, I know the pain.=C2=A0 This isn't my first time pok= ing into the internals of how TRAMP hits remote shells.
=C2=A0
> Passing the `--noediting` option to the remote shell command resolves<= br> > the problem, by disabling readline entirely, but it should also be
> possible to augment the
> `tramp-open-connection-setup-interactive-shell` to issue,
> unconditionally, the command:
>
>=C2=A0 =C2=A0 =C2=A0bind 'set enable-bracketed-paste off'

Does it help to add the following line into your remote ~/.bashrc:

[ $TERM =3D "dumb" ] && bind 'set enable-bracketed-pa= ste off'

Alas, no, and the bash(1) = man page "INVOCATION" section makes it clear why:

<= /div>
=C2=A0 =C2=A0 Since a shell invoked as sh does not attempt t= o read and=C2=A0
=C2=A0 =C2=A0 execute commands from any other st= artup files,=C2=A0
=C2=A0 =C2=A0 the --rcfile option has no effec= t.

Interactive testing confirms this: if I i= nvoke the shell the as TRAMP does, with:

env ENV= =3D'' HISTFILE=3D'' HISTFILESIZE=3D0 HISTSIZE=3D0 PROMPT_CO= MMAND=3D'' PS1=3D\#\$\ =C2=A0PS2=3D'' PS3=3D'' /bin= /sh=C2=A0

...then strace confirms that no init= files are read, other than /etc/inputrc

So, it= 9;s not possible to work around this issue without injecting additional cod= e into the shell setup process, using `/bin/sh --noediting`, or using an in= teractive shell and adding that to the .profile or equivalent.
note: --noediting has been present since bash 2.0 according to= their changelog, so it may be reasonable to add by default to the non-inte= ractive shell invocations.

Ultimately, though, per= haps adding the ability to run additional commands during the interactive s= hell setup process and/or consuming any CSI sequences prior to matching, wo= uld be a more future-proof solution to this.
--001a1142aa9ed4da5c055745039b-- From unknown Sat Sep 20 01:51:43 2025 X-Loop: help-debbugs@gnu.org Subject: bug#28139: 25.2; TRAMP vs bash 4.4 / readline 7.0 "bracketed paste" mode Resent-From: Michael Albinus Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Mon, 21 Aug 2017 15:47:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 28139 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Daniel Pittman Cc: 28139@debbugs.gnu.org Received: via spool by 28139-submit@debbugs.gnu.org id=B28139.15033303636292 (code B ref 28139); Mon, 21 Aug 2017 15:47:01 +0000 Received: (at 28139) by debbugs.gnu.org; 21 Aug 2017 15:46:03 +0000 Received: from localhost ([127.0.0.1]:48028 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1djotu-0001dN-Tb for submit@debbugs.gnu.org; Mon, 21 Aug 2017 11:46:03 -0400 Received: from mout.gmx.net ([212.227.17.22]:54646) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1djott-0001co-Kg for 28139@debbugs.gnu.org; Mon, 21 Aug 2017 11:46:02 -0400 Received: from detlef.gmx.de ([213.220.149.52]) by mail.gmx.com (mrgmx102 [212.227.17.168]) with ESMTPSA (Nemesis) id 0M4kfR-1dMgVY3rH3-00yuts; Mon, 21 Aug 2017 17:45:54 +0200 From: Michael Albinus References: <87mv6vjv6c.fsf@detlef> Date: Mon, 21 Aug 2017 17:45:53 +0200 In-Reply-To: (Daniel Pittman's message of "Mon, 21 Aug 2017 11:19:31 -0400") Message-ID: <8760dgapqm.fsf@detlef> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Provags-ID: V03:K0:e29WE5VRt5dsjGcLvD7bmS5n63/3ccKgYBLLmepkAxVQYr1y5Ua jc2vwYL14pwm/HuYTyVDk1J+kLvAJdo9YaXtoeeVM7o0BSHpIui138JXXdY6SGtQkc5WSNE P+q1sKMYyJwaaEQsdSzWiYvKWc4vQqlFbZ+0UCQ5aDqHSO3WIySO2CYbMrzLVUJuJ1cqEXq pBRqpLaeiQMiGffEuAs3w== X-UI-Out-Filterresults: notjunk:1;V01:K0:ERTpHTvttuI=:1t3//oAL+Ucp/mKV+/Tjgd 8DKq1B5EX7R9j19O3zrSSP2cq0iT07pFEMIL/PDDyHoC5wMpIBfd56ga+EUs+QjxosBBP21hJ 7UiDS7g2+4vev9qGzf2Uks+b62beSMIUonX5jl2dg/BIq8v/f/8RRVaIMtzfYDef+KpLyRKMJ mURoP6/amniIojswAlQCwpQlccdGfBnHP4huN3CHnQhaguzniPZGiSJ+SGDQ8enpgsoc3UGGY aUXX72u1omoaQ/9LvPW8h2Qm7apsu+hO/3D+FF6ypbq9SKwuXtH7tEm9AS1+moz8mLVnv65wh DZ7SFXklxWQYkK2j+4WQFDhibebnzBRdEX66GcDnuBaohZy+sjy9l03OXpg9jvdI2x9pY7CUI Jkquq40wHYCW9o6Gj8txnUQVyjzY9cFUB8KDuV3AvxvoGf/dmgKQaD43i0vVzn3jkKLZjI/0K hgjueA1vCq5mPieIp86TKNdLksv/gz4YZ4rjzjtyQsyU02Wn4VvN+OEISr+xiBf9fQ+xakE+R ni7Z68UNgCHkuowIe21aBHB2w7jI1U1sOaN1pMzCTrX3TvUQd3LAuHOGPsyy3Hl9pFvucXzEL pGbzjMvYlHE3HgGFYRIjexNNV2qIgY95VFUFoiCeK3InYZgne6D7WzoTM8MW8J7Ncz7Q9hwNr JM1s8R0CM/AQ9XZWmxrNiiplUo3V591zLEWUzjuj6cN/m4JvlOruFQmSckIK3GD3CDHsBni3j 0xVgmRuRtstoVhLENjpxUMiYezWWJyx4AlCW5mvPzc8EYJa0RjUt9LXHEV7sMK1ulnlWnYgCj Dg9nh3NBSqidJ5p9Mjsd+2JIjUYsCXO09bvT3n/zLN03yvSJ1M= X-Spam-Score: -0.7 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.7 (/) Daniel Pittman writes: Hi Daniel, > So, it's not possible to work around this issue without injecting > additional code into the shell setup process, using `/bin/sh - > -noediting`, or using an interactive shell and adding that to the . > profile or equivalent. > > note: --noediting has been present since bash 2.0 according to their > changelog, so it may be reasonable to add by default to the > non-interactive shell invocations. > > Ultimately, though, perhaps adding the ability to run additional > commands during the interactive shell setup process and/or consuming > any CSI sequences prior to matching, would be a more future-proof > solution to this. Well, we have `tramp-sh-extra-args' for ages. But this doesn't work usually, because I don't know a bullet-proof way to detect a bash shell prior invocation, unless "*bash" is called. Let me contemplate about. With Emacs 26 / Tramp 2.3, we have connection-local variables. Maybe we could use it for your case. Best regards, Michael. From unknown Sat Sep 20 01:51:43 2025 X-Loop: help-debbugs@gnu.org Subject: bug#28139: 25.2; TRAMP vs bash 4.4 / readline 7.0 "bracketed paste" mode Resent-From: Daniel Pittman Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Mon, 21 Aug 2017 16:03:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 28139 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: 28139@debbugs.gnu.org Received: via spool by 28139-submit@debbugs.gnu.org id=B28139.150333135714947 (code B ref 28139); Mon, 21 Aug 2017 16:03:01 +0000 Received: (at 28139) by debbugs.gnu.org; 21 Aug 2017 16:02:37 +0000 Received: from localhost ([127.0.0.1]:48050 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1djp9x-0003t0-0J for submit@debbugs.gnu.org; Mon, 21 Aug 2017 12:02:37 -0400 Received: from mail-qk0-f180.google.com ([209.85.220.180]:37741) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1djp9u-0003sn-Md for 28139@debbugs.gnu.org; Mon, 21 Aug 2017 12:02:35 -0400 Received: by mail-qk0-f180.google.com with SMTP id z18so84786325qka.4 for <28139@debbugs.gnu.org>; Mon, 21 Aug 2017 09:02:34 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20161025; h=mime-version:in-reply-to:references:from:date:message-id:subject:to; bh=Dercr+/kapkqG1DRt1sYM8/15xFDcraWyZ4v6bn1rWA=; b=N+53YQ9JHEAYjonziBBiVLNjhVvQjW2RNMFcRXlMwNUnSDhwRJ4jWdcIyU6NrS1Hpd 6ZVNZ5MJnvPLotnovA50ykDh/nG7BCWHy6sjh286TnMddVbo38Xvvh9hV4xZGK3QZauC kRylVqckM90xU50PxOw8AWYnX62by1jHXtb3EFScutydXgDaNwpW1vSLrASS+++Sav2X NSoIenG/bomkc+leIdrwE0XTWhKUJHFN25gybeil1SZ+RNVmIpv0u6SHQMgHuUSJU1gJ Sgz1IyaOtHKWCynWIMWM2sSOAE7IgQyZhFZ+dAYzr9A13J4yd9bjk0wWnv8HuIk7OYKC 27vg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to; bh=Dercr+/kapkqG1DRt1sYM8/15xFDcraWyZ4v6bn1rWA=; b=Y3gBN6vZdIjTUbfwwlbb+5+j8HvGgIePt53r5ju/TySO0oWLj97UAYw1aNGpbISfjx uSs9RUTYx7xTU7fUEUuOE/Kuv0YyitW0CHRgGScxT6Y3kVz1oXExvmAurT28aAdLQ1sl sjljp2A1V7CeAtRYQDjKro4tN72w8HeJh/RMtqY0Ub3q6DQTeteKOgEDmbi55Jz2Diir C0sD923Ds2dXEN0mAFeeH0RQTK/COwA215ZSdcl6C4wY01IDJNa9EgoE5h8X1HnmHMCe tpMIDbcRL+hB/w0BKkiiv2ryyt6UNoPgt1xT53ONB1tbWfdbaHNcyoV93rV4QY5+aJZW zNHg== X-Gm-Message-State: AHYfb5gtCNjMxx0x0PnIarIvz5DUeVxs4pz7hve9+QQ884Jghb0oNjwV uqBSGqEv/Xzvb9/etW2jhdsHCSysjPNUEmZAVg== X-Received: by 10.233.237.136 with SMTP id c130mr2365586qkg.107.1503331348752; Mon, 21 Aug 2017 09:02:28 -0700 (PDT) MIME-Version: 1.0 Received: by 10.200.51.177 with HTTP; Mon, 21 Aug 2017 09:01:48 -0700 (PDT) In-Reply-To: <8760dgapqm.fsf@detlef> References: <87mv6vjv6c.fsf@detlef> <8760dgapqm.fsf@detlef> From: Daniel Pittman Date: Mon, 21 Aug 2017 12:01:48 -0400 Message-ID: Content-Type: multipart/alternative; boundary="94eb2c09830e062e620557459bfa" X-Spam-Score: 0.5 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: 0.5 (/) --94eb2c09830e062e620557459bfa Content-Type: text/plain; charset="UTF-8" On Mon, Aug 21, 2017 at 11:45 AM, Michael Albinus wrote: > > Well, we have `tramp-sh-extra-args' for ages. But this doesn't work > usually, because I don't know a bullet-proof way to detect a bash shell > prior invocation, unless "*bash" is called. > *nod* The best I can think of, since we already have the "outer" shell, would be to invoke `/bin/sh --version -c exit`, which should work on any basic posix shell, and will emit a bash version string for bash, then wait for the prompt, and scan the output for the appropriate version data. Let me contemplate about. With Emacs 26 / Tramp 2.3, we have > connection-local variables. Maybe we could use it for your case. > FWIW, I already extend `tramp-actions-before-shell`, so something similarly low level would be fine by me, to handle the custom stuff. However, `ansi-color-filter-region` and friends from the shipped ANSI SGR->face handling library can strip all control sequences out of a region, or string, and might be useful here; that would allow TRAMP to become insensitive to ANSI control codes injected anywhere into the output, which will also fix the next time a shell decides to add some additional terminal integration like bracketed paste mode. If you want to apply this to streaming output, because that will rewrite the buffer fragment with a smaller number of characters in the presence of control codes, throw a marker at your endpoint, and retrieve the position after the stripping, to avoid getting confused about the new offset. --94eb2c09830e062e620557459bfa Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
On M= on, Aug 21, 2017 at 11:45 AM, Michael Albinus <michael.albinus@gmx.de= > wrote:
Wel= l, we have `tramp-sh-extra-args' for ages. But this doesn't work usually, because I don't know a bullet-proof way to detect a bash shell=
prior invocation, unless "*bash" is called.
=
*nod* =C2=A0The best I can think of, since we already have t= he "outer" shell, would be to invoke `/bin/sh --version -c exit`,= which should work on any basic posix shell, and will emit a bash version s= tring for bash, then wait for the prompt, and scan the output for the appro= priate version data.

Let me contemplate about. With Emacs 26 / Tramp 2.3, we have
connection-local variables. Maybe we could use it for your case.

FWIW, I already extend `tramp-actions-before-shel= l`, so something similarly low level would be fine by me, to handle the cus= tom stuff.

However, `ansi-color-filter-region` and= friends from the shipped ANSI SGR->face handling library can strip all = control sequences out of a region, or string, and might be useful here; tha= t would allow TRAMP to become insensitive to ANSI control codes injected an= ywhere into the output, which will also fix the next time a shell decides t= o add some additional terminal integration like bracketed paste mode.
=

If you want to apply this to streaming output, because = that will rewrite the buffer fragment with a smaller number of characters i= n the presence of control codes, throw a marker at your endpoint, and retri= eve the position after the stripping, to avoid getting confused about the n= ew offset.
--94eb2c09830e062e620557459bfa-- From unknown Sat Sep 20 01:51:43 2025 X-Loop: help-debbugs@gnu.org Subject: bug#28139: 25.2; TRAMP vs bash 4.4 / readline 7.0 "bracketed paste" mode Resent-From: Michael Albinus Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Mon, 21 Aug 2017 16:18:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 28139 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Daniel Pittman Cc: 28139@debbugs.gnu.org Received: via spool by 28139-submit@debbugs.gnu.org id=B28139.150333227616337 (code B ref 28139); Mon, 21 Aug 2017 16:18:01 +0000 Received: (at 28139) by debbugs.gnu.org; 21 Aug 2017 16:17:56 +0000 Received: from localhost ([127.0.0.1]:48072 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1djpOl-0004FQ-KQ for submit@debbugs.gnu.org; Mon, 21 Aug 2017 12:17:55 -0400 Received: from mout.gmx.net ([212.227.17.21]:62057) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1djpOj-0004F9-IG for 28139@debbugs.gnu.org; Mon, 21 Aug 2017 12:17:53 -0400 Received: from detlef.gmx.de ([213.220.149.52]) by mail.gmx.com (mrgmx101 [212.227.17.168]) with ESMTPSA (Nemesis) id 0LdLw5-1dJKCO2waH-00iWAH; Mon, 21 Aug 2017 18:17:45 +0200 From: Michael Albinus References: <87mv6vjv6c.fsf@detlef> <8760dgapqm.fsf@detlef> Date: Mon, 21 Aug 2017 18:17:40 +0200 In-Reply-To: (Daniel Pittman's message of "Mon, 21 Aug 2017 12:01:48 -0400") Message-ID: <871so4ao9n.fsf@detlef> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Provags-ID: V03:K0:YY9o+xGQHWlM6O3JOgm/WEHo00N/u/8HgTDB3itmen+d4UCMO4a mUGD99a43mMN5GXWh8fcjqXwzTq6wYb3V+eWkNTCEYo2WPGso05ByoWwEWoQH5KYlthrO/Q YoP7Q4sYf0cBCOfumx6GI66/N04+qeritnAVLQScXb1lDSmMlQdyePCwMzP+JrmqPP/L/8e nj8fG97Ht/OjmyTP+8gZg== X-UI-Out-Filterresults: notjunk:1;V01:K0:AVTMceZ1tKc=:/meIT6GFAhsHYfOuxAhwRl wNOLk+NtfpkFSnXv1qmYEuIJ20xf1wg0ZJxfQZeYoP4Y7kPTYAp4DMJnMOD4jvCixhhyN2qew Sl78B5l+rqlZ4z6dDiHOU74Pwn1A6+em5zI8XLwSgV/nlF3gGkUDco2i3VwzASjGfzC7Jtb7Z ZEKelZ6kS0yFcJ8WW2gMbqR7wYIrpCCybPJMsYg2HHav2yW+ZFBf7qbzDlmvCu2hNJitY8/s0 1O2VJTgBxoS7cS9SJ0WIaMNfImLAINX4UhXF9cAUSdM5eB8p0pquZ2MRJHgmOto0EjVBMHCh9 wIWOzPChhUzI5gHNtNjDyi1edXEsj+F0cSOvjRFu0Q9BzjQWyTA/3kczj5YGO2jD6zhGWVZId BRgJ2chpX/vbqUK5gzyO4sUFZo8M1gj0ho6JDA1U51HMbTb2EB75IE/YuqGUQmXzwlf+xhlOV sIa0KJndI1Zx0h/7oc1pCCEBZifRyJhxA2DULemljSvZ4j3Pope9NndhVLHdWKr5LevIzr4Dy aq1yKWKuYUr8UU7oWAaDUvcht9ZSmcbipBT0+1zO5hf9iEufceLgAPbNzJcJOnw43GjgNDHga rzaCo0x02p/UK8xkN42IZvYidg49GIherEHxcVtcQoJ41trNQlFsGu6+yfpG3sqqgBOwwx1Me Kaeo6xu9q1Hpl7ohcDm0eiEhIZ3f0XswwGKNrHT5Re0JSkNVTvNdxQww2oUDerYNfF5kawzC7 QW2whoSYdMHd+q49Oc1B6edMP/lRSGsN7jWScMAYXbiSSmKWjJe/wXaZ8dQ5hME4bTU5hw7j0 B/tLGRQEF8xqkC2ztGWG+NxrxWct1ObCYsYnSiBEtGMBvNb2aw= X-Spam-Score: -0.7 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.7 (/) Daniel Pittman writes: > However, `ansi-color-filter-region` and friends from the shipped ANSI > SGR->face handling library can strip all control sequences out of a > region, or string, and might be useful here; that would allow TRAMP to > become insensitive to ANSI control codes injected anywhere into the > output, which will also fix the next time a shell decides to add some > additional terminal integration like bracketed paste mode. Tramp does already something like this on its own, using `tramp-display-escape-sequence-regexp' and `tramp-device-escape-sequence-regexp'. Let me check, whether I could rewrite this to the more general `ansi-color-filter-region`. (I wouldn't reject a patch from your side :-) Best regards, Michael. From unknown Sat Sep 20 01:51:43 2025 X-Loop: help-debbugs@gnu.org Subject: bug#28139: 25.2; TRAMP vs bash 4.4 / readline 7.0 "bracketed paste" mode Resent-From: Daniel Pittman Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 24 Aug 2017 19:54:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 28139 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Michael Albinus Cc: 28139@debbugs.gnu.org Received: via spool by 28139-submit@debbugs.gnu.org id=B28139.150360442910275 (code B ref 28139); Thu, 24 Aug 2017 19:54:01 +0000 Received: (at 28139) by debbugs.gnu.org; 24 Aug 2017 19:53:49 +0000 Received: from localhost ([127.0.0.1]:53210 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dkyCK-0002fe-53 for submit@debbugs.gnu.org; Thu, 24 Aug 2017 15:53:48 -0400 Received: from mail-qk0-f182.google.com ([209.85.220.182]:33008) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dkyCI-0002fR-8j for 28139@debbugs.gnu.org; Thu, 24 Aug 2017 15:53:46 -0400 Received: by mail-qk0-f182.google.com with SMTP id 130so2682878qkg.0 for <28139@debbugs.gnu.org>; Thu, 24 Aug 2017 12:53:46 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20161025; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=aSy6TNPqq8qyNl63K382O/fX2MbFCI1C0vY4wTR98mE=; b=BiT3n2i83wamoS6XcY0E8fZVB+1OwuaD1GTZpXYPkfTk6Wi+gMaZYWgfKhgzFOeFAf iCfibCc5/t2NETxOIhMQQQ+Nbz8azptMo/ABs5NXmg8RXRiOSrh9eNSktUCB1ixWoEW+ ML1F6gAXcxq799OmGxuTvwOSIMfcUzYNeBZsdWdO+cDNGJ3ceCl4jE7+h/TBkoLTDmxW lSpx+n/sfdwGjk9sI2DaObB7ceyCOM3m5NFL2vaUUDiRqLK5L35zOvK241ZtJMNtuUhJ PqWEX8TxQcyDDac7JH6o3X05ihPfIy9iJlbMHivJ8BiOjtHKKUaaT8y7NqlZUc7UNEWh NAUw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=aSy6TNPqq8qyNl63K382O/fX2MbFCI1C0vY4wTR98mE=; b=Hepc2EW0i29XKl4zdwc7WOSuUMhwZlcSJ46RMxLSNWTt7YZh1nswLGqbUtHYfJoWzi YUUvfq+nf6N3Be3loXaPD6ZdaV+biXUH68fCoh0HBDqyLnMvesk7ckSLQvTxQbHOV6Hg v+R9OohOq5QLAVqadotiWB9SyuAjc70q6aWzi4MzlbNbAuRrYuFqjWjxVks1KewABnid 15Bt1NjpZqBMQ1KAWy80D02XkJAFFA/VWeBJpCVkcoPK57RbuTf2j9dpmjm7qXQDCp5h TLSDO+25a1y1T4XlPiM6++BwRrHrBsY6ptaQA4frY9bFF+ngWVuWue9KYyjmYBIWQ4Cb MyFA== X-Gm-Message-State: AHYfb5g5ECUbArTApEA+AuqWxc+Z4WEyGM85sdJgbfAJ39J/bkate53x hyvjRbQACeYWwuuDqOOn3I6ZYiUecdmS X-Google-Smtp-Source: ADKCNb7cZHJPVCCQS1oLeqlLr9VhVs9bKVk8chkDAxhKfMLnGBhTcr7LiOsKflaRKldicW0nOM5LrzE+JzVQL3YuY+4= X-Received: by 10.55.52.213 with SMTP id b204mr9668711qka.120.1503604420428; Thu, 24 Aug 2017 12:53:40 -0700 (PDT) MIME-Version: 1.0 Received: by 10.237.47.103 with HTTP; Thu, 24 Aug 2017 12:52:59 -0700 (PDT) In-Reply-To: <871so4ao9n.fsf@detlef> References: <87mv6vjv6c.fsf@detlef> <8760dgapqm.fsf@detlef> <871so4ao9n.fsf@detlef> From: Daniel Pittman Date: Thu, 24 Aug 2017 15:52:59 -0400 Message-ID: Content-Type: multipart/alternative; boundary="001a1147159c5d47720557852f49" X-Spam-Score: 0.5 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: 0.5 (/) --001a1147159c5d47720557852f49 Content-Type: text/plain; charset="UTF-8" On Mon, Aug 21, 2017 at 12:17 PM, Michael Albinus wrote: > Tramp does already something like this on its own, using > `tramp-display-escape-sequence-regexp' and > `tramp-device-escape-sequence-regexp'. Let me check, whether I could > rewrite this to the more general `ansi-color-filter-region`. > So it does, in versions newer than what is shipped with Emacs. Is the current release of TRAMP available through any ELPA style package repository, or do I need obtain and compile it myself to use it ahead of the built-in? I'll certainly do that, but I'm lazy. > (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. --001a1147159c5d47720557852f49 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
On M= on, Aug 21, 2017 at 12:17 PM, Michael Albinus <michael.albinus@gmx.de= > wrote:
Tramp does already= something like this on its own, using
`tramp-display-escape-sequence-regexp' and
`tramp-device-escape-sequence-regexp'. Let me check, whether I cou= ld
rewrite this to the more general `ansi-color-filter-region`.

So it does, in versions newer than what is shipped wi= th Emacs.=C2=A0 Is the current release of TRAMP available through any ELPA = style package repository, or do I need obtain and compile it myself to use = it ahead of the built-in?=C2=A0 I'll certainly do that, but I'm laz= y.
=C2=A0
(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 afr= aid.
--001a1147159c5d47720557852f49-- From unknown Sat Sep 20 01:51:43 2025 X-Loop: help-debbugs@gnu.org Subject: bug#28139: 25.2; TRAMP vs bash 4.4 / readline 7.0 "bracketed paste" mode Resent-From: Michael Albinus Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 25 Aug 2017 07:32:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 28139 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Daniel Pittman Cc: 28139@debbugs.gnu.org Received: via spool by 28139-submit@debbugs.gnu.org id=B28139.150364630230007 (code B ref 28139); Fri, 25 Aug 2017 07:32:02 +0000 Received: (at 28139) by debbugs.gnu.org; 25 Aug 2017 07:31:42 +0000 Received: from localhost ([127.0.0.1]:53499 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dl95i-0007nv-DL for submit@debbugs.gnu.org; Fri, 25 Aug 2017 03:31:42 -0400 Received: from mout.gmx.net ([212.227.15.15]:59350) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dl95g-0007ni-O4 for 28139@debbugs.gnu.org; Fri, 25 Aug 2017 03:31:41 -0400 Received: from detlef.gmx.de ([213.220.151.125]) by mail.gmx.com (mrgmx003 [212.227.17.190]) with ESMTPSA (Nemesis) id 0MX1dc-1e5zrb1iaK-00W1qE; Fri, 25 Aug 2017 09:31:31 +0200 From: Michael Albinus References: <87mv6vjv6c.fsf@detlef> <8760dgapqm.fsf@detlef> <871so4ao9n.fsf@detlef> Date: Fri, 25 Aug 2017 09:31:30 +0200 In-Reply-To: (Daniel Pittman's message of "Thu, 24 Aug 2017 15:52:59 -0400") Message-ID: <87pobkdrxp.fsf@detlef> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Provags-ID: V03:K0:8vyxrq6l3iy4wXAVYveyY0wTmh/L9dTH6xt0V5w+yAzgZ2rysyv aB14qCtVF1Re1axJywpePG3mrDUbMOwb/zGHQKaDkNGtXIz4iO7Djx+fvqkiOS2pPyNIpKh c52GXDscWwHTPscfiAJVZAwcxkpe4MiSyXzl0/xALVfdSdFM/5Pr8nNOu/N6FVHsbyo16x7 yumXx2Wti+n8zThVqMw0A== X-UI-Out-Filterresults: notjunk:1;V01:K0:dTr/4AjCbno=:XTrFYqWvZkCDSVvsjfU007 U2ZilN4fN8YUOVdaaGvYOrAWxDVyC9Tk2asHG5HEcjSNiZ8eiEUSXhLJ1r1tBcgGgh/si9tug 8pQ7hts+3vmw6asTkaslIjeMvzeSbXpAD7aSrxZd62QxaypqVCQAqDKQzD6MvshApH0YYwdJp c/gKgMYueJ4AlOLVUVwnQXZadt7+yN52zloNBiauyCkmF2PaXvwaJADj+rQTd8rX921q9eUsY Y+FSINjeJ4fAiOc59URRlPqEjdWWd2LvlsNjWp7R8L2E8pgi+mkZFtR4svs6U5xEyUljz5RfS Obwv171L4/jEdCNQqdVan5o2DkdYhsw+G5Zf/NetkkhOpUNrKJfVC+3e+SHQwXOikeiCUYbPg eKkloy3ij4z3Hq+r5hwJ8fGfoIOuE/Lz17GZ4hUKZJIISimtIwF96/Lhfp1ojRK7EXPJ5WQrA W3Snrv5K/+41iqeUD0KuirGm32KqvL87b/uRPuT4SXUOdxSk3isehZy0rh2fHMCRoFsEOQ8l0 wMfQPjcQtATpaHuumLtPFTH4v3GCucbdPfgW3Td2XGFHR2yWkOrR4ztDzXTVEu16yIj2CVopg Om8UJwuqHTsE+oRHYqpn6X2WMpCSKMtvdregie8RbZzRIfQgpyL3rVyKhQBEKkFgLrnPxGEMY zn3l7UO+qSZTEVnMrl6nghKbwN3Pme5SVy8LqI73ADQXPUhHw7RA1cKBr2AMdS1/JRMVx7EbG +0UMClYqJP2L4YzqeE7d92IYuRWEPjUaJykgn+skZW+37uNj17V+4GojUkq6io9G/cmz6Evg/ MxZizSUGdeF/0sXsTDO74tATNkrUFh2LOLPfiGuWk4ZTgwa6bM7HFplvq436n59utoyv5HZGB WPTjvuSVH3+R9SSVI0HFQsvqOH3WtyJs2KPKKCccYLOrqtsoruQwe1PuOFLmJg4v0+jiSPZnl s7aX9Dx/P/i0AGDIUqcZkviaaCugi08no3NZ0Koe6sFlxGEobCVVYB2eraq1v13NyI4y71Hrx cw== X-Spam-Score: -0.2 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.2 (/) Daniel Pittman writes: Hi Daniel, > Is the current release of TRAMP available through any ELPA style > package repository, or do I need obtain and compile it myself to use > it ahead of the built-in? I'll certainly do that, but I'm lazy. A while ago, I've started to transform Tramp into an ELPA package. There were some non-trivial problems, this task is stalled for the moment. So you must use Tramp's git repository: git clone git://git.savannah.gnu.org/tramp.git > (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. If it helps you, I could also add your login to the Tramp repo. You would need a Savannah account, maybe you have already. Best regards, Michael. From unknown Sat Sep 20 01:51:43 2025 X-Loop: help-debbugs@gnu.org Subject: bug#28139: 25.2; TRAMP vs bash 4.4 / readline 7.0 "bracketed paste" mode Resent-From: Daniel Pittman Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 31 Oct 2017 20:42:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 28139 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Michael Albinus Cc: 28139@debbugs.gnu.org Received: via spool by 28139-submit@debbugs.gnu.org id=B28139.150948246124591 (code B ref 28139); Tue, 31 Oct 2017 20:42:02 +0000 Received: (at 28139) by debbugs.gnu.org; 31 Oct 2017 20:41:01 +0000 Received: from localhost ([127.0.0.1]:44643 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1e9dLJ-0006OM-G5 for submit@debbugs.gnu.org; Tue, 31 Oct 2017 16:41:01 -0400 Received: from mail-qt0-f170.google.com ([209.85.216.170]:47906) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1e9dLH-0006O5-JW for 28139@debbugs.gnu.org; Tue, 31 Oct 2017 16:40:59 -0400 Received: by mail-qt0-f170.google.com with SMTP id z50so372410qtj.4 for <28139@debbugs.gnu.org>; Tue, 31 Oct 2017 13:40:59 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20161025; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=nT5Nanadmu+fhGeMCU7xWbeEftFmZsygY1w+m8eGIfw=; b=FzjONoEJ9GXgYD9rerGKzIrNFjVicHh4QBWljtba539uh89qv9Y3T4+8/Z+EUhbwU7 qK6EB0E6KcAL9lE2T1IJcaKCuLTtBcAsEyeYlNtbsSApUiW17RSXAqyicoXkWHvmXr0O CJ1x+8Pc5QfOnRqEHHzcodetczMP8D7JncmZaUEmSzC3Udm8CDl6O6G9CpO4Ge7SgjHp tOcOSRrP3hv1RiKDp9InS27fc4zlbUBnVzyMuCl91QeHBLg4olCenITUm0CM1ega/lPr XWbFfS3GSBMVg1EbgwIpdwRQ5CInhb3xOKmwJPBPZS3qjQZ/n9VnsQvfTsm7TUiZ8Yjs FJtw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=nT5Nanadmu+fhGeMCU7xWbeEftFmZsygY1w+m8eGIfw=; b=Gygw8kmmcwZfcosfPNLt4UpA16UNMlCdeXzICdof75vEwdIKUUzL3t6RqmWQEoQtQ7 eyEcBFiWxrH2XtbyE5Z2MZhP0uDmTcRmXgpxGMcu3Wy481dADp9yZ73fmzJPf5h3Dx9L sxkgbfKJMtIAIeBPyelrS+ubMYH63GUEm3IPXaFz/etsh1pjpailp3R0uLx+4z07xej+ IG7G2nLnW1uzj22ASd1PmS1gprsaOVHg2dSLhdFoIwwX2vlcy+TVNmRxdP0KZIwINao0 bhSqY+Bz2CTbaIM1WDkhdQQ1WXNfgacf+qqbnC21n5Kn5YYBp+lbCwrWa/U19DEFpvXr 4AEw== X-Gm-Message-State: AMCzsaWd1smS3gvoqTrLCQkI48WS4eiMD5Z93dshY4to+zefltnUng53 0F0e2locFups2wwdUMYUb5ShPGudROUFfQ7SayrzqA== X-Google-Smtp-Source: ABhQp+ShLAYqWg+JxNA4/vVbkajXp82IrtP9R8XenJOFUe7inzWQiQC+tMAhf89U9ApUIS+xy69L4nRbtsiC222Z2OE= X-Received: by 10.200.42.104 with SMTP id l37mr4709519qtl.73.1509482453635; Tue, 31 Oct 2017 13:40:53 -0700 (PDT) MIME-Version: 1.0 Received: by 10.237.51.98 with HTTP; Tue, 31 Oct 2017 13:40:13 -0700 (PDT) In-Reply-To: <87pobkdrxp.fsf@detlef> References: <87mv6vjv6c.fsf@detlef> <8760dgapqm.fsf@detlef> <871so4ao9n.fsf@detlef> <87pobkdrxp.fsf@detlef> From: Daniel Pittman Date: Tue, 31 Oct 2017 16:40:13 -0400 Message-ID: Content-Type: multipart/mixed; boundary="001a113ff4807246e5055cddc5c5" X-Spam-Score: 0.5 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: 0.5 (/) --001a113ff4807246e5055cddc5c5 Content-Type: multipart/alternative; boundary="001a113ff4807246e1055cddc5c3" --001a113ff4807246e1055cddc5c3 Content-Type: text/plain; charset="UTF-8" On Fri, Aug 25, 2017 at 3:31 AM, Michael Albinus wrote: > Daniel Pittman 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.) --001a113ff4807246e1055cddc5c3 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
On F= ri, Aug 25, 2017 at 3:31 AM, Michael Albinus <michael.albinus@gmx.de= > wrote:
D= aniel Pittman <slippycheeze@g= oogle.com> writes:
>=C2=A0 =C2=A0 =C2= =A0(I wouldn't reject a patch from your side :-)
>
> If I confirm it still exists in the current version I'll try and c= ut 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 f= ind attached a patch that resolves the bracketed paste issues nicely for me= .=C2=A0 It does so by setting two environment variables when initially esta= blishing the remote shell: `EMACS=3Dt`, which bash interprets to disable li= ne editing, and `TERM=3Ddumb`, which is a better match than the default int= eractive terminal type I get.

Google own the copyr= ight on this change, such as it is, but they have papers on file with the F= SF.=C2=A0 (As do I, for TRAMP, though I have not contributed since 2000 or = so, haha.)


--001a113ff4807246e1055cddc5c3-- --001a113ff4807246e5055cddc5c5 Content-Type: application/octet-stream; name="0001-Inform-shells-to-avoid-fancy-features-more-vigorousl.patch" Content-Disposition: attachment; filename="0001-Inform-shells-to-avoid-fancy-features-more-vigorousl.patch" Content-Transfer-Encoding: base64 X-Attachment-Id: f_j9g2uqjj0 RnJvbSA1Nzg1OWM4ZGFhZDU0Yjg5NWEyZjUwY2U5N2RiOWJlOWU0MjY3ZmYzIE1vbiBTZXAgMTcg MDA6MDA6MDAgMjAwMQpGcm9tOiBEYW5pZWwgUGl0dG1hbiAgPHNsaXBweWNoZWV6ZUBnb29nbGUu Y29tPgpEYXRlOiBUdWUsIDMxIE9jdCAyMDE3IDE2OjAyOjI2IC0wNDAwClN1YmplY3Q6IFtQQVRD SF0gSW5mb3JtIHNoZWxscyB0byBhdm9pZCBmYW5jeSBmZWF0dXJlcyBtb3JlIHZpZ29yb3VzbHkK ClNldHRpbmcgdGhlIGVudmlyb25tZW50IHZhcmlhYmxlIGBFTUFDUz10YCB0cmlnZ2VycyBiYXNo KDEpIHRvIGRpc2FibGUKdmFyaW91cyBsaW5lIGVkaXRpbmcgZmVhdHVyZXMgLSBjcml0aWNhbGx5 LCBpbmNsdWRpbmcgYnJhY2tldGVkIHBhc3RlCm1vZGUsIHdoaWNoIFRSQU1QIGRvZXNuJ3Qgd29y ayB3aXRoLgoKSW4gYWRkaXRpb24sIHNldHRpbmcgYFRFUk09ZHVtYmAgcHJvdmlkZXMgYWRkaXRp b25hbCBmZWVkYmFjayB0byB0b29scwp0aGF0IHRoZXkgc2hvdWxkIGF2b2lkIGZhbmN5IG91dHB1 dHMgYW5kIGZlYXR1cmVzLCB3aGlsZSBhZ2FpbiwgYmV0dGVyCm1hdGNoaW5nIGhvdyBUUkFNUCBl eHBlY3RzIHRvIGludGVyYWN0IHdpdGggdGhlIHNoZWxsLgotLS0KIGxpc3AvdHJhbXAtc2guZWwg fCAyICstCiAxIGZpbGUgY2hhbmdlZCwgMSBpbnNlcnRpb24oKyksIDEgZGVsZXRpb24oLSkKCmRp ZmYgLS1naXQgYS9saXNwL3RyYW1wLXNoLmVsIGIvbGlzcC90cmFtcC1zaC5lbAppbmRleCA1MmE2 YjhmYS4uM2MyYWUzNDggMTAwNjQ0Ci0tLSBhL2xpc3AvdHJhbXAtc2guZWwKKysrIGIvbGlzcC90 cmFtcC1zaC5lbApAQCAtMzk1MCw3ICszOTUwLDcgQEAgZmlsZSBleGlzdHMgYW5kIG5vbnplcm8g ZXhpdCBzdGF0dXMgb3RoZXJ3aXNlLiIKICAgICAgIDs7ICRISVNURklMRSBpcyBzZXQgYWNjb3Jk aW5nIHRvIGB0cmFtcC1oaXN0ZmlsZS1vdmVycmlkZScuCiAgICAgICAodHJhbXAtc2VuZC1jb21t YW5kCiAgICAgICAgdmVjIChmb3JtYXQKLQkgICAgImV4ZWMgZW52IEVOVj0lcyAlcyBQUk9NUFRf Q09NTUFORD0nJyBQUzE9JXMgUFMyPScnIFBTMz0nJyAlcyAlcyIKKwkgICAgImV4ZWMgZW52IEVN QUNTPXQgVEVSTT1kdW1iIEVOVj0lcyAlcyBQUk9NUFRfQ09NTUFORD0nJyBQUzE9JXMgUFMyPScn IFBTMz0nJyAlcyAlcyIKICAgICAgICAgICAgIChvciAoZ2V0ZW52LWludGVybmFsICJFTlYiIHRy YW1wLXJlbW90ZS1wcm9jZXNzLWVudmlyb25tZW50KSAiIikKIAkgICAgKGlmIChzdHJpbmdwIHRy YW1wLWhpc3RmaWxlLW92ZXJyaWRlKQogCQkoZm9ybWF0ICJISVNURklMRT0lcyIKLS0gCjIuMTUu MAoK --001a113ff4807246e5055cddc5c5-- From unknown Sat Sep 20 01:51:43 2025 X-Loop: help-debbugs@gnu.org Subject: bug#28139: 25.2; TRAMP vs bash 4.4 / readline 7.0 "bracketed paste" mode Resent-From: Michael Albinus Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sun, 05 Nov 2017 12:46:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 28139 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Daniel Pittman Cc: 28139@debbugs.gnu.org Received: via spool by 28139-submit@debbugs.gnu.org id=B28139.150988591715766 (code B ref 28139); Sun, 05 Nov 2017 12:46:02 +0000 Received: (at 28139) by debbugs.gnu.org; 5 Nov 2017 12:45:17 +0000 Received: from localhost ([127.0.0.1]:51319 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1eBKIf-00045z-JI for submit@debbugs.gnu.org; Sun, 05 Nov 2017 07:45:17 -0500 Received: from mout.gmx.net ([212.227.15.19]:55046) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1eBKId-0003xM-FU for 28139@debbugs.gnu.org; Sun, 05 Nov 2017 07:45:16 -0500 Received: from detlef.gmx.de ([212.86.57.82]) by mail.gmx.com (mrgmx002 [212.227.17.190]) with ESMTPSA (Nemesis) id 0Lbd9v-1dQTto0krT-00l9tV; Sun, 05 Nov 2017 13:45:07 +0100 From: Michael Albinus References: <87mv6vjv6c.fsf@detlef> <8760dgapqm.fsf@detlef> <871so4ao9n.fsf@detlef> <87pobkdrxp.fsf@detlef> Date: Sun, 05 Nov 2017 13:45:06 +0100 In-Reply-To: (Daniel Pittman's message of "Tue, 31 Oct 2017 16:40:13 -0400") Message-ID: <87fu9srj1p.fsf@gmx.de> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.0.90 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Provags-ID: V03:K0:CpCwE9eP8yrP8CMmGXUyUbU+bfLCvzewCg24HQyyzmsja37NA8R G9yza1i2CXZk7Jzjp1y+XnGCG6GUprRLL6zNsBIv2fY5KfJ6KkCQgiKHW/HdJBF5R2X9XdU 2kTW8YDr+1dqgY5pzPB2bwnPuHY4LpdRDhTIDlfydb57HRQ0QxtdxZPG6RMxvOPAtKfdZMG Tpw3XYNatxHaaJtKdUEQw== X-UI-Out-Filterresults: notjunk:1;V01:K0:x9TA1nV0lqw=:1EPZbiq3Hav0G3bqzNEmH9 GRlFE3fQ9iqDg1txa3Tl/llx4Ek181GukwZQYIRIYDXkIJdokKK9suROB9WoRuaZY0DcwZtDz W3Mb1O+sBDdA1WquesDyptrIuXIFoAAZ8XPILn8MM97h8TDKqSEQmmncMSUuIPwrBUecnM4DA ycHrI5EP5hF3WRr2Ui/fqesgpY4hF/MZf0RaUQv68uwXBzwFisXfDYHCp3U4fCsLzd+5UcyIg ymrVTzMvV5bDRR2ja5u+d8T4txRtote5Te/aQQ/szSalV36bdpgmrPP2KS0JEFvGl0xsofHUl nwPREH7SfwzlBGHzMJeG9ceJrooDzqgQ81Hf4IMaqTnyT0Ki3l4DpgHod2BMcur75gsoFiE4B A3k0PYmoFYo+rTpHCmN7EwSvUH5HRONBeX+oF9NFFbYnVYKxgQBOWFjLbsoGPZIn2wIXIhIqe 2PlCn8iiGDtysnhWp+Gk12yxIjG36cWUdnRk5jMQwxNYHbBjifs7+EsOgJKkhq+7VBBAy3ULW UADzIbpPqKlEV3aLDXeDnzbV/TvNuYXMx/3JABoUieg/efMzn5abzckxK9rOvBYfsZHV4MpfH +RIvV1eCoVBS6eAX8y30E9vRN3X9N54s3AFZoUUUBiVc4ebwpA6Gk2JdMhAnygNIce9u11ApA OhBiDzJ3Ggvvz/jnndv+3mLw5Wh9p8LMtU2Wg7CAMbzWkjW2fksjM7NaP3MzmFYa464li++ED Wlv3Am3e8wxPxY32coZSTr1u1sTegMHieQUPaCPpEKY1rudKVbg2LOZoveM+aydXXwa63s78B 84cLqZnt6qJgdWT6tFpmC5zYCySN8GYIi306yun+I2hU19e/UE= X-Spam-Score: -3.5 (---) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.5 (---) Daniel Pittman writes: Hi Daniel, > Please find attached a patch that resolves the bracketed paste issues > nicely for me. Thanks! > 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. Well, TERM=dumb setting is not needed. It is already set, inherited from the outer environment. I've just cross-checked this. The EMACS=t setting is much more problematic. It has been thrown away from Emacs years ago, and it was expected that bash 4.4 honors the replacement INSIDE_EMACS. Furthermore, it was reported that EMACS=t settings have damaged other packages. See Emacs bug#20484 for a related discussion. It doesn't seem to be applicable for Tramp. So I'm kind of undecided how to continue ... Best regards, Michael. From unknown Sat Sep 20 01:51:43 2025 X-Loop: help-debbugs@gnu.org Subject: bug#28139: 25.2; TRAMP vs bash 4.4 / readline 7.0 "bracketed paste" mode Resent-From: Daniel Pittman Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Mon, 13 Nov 2017 19:43:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 28139 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Michael Albinus Cc: 28139@debbugs.gnu.org Received: via spool by 28139-submit@debbugs.gnu.org id=B28139.151060213923233 (code B ref 28139); Mon, 13 Nov 2017 19:43:02 +0000 Received: (at 28139) by debbugs.gnu.org; 13 Nov 2017 19:42:19 +0000 Received: from localhost ([127.0.0.1]:38900 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1eEKcc-00062f-Ps for submit@debbugs.gnu.org; Mon, 13 Nov 2017 14:42:19 -0500 Received: from mail-qt0-f182.google.com ([209.85.216.182]:46980) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1eEKcb-00062O-Gn for 28139@debbugs.gnu.org; Mon, 13 Nov 2017 14:42:17 -0500 Received: by mail-qt0-f182.google.com with SMTP id 1so21030072qtn.3 for <28139@debbugs.gnu.org>; Mon, 13 Nov 2017 11:42:17 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20161025; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=AuCLmQdAyxMA6DqP+tm1n1mYsVAeSyXR8B0VAZ4z9Ys=; b=RGhUucRVOuSbJ8BKFTZQ7rGTAgxmMR1l6XQjlCdVdoHH6+FddpEcZX27GzosBKNaNR gHeVC59jEysU+OHwQLYhJn5+nb6YEH7KPDcY5SSB8uSlgdrgCGT/JkORqd6k+FmLMj9y yuD9wqoCaGlyExgb2jpUGWdhCyIEF7KAT01I6N7KsOsEmuuCH1vVMdJxfVRLNxof6F+B YSXaW/T04XTxdic0QKAtZ8xD/JS5Jd2QU4t7QoKn+CxMGAuDo8SyRLWBHQ8uuYYMafVp QfRueWcsMgsVIsPNvAtYo21NYYDZA3CveUBu4FYQZSiatJ0oYrM8F/BPjOlo0Tj7sI5m Io1A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=AuCLmQdAyxMA6DqP+tm1n1mYsVAeSyXR8B0VAZ4z9Ys=; b=XhBLmbQWtz2ewZrYc63MqRB81hit1cYp43iRKGfPKHU8dDO4rlhPHgkIVVITB1iYKB cMWyk1mmpKjk5sWIzjFi4cboK264hUvmQ6140hjKvAbsCOXvSrKTtTmjp/XsekZ3hJ/U 0nPOttPuORbqyzsu9Qp/huq0sh5sZNiiWGdHJ1cwDUGhYDdLsBgbvfkpWrbu1NMQqHfp wn5+4/lWHAESvbyjcZpDoUOLPZgMTKcngV3+8/Yo2kuUr4Dpdbaa564C3DZF2LcVvcRl inLrogGt4q4I6vbtf1JTKVmHb5XXLFrtv1wjp0QZT+pOISvOfh6eCxCNmiK5UJvvCw3A wlQg== X-Gm-Message-State: AJaThX5hfZvAyrgd9gF/DeOepKow5wiH0vtV9JwSRMSfhAa/o/oyafxG yFWnChsoJietO6VxZGMWyhOLk6/o8bW4lLmSqhOwdA== X-Google-Smtp-Source: AGs4zMbUUCqbrCxiYaQGr1Y4+dv1NxdA4CbnvQT01EMe8RKZSABRaY7rkl6kk9GxHIeUyaMqlCZBU+1wRfYiwhmKMw0= X-Received: by 10.200.34.245 with SMTP id g50mr15777484qta.62.1510602131620; Mon, 13 Nov 2017 11:42:11 -0800 (PST) MIME-Version: 1.0 Received: by 10.237.51.98 with HTTP; Mon, 13 Nov 2017 11:41:30 -0800 (PST) In-Reply-To: <87fu9srj1p.fsf@gmx.de> References: <87mv6vjv6c.fsf@detlef> <8760dgapqm.fsf@detlef> <871so4ao9n.fsf@detlef> <87pobkdrxp.fsf@detlef> <87fu9srj1p.fsf@gmx.de> From: Daniel Pittman Date: Mon, 13 Nov 2017 14:41:30 -0500 Message-ID: Content-Type: multipart/mixed; boundary="001a113d351874a71a055de27778" X-Spam-Score: -0.7 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.7 (/) --001a113d351874a71a055de27778 Content-Type: multipart/alternative; boundary="001a113d351874a716055de27776" --001a113d351874a716055de27776 Content-Type: text/plain; charset="UTF-8" Michael, you are completely right that my previous change was not necessary. I blame my prehistoric knowledge of Emacs here, as I wasn't aware of the change to use INSIDE_EMACS. On testing, it seems that EMACS=t just happened to work in bash (for legacy reasons, probably other dinosaurs like me), and INSIDE_EMACS also disables editing, and fixes my problem. You are also quite correct that INSIDE_EMACS was being set by tramp. The problem was that it was set at the wrong time: we need it set *before* we start the shell, to disable readline bracketed paste (and other advanced features) before we start, for example, interrogating the remote system for the running version with `uname` during `tramp-open-shell`. I have attached a patch that moves two variables, TERM and INSIDE_EMACS, out of `tramp-remote-process-environment`, and instead, handles setting them prior to shell execution. This has two advantages: First, INSIDE_EMACS is visible to the shell we are about to probe for usability, which fixes my own problem with bracketed paste support in libreadline / bash breaking, and which makes it uniformly available on the remote host. Second, changes to `tramp-terminal-type` (and the TRAMP version) are now handled correctly without having to recompute the value of `tramp-remote-process-environment`; previously this was not done, and a restart or user intervention would be required to correct them. Hopefully this meets with approval, so I append both the patch, and what I think is the appropriate changelog entry for this, to be manually added: 2017-11-13 Daniel Pittman * tramp-sh.el: Set TERM and INSIDE_EMACS environment earlier. (tramp-remote-process-environment): Remove TERM and INSIDE_EMACS. (tramp-remote-process-environment): Document their special handling. (tramp-open-shell): Set TERM and INSIDE_EMACS prior to starting the initial remote shell, so that it is also aware of the environment in which it is operating. --001a113d351874a716055de27776 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
Michael, you are completely rig= ht that my previous change was not necessary.=C2=A0 I blame my prehistoric = knowledge of Emacs here, as I wasn't aware of the change to use INSIDE_= EMACS.=C2=A0 On testing, it seems that EMACS=3Dt just happened to work in b= ash (for legacy reasons, probably other dinosaurs like me), and INSIDE_EMAC= S also disables editing, and fixes my problem.

You are also quite correct that IN= SIDE_EMACS was being set by tramp.=C2=A0 The problem was that it was set at= the wrong time: we need it set *before* we start the shell, to disable rea= dline bracketed paste (and other advanced features) before we start, for ex= ample, interrogating the remote system for the running version with `uname`= during `tramp-open-shell`.

I have attached a patch that moves two variables, TER= M and INSIDE_EMACS, out of `tramp-remote-process-environment`, and instead,= handles setting them prior to shell execution.

This has two advantages:

First, INSIDE_= EMACS is visible to the shell we are about to probe for usability, which fi= xes my own problem with bracketed paste support in libreadline / bash break= ing, and which makes it uniformly available on the remote host.

Second, changes t= o `tramp-terminal-type` (and the TRAMP version) are now handled correctly w= ithout having to recompute the value of `tramp-remote-process-environment`;= previously this was not done, and a restart or user intervention would be = required to correct them.

Hopefully this meets with approval, so I append both th= e patch, and what I think is the appropriate changelog entry for this, to b= e manually added:

--001a113d351874a716055de27776-- --001a113d351874a71a055de27778 Content-Type: application/octet-stream; name="emacs-tramp-no-editing.patch" Content-Disposition: attachment; filename="emacs-tramp-no-editing.patch" Content-Transfer-Encoding: base64 X-Attachment-Id: f_j9ylhay30 LS0tIDI2LjAuOTAvbGlzcC9uZXQvdHJhbXAtc2guZWwub3JpZwkyMDE3LTExLTEzIDEzOjU5OjI0 LjAwMDAwMDAwMCAtMDUwMAorKysgMjYuMC45MC9saXNwL25ldC90cmFtcC1zaC5lbAkyMDE3LTEx LTEzIDE0OjM4OjA2LjAwMDAwMDAwMCAtMDUwMApAQCAtNTMzLDkgKzUzMyw3IEBACiAKIDs7OyMj I3RyYW1wLWF1dG9sb2FkCiAoZGVmY3VzdG9tIHRyYW1wLXJlbW90ZS1wcm9jZXNzLWVudmlyb25t ZW50Ci0gIGAoIkVOVj0nJyIgIlRNT1VUPTAiICJMQ19DVFlQRT0nJyIKLSAgICAsKGZvcm1hdCAi VEVSTT0lcyIgdHJhbXAtdGVybWluYWwtdHlwZSkKLSAgICAsKGZvcm1hdCAiSU5TSURFX0VNQUNT PSclcyx0cmFtcDolcyciIGVtYWNzLXZlcnNpb24gdHJhbXAtdmVyc2lvbikKKyAgJygiRU5WPScn IiAiVE1PVVQ9MCIgIkxDX0NUWVBFPScnIgogICAgICJDRFBBVEg9IiAiSElTVE9SWT0iICJNQUlM PSIgIk1BSUxDSEVDSz0iICJNQUlMUEFUSD0iICJQQUdFUj1jYXQiCiAgICAgImF1dG9jb3JyZWN0 PSIgImNvcnJlY3Q9IikKICAgIkxpc3Qgb2YgZW52aXJvbm1lbnQgdmFyaWFibGVzIHRvIGJlIHNl dCBvbiB0aGUgcmVtb3RlIGhvc3QuCkBAIC01NDQsOCArNTQyLDE1IEBACiBlbnRyeSBFTlZWQVJO QU1FPSBkaXNhYmxlcyB0aGUgY29ycmVzcG9uZGluZyBlbnZpcm9ubWVudCB2YXJpYWJsZSwKIHdo aWNoIG1pZ2h0IGhhdmUgYmVlbiBzZXQgaW4gdGhlIGluaXQgZmlsZXMgbGlrZSB+Ly5wcm9maWxl LgogCi1TcGVjaWFsIGhhbmRsaW5nIGlzIGFwcGxpZWQgdG8gdGhlIFBBVEggZW52aXJvbm1lbnQs IHdoaWNoIHNob3VsZAotbm90IGJlIHNldCBoZXJlLiBJbnN0ZWFkLCBpdCBzaG91bGQgYmUgc2V0 IHZpYSBgdHJhbXAtcmVtb3RlLXBhdGgnLiIKK1NwZWNpYWwgaGFuZGxpbmcgaXMgYXBwbGllZCB0 byBzb21lIGVudmlyb25tZW50IHZhcmlhYmxlcywKK3doaWNoIHNob3VsZCBub3QgYmUgc2V0IGhl cmU6CisKK1RoZSBQQVRIIGVudmlyb25tZW50IHZhcmlhYmxlIHNob3VsZCBiZSBzZXQgdmlhIGB0 cmFtcC1yZW1vdGUtcGF0aCcuCisKK1RoZSBURVJNIGVudmlyb25tZW50IHZhcmlhYmxlIHNob3Vs ZCBiZSBzZXQgdmlhIGB0cmFtcC10ZXJtaW5hbC10eXBlJy4KKworVGhlIElOU0lERV9FTUFDUyBl bnZpcm9ubWVudCB2YXJpYWJsZSB3aWxsIGF1dG9tYXRpY2FsbHkgYmUgc2V0CitiYXNlZCBvbiB0 aGUgVFJBTVAgYW5kIEVtYWNzIHZlcnNpb25zLCBhbmQgc2hvdWxkIG5vdCBiZSBzZXQgaGVyZS4i CiAgIDpncm91cCAndHJhbXAKICAgOnZlcnNpb24gIjI2LjEiCiAgIDp0eXBlICcocmVwZWF0IHN0 cmluZykKQEAgLTM5NDIsOSArMzk0NywxNSBAQAogICAgICAgOzsgZmlsZSBjbG9iYmVyaW5nICRQ UzEuICAkUFJPTVBUX0NPTU1BTkQgaXMgYW5vdGhlciB3YXkgdG8gc2V0CiAgICAgICA7OyB0aGUg cHJvbXB0IGluIC9iaW4vYmFzaCwgaXQgbXVzdCBiZSBkaXNjYXJkZWQgYXMgd2VsbC4KICAgICAg IDs7ICRISVNURklMRSBpcyBzZXQgYWNjb3JkaW5nIHRvIGB0cmFtcC1oaXN0ZmlsZS1vdmVycmlk ZScuCisgICAgICA7OyBURVJNIGFuZCBJTlNJREVfRU1BQ1Mgc2V0IGhlcmUgdG8gZW5zdXJlIHRo ZXkgaGF2ZSB0aGUKKyAgICAgIDs7IGNvcnJlY3QgdmFsdWVzIHdoZW4gdGhlIHNoZWxsIHN0YXJ0 cywgbm90IGp1c3QgcHJvY2Vzc2VzCisgICAgICA7OyBydW4gd2l0aGluIHRoZSBzaGVsbC4gKFdo aWNoIHByb2Nlc3NlcyBpbmNsdWRlIG91cgorICAgICAgOzsgaW5pdGlhbCBwcm9iZXMgdG8gZW5z dXJlIHRoZSByZW1vdGUgc2hlbGwgaXMgdXNhYmxlLikKICAgICAgICh0cmFtcC1zZW5kLWNvbW1h bmQKICAgICAgICB2ZWMgKGZvcm1hdAotCSAgICAiZXhlYyBlbnYgRU5WPSVzICVzIFBST01QVF9D T01NQU5EPScnIFBTMT0lcyBQUzI9JycgUFMzPScnICVzICVzIgorCSAgICAiZXhlYyBlbnYgVEVS TT0nJXMnIElOU0lERV9FTUFDUz0nJXMsdHJhbXA6JXMnIEVOVj0lcyAlcyBQUk9NUFRfQ09NTUFO RD0nJyBQUzE9JXMgUFMyPScnIFBTMz0nJyAlcyAlcyIKKyAgICAgICAgICAgIHRyYW1wLXRlcm1p bmFsLXR5cGUKKyAgICAgICAgICAgIGVtYWNzLXZlcnNpb24gdHJhbXAtdmVyc2lvbiAgOyBJTlNJ REVfRU1BQ1MKICAgICAgICAgICAgIChvciAoZ2V0ZW52LWludGVybmFsICJFTlYiIHRyYW1wLXJl bW90ZS1wcm9jZXNzLWVudmlyb25tZW50KSAiIikKIAkgICAgKGlmIChzdHJpbmdwIHRyYW1wLWhp c3RmaWxlLW92ZXJyaWRlKQogCQkoZm9ybWF0ICJISVNURklMRT0lcyIK --001a113d351874a71a055de27778-- From unknown Sat Sep 20 01:51:43 2025 MIME-Version: 1.0 X-Mailer: MIME-tools 5.505 (Entity 5.505) X-Loop: help-debbugs@gnu.org From: help-debbugs@gnu.org (GNU bug Tracking System) To: Daniel Pittman Subject: bug#28139: closed (Re: bug#28139: 25.2; TRAMP vs bash 4.4 / readline 7.0 "bracketed paste" mode) Message-ID: References: <8760adb0n1.fsf@gmx.de> X-Gnu-PR-Message: they-closed 28139 X-Gnu-PR-Package: emacs Reply-To: 28139@debbugs.gnu.org Date: Tue, 14 Nov 2017 10:45:03 +0000 Content-Type: multipart/mixed; boundary="----------=_1510656303-3364-1" This is a multi-part message in MIME format... ------------=_1510656303-3364-1 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" Your bug report #28139: 25.2; TRAMP vs bash 4.4 / readline 7.0 "bracketed paste" mode which was filed against the emacs package, has been closed. The explanation is attached below, along with your original report. If you require more details, please reply to 28139@debbugs.gnu.org. --=20 28139: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=3D28139 GNU Bug Tracking System Contact help-debbugs@gnu.org with problems ------------=_1510656303-3364-1 Content-Type: message/rfc822 Content-Disposition: inline Content-Transfer-Encoding: 7bit Received: (at 28139-done) by debbugs.gnu.org; 14 Nov 2017 10:44:30 +0000 Received: from localhost ([127.0.0.1]:39399 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1eEYhh-0000rH-Ib for submit@debbugs.gnu.org; Tue, 14 Nov 2017 05:44:29 -0500 Received: from mout.gmx.net ([212.227.17.21]:53063) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1eEYhg-0000r5-6q for 28139-done@debbugs.gnu.org; Tue, 14 Nov 2017 05:44:29 -0500 Received: from detlef.gmx.de ([212.86.45.29]) by mail.gmx.com (mrgmx101 [212.227.17.168]) with ESMTPSA (Nemesis) id 0MgGDK-1eb3w524ow-00Nm02; Tue, 14 Nov 2017 11:44:19 +0100 From: Michael Albinus To: Daniel Pittman Subject: Re: bug#28139: 25.2; TRAMP vs bash 4.4 / readline 7.0 "bracketed paste" mode References: <87mv6vjv6c.fsf@detlef> <8760dgapqm.fsf@detlef> <871so4ao9n.fsf@detlef> <87pobkdrxp.fsf@detlef> <87fu9srj1p.fsf@gmx.de> Date: Tue, 14 Nov 2017 11:44:18 +0100 In-Reply-To: (Daniel Pittman's message of "Mon, 13 Nov 2017 14:41:30 -0500") Message-ID: <8760adb0n1.fsf@gmx.de> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.0.90 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Provags-ID: V03:K0:TW2y6IQpsOFi11QEKfgFiB23xJZ5ERSvivkzqJ3tS/03kDdTYer 34IRxxVy02WBwxkwVCgoaF4HvBBD03oDJu1h00DMtL+eOhOpZ3capJBi6dp2Rz9aLOMrbta NhKDW5esJxJYEiSY2kcIza3YxUkWHUSUmQ9zteCfBKz95Ey9Zu40nsJb0nc8gXeQSQ1QWzG RPeSg7XrGmJq1A/dUcBZg== X-UI-Out-Filterresults: notjunk:1;V01:K0:EJBT6pY7+wo=:BlSTEH0XMFhIBeNjzY6yrQ FNm5ttRgB5PeFL78Zp7wi+38UVOgFfv1o3pwcAqZIJ8053cbmACW12vqbvouOjnxFc/UdKCLL 0KUOLbXnRz0fMr2OffSMYCvRZKW4TaTHYdA2O4i1JsPtCWeohunL1iIms66dMQJEuoeouLGGV iYpMBYOZW6HpqiqiP+byoAHEmo1YsRiN09Qdayww3BDpN+pWTUZs8YLLWW2H21e+5499O1sRm vSPGtxuaLL320KbWtX2EuxFz7tlxZcK6ZC2rPvnbKBov/15fhAHhrwlecgg9E3fiJPHijBtlD UnKBV9T795e5tZeebme8z2+uSRbFu1PAUI430QH48DyTHxkSobQX5/vCyzuYW5oYQVvYru5Dc H9WXeAslH5WunoRwWr2ks8o71/SP/XBpNSiPHBf/Er+Gwtino/FWyxz2t4fjmIkyKXc4ZrUeP NgR2lC+PqVEGw0v1i4U1AgUJRW12AnuNBKmsp1Zpu8NISOhi1QG/dI1N3oP8jh3uF5EUY6YjB VVckQytRmBA3bpuFrEuT5JYuDM8jxp5eSCX6Y8KbCC6WrURP8A7+2nD1/neb6ChQKoaL0nblN fKaXT0HibKsqE1Tf7xTA/SC4Shd7rquQyH/V0Wdywkl02oRX0vaE6MKmZR6B8lSgr5Ek0Fc9D sHOBCKVYIWuApO1wiRhDZKabwWvFKPP04+nXzo/KKKhltTWdhJdxhm4Yn9QB7tpQAW+29diGb 1ngJ5Jcg0aFSuGDb/zvQ5PqvTqJGUWfiXVHtthpNNe1mYmF1LMZLoVxvXvZKBdvh3VJc67HPQ Et9JeJUsBx94/5h1UIwcOf5YXE6LFQrM9Mit+H8F8CdqBTOPWo= X-Spam-Score: -3.5 (---) X-Debbugs-Envelope-To: 28139-done Cc: 28139-done@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.5 (---) Version: 26.1 Daniel Pittman writes: Hi Daniel, > Hopefully this meets with approval, so I append both the patch, and > what I think is the appropriate changelog entry for this, to be > manually added: Thanks, it looks good. I have applied it to the emacs-26 branch, with some minor cosmetic changes. Closing the bug. Best regards, Michael. ------------=_1510656303-3364-1 Content-Type: message/rfc822 Content-Disposition: inline Content-Transfer-Encoding: 7bit Received: (at submit) by debbugs.gnu.org; 18 Aug 2017 15:33:55 +0000 Received: from localhost ([127.0.0.1]:44523 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dijHW-0006po-TI for submit@debbugs.gnu.org; Fri, 18 Aug 2017 11:33:55 -0400 Received: from eggs.gnu.org ([208.118.235.92]:53989) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dij7N-0006aj-IU for submit@debbugs.gnu.org; Fri, 18 Aug 2017 11:23:26 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1dij7G-00035D-In for submit@debbugs.gnu.org; Fri, 18 Aug 2017 11:23:20 -0400 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=0.8 required=5.0 tests=BAYES_50,HTML_MESSAGE, T_DKIM_INVALID autolearn=disabled version=3.3.2 Received: from lists.gnu.org ([2001:4830:134:3::11]:52438) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1dij7G-000359-FP for submit@debbugs.gnu.org; Fri, 18 Aug 2017 11:23:18 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:44925) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dij7E-0003vp-2M for bug-gnu-emacs@gnu.org; Fri, 18 Aug 2017 11:23:18 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1dij7C-000331-2q for bug-gnu-emacs@gnu.org; Fri, 18 Aug 2017 11:23:16 -0400 Received: from mail-qk0-x234.google.com ([2607:f8b0:400d:c09::234]:37275) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1dij7B-00031l-Sq for bug-gnu-emacs@gnu.org; Fri, 18 Aug 2017 11:23:14 -0400 Received: by mail-qk0-x234.google.com with SMTP id z18so54559032qka.4 for ; Fri, 18 Aug 2017 08:23:11 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20161025; h=mime-version:from:date:message-id:subject:to; bh=eLw+v3tze8TbrvesuymBATMuRX1hyw2PcDyDhvPAApg=; b=Yh0UxdeYXxa6n+c4mf9ZI5ThzlLCAJzX69/EyqMgkQt3Whmu0levwqOX02Vt3cnF6z lYYhlFlVTi3lJ95Sh7pKod/o90DwZoCW3XHOcuDvyr63N/reYvNgm+Dpj5FutMAzX2Br EQgd0e10Bgz5zxuIYIvQQkLz95LaNuyx8xzPUoHD73QWZ80f4J2CpMvn6l4pym+9P0NW xltWYOUSR24ZFX5x7vOh5EyR8u2osQFaL3gSzURoTvswgf/wmCJhfvDaaJAfUG8ThjU6 j6VjaIo8HLdVxm+Skc7X5aXxz0PlUNGrwUDmiDj+8aMhPzD32XRRn2hrobviEAhF5Cj0 L46A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:from:date:message-id:subject:to; bh=eLw+v3tze8TbrvesuymBATMuRX1hyw2PcDyDhvPAApg=; b=ihEukozKrDBJnFXbfHN1CVsLXNicUT+DGeLtwqoxpJCj4n8BqWag97WrUmp0D+MdC/ vF+PO+veRSw2OyJlE4C8zLYCQWkBs8yTo4bFeRTrQEjRwBFIbnqySNfz5vCwvAWtOcY8 k9iWN8CjjZtUkJ4mL6OmGd0xt3SgJOXyJo8iw+fEbDsrukxrUKnXrvhqZYIG1nIUF4mx OGQREKxfAAHh+tQrw48cq6omkS4yd0aqgaYbKVphryyYWES/XwA4KRgvjZYKvltcWls/ IU4BK7dMqH2u0qI5oiUw9Kpic4XLGFQv/rfdBrU63Dzq9np+89M+otUqi5BkUeHWHPIY Poqw== X-Gm-Message-State: AHYfb5inxaI360Bnwg28VF5S0H8kwIlO1FoRE6DmUoJJyzp0GI8JVjG6 mmw+uUf31CPbn42maRaJs8jUWzpBlCUtWcgrKw== X-Received: by 10.55.176.66 with SMTP id z63mr12673117qke.260.1503069790344; Fri, 18 Aug 2017 08:23:10 -0700 (PDT) MIME-Version: 1.0 Received: by 10.200.51.177 with HTTP; Fri, 18 Aug 2017 08:22:29 -0700 (PDT) From: Daniel Pittman Date: Fri, 18 Aug 2017 11:22:29 -0400 Message-ID: Subject: 25.2; TRAMP vs bash 4.4 / readline 7.0 "bracketed paste" mode To: bug-gnu-emacs@gnu.org Content-Type: multipart/alternative; boundary="94eb2c065500edafca055708b4f3" X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x X-Received-From: 2001:4830:134:3::11 X-Spam-Score: -4.0 (----) X-Debbugs-Envelope-To: submit X-Mailman-Approved-At: Fri, 18 Aug 2017 11:33:53 -0400 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -4.0 (----) --94eb2c065500edafca055708b4f3 Content-Type: text/plain; charset="UTF-8" After upgrading a remote system to a version of GNU/Linux that includes bash 4.4 (from Debian/testing), with the readline option `set enable-bracketed-paste on` in /etc/inputrc, and no personal inputrc, tramp breaks. The exact version of `/bin/sh --version` is: GNU bash, version 4.4.12(1)-release (x86_64-pc-linux-gnu) Specifically, it breaks because bash emits "enable bracketed paste" and "disable bracketed paste" CSI control sequences to the terminal around the shell prompt. That results in TRAMP trying to read ` [ 2 0 0 4 h "..."` as a Lisp expression, when reading the remote `uname -sr` output, which doesn't work. Passing the `--noediting` option to the remote shell command resolves the problem, by disabling readline entirely, but it should also be possible to augment the `tramp-open-connection-setup-interactive-shell` to issue, unconditionally, the command: bind 'set enable-bracketed-paste off' That will fail on some variants of /bin/sh (dash, posh, tested, but non-GNU systems may also show this.) Ignoring the failure should be harmless, however, both when this is not a valid internal command, and when it is not known to the bash / readline version. In GNU Emacs 25.2.1 (x86_64-apple-darwin16.7.0, NS appkit-1504.83 Version 10.12.6 (Build 16G29)) of 2017-08-08 built on slippycheeze-macbookpro.roam Windowing system distributor 'Apple', version 10.3.1504 Configured using: 'configure --disable-dependency-tracking --disable-silent-rules --enable-locallisppath=/Users/slippycheeze/homebrew/share/emacs/site-lisp --infodir=/Users/slippycheeze/homebrew/Cellar/emacs-edge/25.2/share/info/emacs --prefix=/Users/slippycheeze/homebrew/Cellar/emacs-edge/25.2 --with-modules --with-rsvg --with-xml2 --without-pop --disable-ns-self-contained --with-ns --without-x --without-dbus --with-gnutls' Configured features: JPEG RSVG NOTIFY ACL GNUTLS LIBXML2 ZLIB TOOLKIT_SCROLL_BARS NS MODULES Important settings: value of $LANG: en_US.UTF-8 locale-coding-system: utf-8-unix Major mode: Emacs-Lisp Minor modes in effect: diff-hl-flydiff-mode: t diff-hl-mode: t diff-auto-refine-mode: t highlight-parentheses-mode: t flyspell-mode: t ws-butler-mode: t shell-dirtrack-mode: t global-undo-tree-mode: t undo-tree-mode: t global-emojify-mode: t emojify-mode: t async-bytecomp-package-mode: t override-global-mode: t midnight-mode: t global-auto-revert-mode: t display-battery-mode: t desktop-save-mode: t auto-insert-mode: t tooltip-mode: t global-eldoc-mode: t eldoc-mode: t electric-indent-mode: t mouse-wheel-mode: t menu-bar-mode: t file-name-shadow-mode: t global-font-lock-mode: t font-lock-mode: t auto-composition-mode: t auto-encryption-mode: t auto-compression-mode: t column-number-mode: t line-number-mode: t auto-fill-function: do-auto-fill transient-mark-mode: t abbrev-mode: t Recent messages: Checking 34 files in /Users/slippycheeze/homebrew/Cellar/emacs-edge/25.2/share/emacs/25.2/lisp/emulation... Checking 167 files in /Users/slippycheeze/homebrew/Cellar/emacs-edge/25.2/share/emacs/25.2/lisp/emacs-lisp... Checking 24 files in /Users/slippycheeze/homebrew/Cellar/emacs-edge/25.2/share/emacs/25.2/lisp/cedet... Checking 57 files in /Users/slippycheeze/homebrew/Cellar/emacs-edge/25.2/share/emacs/25.2/lisp/calendar... Checking 87 files in /Users/slippycheeze/homebrew/Cellar/emacs-edge/25.2/share/emacs/25.2/lisp/calc... Checking 120 files in /Users/slippycheeze/homebrew/Cellar/emacs-edge/25.2/share/emacs/25.2/lisp/obsolete... Checking for load-path shadows...done user-error: End of history; no default available [2 times] Features: (shadow sort footnote mail-extr gnus-msg gnus-art mm-uu mml2015 mm-view mml-smime smime dig mailcap gnus-sum gnus-group gnus-undo gnus-start gnus-cloud nnimap nnmail mail-source tls gnutls utf7 netrc nnoo parse-time gnus-spec gnus-int gnus-range gnus-win emacsbug message rfc822 mml mml-sec epg mm-decode mm-bodies mm-encode mail-parse rfc2231 mailabbrev gmm-utils mailheader sendmail rfc2047 rfc2045 ietf-drums pp tabify bs executable tramp-cmds debug tramp-cache misearch multi-isearch find-func cursor-sensor diff-mode highlight-parentheses flyspell ispell ws-butler jka-compr skeleton generic-x cc-mode cc-fonts cc-guess cc-menus cc-cmds cc-styles cc-align align tramp tramp-compat auth-source eieio eieio-core password-cache tramp-loaddefs delight emojify apropos tar-mode json map subr-x ht dracula-theme edmacro kmacro async-bytecomp advice async cus-edit memoize dash-functional f dash s assoc use-package diminish bind-key easy-mmode finder-inf cl-macs cl info package epg-config seq byte-opt gv bytecomp byte-compile cl-extra cconv midnight icomplete grep compile comint ansi-color ring gnus gnus-ems nnheader gnus-util mail-utils mm-util help-fns help-mode easymenu mail-prsvr wid-edit autorevert filenotify battery desktop frameset autoinsert cus-start cus-load cl-seq cl-loaddefs pcase cl-lib time-date mule-util tooltip eldoc electric uniquify ediff-hook vc-hooks lisp-float-type mwheel ns-win ucs-normalize term/common-win tool-bar dnd fontset image regexp-opt fringe tabulated-list newcomment elisp-mode lisp-mode prog-mode register page menu-bar rfn-eshadow timer select scroll-bar mouse jit-lock font-lock syntax facemenu font-core frame cl-generic cham georgian utf-8-lang misc-lang vietnamese tibetan thai tai-viet lao korean japanese eucjp-ms cp51932 hebrew greek romanian slovak czech european ethiopic indian cyrillic chinese charscript case-table epa-hook jka-cmpr-hook help simple abbrev minibuffer cl-preloaded nadvice loaddefs button faces cus-face macroexp files text-properties overlay sha1 md5 base64 format env code-pages mule custom widget hashtable-print-readable backquote kqueue cocoa ns multi-tty make-network-process emacs) Memory information: ((conses 16 582897 386689) (symbols 48 46748 3) (miscs 40 565 2646) (strings 32 160816 184679) (string-bytes 1 4469214) (vectors 16 96463) (vector-slots 8 3893724 189356) (floats 8 11677 1729) (intervals 56 6386 3416) (buffers 976 39)) --94eb2c065500edafca055708b4f3 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
After upgrading a remote system to a version of GNU/L= inux that includes bash
4.4 (from Debian/testing), with the r= eadline option `set
enable-bracketed-paste on` in /etc/inputrc, a= nd no personal inputrc,
tramp breaks.

Th= e exact version of `/bin/sh --version` is:
GNU bash, version 4.4.= 12(1)-release (x86_64-pc-linux-gnu)

Specifically, = it breaks because bash emits "enable bracketed paste" and
"disable bracketed paste" CSI control sequences to the termina= l around the
shell prompt.

That results = in TRAMP trying to read `<ESC> [ 2 0 0 4 h "..."` as a Lisp=
expression, when reading the remote `uname -sr` output, which do= esn't work.

Passing the `--noediting` option t= o the remote shell command resolves the
problem, by disabling rea= dline entirely, but it should also be possible to
augment the `tr= amp-open-connection-setup-interactive-shell` to issue,
unconditio= nally, the command:

=C2=A0 =C2=A0 bind 'set en= able-bracketed-paste off'

That will fail on so= me variants of /bin/sh (dash, posh, tested, but non-GNU
systems m= ay also show this.)

Ignoring the failure should be= harmless, however, both when this is not a
valid internal comman= d, and when it is not known to the bash /
readline version.
=


In GNU Emacs 25.2.1 (x86_64-apple-darwin= 16.7.0, NS appkit-1504.83 Version 10.12.6 (Build 16G29))
=C2=A0of= 2017-08-08 built on slippycheeze-macbookpro.roam
Windowing syste= m distributor 'Apple', version 10.3.1504
Configured using= :
=C2=A0'configure --disable-dependency-tracking --disable-si= lent-rules
=C2=A0--enable-locallisppath=3D/Users/slippycheeze/hom= ebrew/share/emacs/site-lisp
=C2=A0--infodir=3D/Users/slippycheeze= /homebrew/Cellar/emacs-edge/25.2/share/info/emacs
=C2=A0--prefix= =3D/Users/slippycheeze/homebrew/Cellar/emacs-edge/25.2 --with-modules
=
=C2=A0--with-rsvg --with-xml2 --without-pop --disable-ns-self-containe= d --with-ns
=C2=A0--without-x --without-dbus --with-gnutls'

Configured features:
JPEG RSVG NOTIFY ACL= GNUTLS LIBXML2 ZLIB TOOLKIT_SCROLL_BARS NS MODULES

Important settings:
=C2=A0 value of $LANG: en_US.UTF-8
=C2=A0 locale-coding-system: utf-8-unix



<= div>Checking for load-path shadows...done

Features:
(shadow sort footnote mail-extr gnus-msg gnus-art mm-uu mml2015 mm-vi= ew
mml-smime smime dig mailcap gnus-sum gnus-group gnus-undo gnus= -start
gnus-cloud nnimap nnmail mail-source tls gnutls utf7 netrc= nnoo parse-time
gnus-spec gnus-int gnus-range gnus-win emacsbug = message rfc822 mml mml-sec epg
mm-decode mm-bodies mm-encode mail= -parse rfc2231 mailabbrev gmm-utils
mailheader sendmail rfc2047 r= fc2045 ietf-drums pp tabify bs executable
tramp-cmds debug tramp-= cache misearch multi-isearch find-func cursor-sensor
diff-mode hi= ghlight-parentheses flyspell ispell ws-butler jka-compr skeleton
= generic-x cc-mode cc-fonts cc-guess cc-menus cc-cmds cc-styles cc-align ali= gn
tramp tramp-compat auth-source eieio eieio-core password-cache= tramp-loaddefs
delight emojify apropos tar-mode json map subr-x = ht dracula-theme edmacro
kmacro async-bytecomp advice async cus-e= dit memoize dash-functional f dash s
assoc use-package diminish b= ind-key easy-mmode finder-inf cl-macs cl info
package epg-config = seq byte-opt gv bytecomp byte-compile cl-extra cconv
midnight ico= mplete grep compile comint ansi-color ring gnus gnus-ems nnheader
gnus-util mail-utils mm-util help-fns help-mode easymenu mail-prsvr wid-ed= it
frame cl-generic cham georgian utf-8-lang misc-lang vietnamese tibetan tha= i

=
=C2=A0(floats 8 11677 1729)
=C2=A0(intervals 56 6386 3416)
=C2=A0(buffers 976 39))

--94eb2c065500edafca055708b4f3-- ------------=_1510656303-3364-1--