Subject: Re: tramp depends on unstable details of shell command line processing

From: 内藤 祐一郎 <[email-masked]>
Date: Mon, 27 Jul 2020 13:12:21 +0900

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’t 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.

—
Yuichiro NAITO
[email-masked]