From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Daniel Pittman Newsgroups: gmane.emacs.bugs Subject: bug#28139: 25.2; TRAMP vs bash 4.4 / readline 7.0 "bracketed paste" mode Date: Fri, 18 Aug 2017 11:22:29 -0400 Message-ID: NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: multipart/alternative; boundary="94eb2c065500edafca055708b4f3" X-Trace: blaine.gmane.org 1503070461 9061 195.159.176.226 (18 Aug 2017 15:34:21 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Fri, 18 Aug 2017 15:34:21 +0000 (UTC) To: 28139@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Fri Aug 18 17:34:16 2017 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dijHh-0001Wd-Fb for geb-bug-gnu-emacs@m.gmane.org; Fri, 18 Aug 2017 17:34:05 +0200 Original-Received: from localhost ([::1]:34910 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dijHo-0003Ch-4w for geb-bug-gnu-emacs@m.gmane.org; Fri, 18 Aug 2017 11:34:12 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:47422) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dijHg-0003Bk-EC for bug-gnu-emacs@gnu.org; Fri, 18 Aug 2017 11:34:06 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1dijHe-0008SJ-Fp for bug-gnu-emacs@gnu.org; Fri, 18 Aug 2017 11:34:04 -0400 Original-Received: from debbugs.gnu.org ([208.118.235.43]:35842) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1dijHe-0008SD-Ar for bug-gnu-emacs@gnu.org; Fri, 18 Aug 2017 11:34:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1dijHe-0006qD-2J for bug-gnu-emacs@gnu.org; Fri, 18 Aug 2017 11:34:02 -0400 X-Loop: help-debbugs@gnu.org 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: X-Debbugs-Original-To: bug-gnu-emacs@gnu.org Original-Received: via spool by submit@debbugs.gnu.org id=B.150307043526280 (code B ref -1); Fri, 18 Aug 2017 15:34:01 +0000 Original-Received: (at submit) by debbugs.gnu.org; 18 Aug 2017 15:33:55 +0000 Original-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 Original-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 Original-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 Original-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 Original-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 Original-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 Original-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 Original-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) Original-Received: by 10.200.51.177 with HTTP; Fri, 18 Aug 2017 08:22:29 -0700 (PDT) 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-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 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 208.118.235.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.org gmane.emacs.bugs:135899 Archived-At: --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--