From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: =?UTF-8?Q?=E5=86=85=E8=97=A4_?= =?UTF-8?Q?=E7=A5=90=E4=B8=80=E9=83=8E?= Newsgroups: gmane.emacs.bugs Subject: bug#39399: tramp depends on unstable details of shell command line processing Date: Mon, 27 Jul 2020 13:12:21 +0900 Message-ID: <78F0CA89-AE48-4E45-B03B-7C6AABE9FCAC@gmail.com> References: Mime-Version: 1.0 (Mac OS X Mail 13.4 \(3608.120.23.2.1\)) Content-Type: multipart/mixed; boundary="Apple-Mail=_413909CC-1023-4135-8EE2-A4CDA3E7E447" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="31956"; mail-complaints-to="usenet@ciao.gmane.io" To: 39399@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Mon Jul 27 06:13:19 2020 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1jzuVr-0008CX-8k for geb-bug-gnu-emacs@m.gmane-mx.org; Mon, 27 Jul 2020 06:13:19 +0200 Original-Received: from localhost ([::1]:60360 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jzuVp-0005j9-8x for geb-bug-gnu-emacs@m.gmane-mx.org; Mon, 27 Jul 2020 00:13:17 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:51230) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jzuVa-0005iq-1E for bug-gnu-emacs@gnu.org; Mon, 27 Jul 2020 00:13:02 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:42193) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1jzuVZ-0004DD-OD for bug-gnu-emacs@gnu.org; Mon, 27 Jul 2020 00:13:01 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1jzuVZ-00070y-Jz for bug-gnu-emacs@gnu.org; Mon, 27 Jul 2020 00:13:01 -0400 X-Loop: help-debbugs@gnu.org In-Reply-To: Resent-From: =?UTF-8?Q?=E5=86=85=E8=97=A4_?= =?UTF-8?Q?=E7=A5=90=E4=B8=80=E9=83=8E?= Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Mon, 27 Jul 2020 04:13:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 39399 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch Original-Received: via spool by 39399-submit@debbugs.gnu.org id=B39399.159582315326926 (code B ref 39399); Mon, 27 Jul 2020 04:13:01 +0000 Original-Received: (at 39399) by debbugs.gnu.org; 27 Jul 2020 04:12:33 +0000 Original-Received: from localhost ([127.0.0.1]:53739 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jzuV7-00070E-HW for submit@debbugs.gnu.org; Mon, 27 Jul 2020 00:12:33 -0400 Original-Received: from mail-pf1-f193.google.com ([209.85.210.193]:39557) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jzuV5-000700-EO for 39399@debbugs.gnu.org; Mon, 27 Jul 2020 00:12:33 -0400 Original-Received: by mail-pf1-f193.google.com with SMTP id z188so481099pfc.6 for <39399@debbugs.gnu.org>; Sun, 26 Jul 2020 21:12:31 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:mime-version:subject:message-id:date:to; bh=oXIarMdm9y2BTy21BtEb3UUwLJtxyA10FSvXQKKSBYg=; b=RLhgEnXLVtWMAacGh3nnIiSijcpBPB0zpIJO6nJ5wkP3H07v0irRVWX6nFjCf+BKO/ brtRROtVpLd0Q/JWpRqBwedyWc5lH9Hqu2fGRmcg7tYC7frB3M8epoujTCDR43wVFkY6 5rnzLgKwSOniSDU8Mi6N3VK2mfSE9LgGkplsyiABqc/1/IjgmE0K68psxCeyEIUNrYoV wr5KIzv6Ki9JFdyheuUlVwItHs/i++jPLhF9IR6dXhISReH/lU4GGyAyxmYvaXIz8KEC cUMkSCf9GXkJMxnu8LrDqDT/lVR3xEfWYBRMQgtyAg3uBgP6j4D4wNNBBH+BaBd1KZVe 1JvA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:mime-version:subject:message-id:date:to; bh=oXIarMdm9y2BTy21BtEb3UUwLJtxyA10FSvXQKKSBYg=; b=IgZXGdXCUSNKMaoYgCTj2hiRficOEX7ZF6TSgZb4sBDv/K/wcJtW+gtL/coR/yaTzt CgPp+Nl/MsoPOB+YzNQk1R/Z+2I2qsrxWl1iTzcLysAv+Er6Nt56GSGJ1+9AaJDfRZfE E8S4YcadkzeOMMhfkDnPcXjRsy3+o88p5Wb1UJAm4CFeF1V+tbJT1gVPkKl7+472BrMB Lp9FZMedAfX+BeqngbdPaj/DmyGHll//zYFWvQ1tzESOam0ux5/6wa40859TK34/rlVI NSDCa853tDlEWgEclERpg/yLZ5BZmyzt5gghBDSd3zRy4nj27hmG94jEMruTvMU55bEc y4Dg== X-Gm-Message-State: AOAM531O1sMhNhUgKkFzihah7lfsgHvlcDILzgul6d0WyTCDh7e9gfef uu8inxW5xoup2ZymNPba/VfEtj9/0so= X-Google-Smtp-Source: ABdhPJzEj4RoBwCWhY2fYfaaEunWBAcwS4uagDnEHNzEIePmXBxM+qJAzVRtmEufOttnt1X6sMWJ1A== X-Received: by 2002:a63:7f5d:: with SMTP id p29mr17960590pgn.259.1595823144918; Sun, 26 Jul 2020 21:12:24 -0700 (PDT) Original-Received: from ?IPv6:2400:2410:3241:ef00:92:6c93:21:2aff? ([2400:2410:3241:ef00:92:6c93:21:2aff]) by smtp.gmail.com with ESMTPSA id b24sm12091604pgn.8.2020.07.26.21.12.23 for <39399@debbugs.gnu.org> (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Sun, 26 Jul 2020 21:12:24 -0700 (PDT) X-Mailer: Apple Mail (2.3608.120.23.2.1) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list 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-mx.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.io gmane.emacs.bugs:183583 Archived-At: --Apple-Mail=_413909CC-1023-4135-8EE2-A4CDA3E7E447 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=utf-8 Hi. I could find a another way to solve this problem that avoids changing = ~/.editrc and it's more simple. See my patch attached on this mail. This problem happens on the latest libedit and FreeBSD sh uses Emacs = edit mode by default. If libedit runs on edit mode, libedit rewrites line by each control = character. On '^H', libedit sends line feed and write characters on the line that = is held in the internal screen buffer of libedit. If edit mode turns off, line edit works on terminal that is as same as = previous behavior. Shell command `set +E` escapes from edit mode in spite of libedit has = two edit mode (Emacs and Vi). `set +E` disables both of them. Although libedit has been developed and used by NetBSD, NetBSD doesn=E2=80= =99t have this problem. Because NetBSD sh doesn't use edit mode by default. I could confirm my patch solves this problem on emacs-26.3. And also works to FreeBSD current & OpenBSD current & RedHat 7.8. =E2=80=94 Yuichiro NAITO naito.yuichiro@gmail.com --Apple-Mail=_413909CC-1023-4135-8EE2-A4CDA3E7E447 Content-Disposition: attachment; filename=tramp.patch Content-Type: application/octet-stream; x-unix-mode=0644; name="tramp.patch" Content-Transfer-Encoding: 7bit diff --git a/lisp/net/tramp-sh.el b/lisp/net/tramp-sh.el index 18ae295108..ee64b3b13d 100644 --- a/lisp/net/tramp-sh.el +++ b/lisp/net/tramp-sh.el @@ -4059,6 +4059,7 @@ process to set up. VEC specifies the connection." ;; Disable echo expansion. (tramp-message vec 5 "Setting up remote shell environment") + (tramp-send-command vec "set +E" t) (tramp-send-command vec "stty -inlcr -onlcr -echo kill '^U' erase '^H'" t) ;; Check whether the echo has really been disabled. Some --Apple-Mail=_413909CC-1023-4135-8EE2-A4CDA3E7E447 Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset=us-ascii --Apple-Mail=_413909CC-1023-4135-8EE2-A4CDA3E7E447--