From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Michael Albinus Newsgroups: gmane.emacs.devel Subject: Re: master 1196e3f: (tramp-open-connection-setup-interactive-shell): Send -onlcr as well. Date: Tue, 13 Oct 2015 10:09:07 +0200 Message-ID: <87d1wjchr0.fsf@gmx.de> References: <20151009231545.12874.47698@vcs.savannah.gnu.org> <87egh0feec.fsf@gmx.de> <20151012113735.549056.FMU3051@unexploded-cow.prv.splode.com> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: ger.gmane.org 1444723827 30240 80.91.229.3 (13 Oct 2015 08:10:27 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Tue, 13 Oct 2015 08:10:27 +0000 (UTC) Cc: emacs-devel@gnu.org To: Noah Friedman Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Tue Oct 13 10:10:13 2015 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1Zlueu-0001EE-U8 for ged-emacs-devel@m.gmane.org; Tue, 13 Oct 2015 10:10:09 +0200 Original-Received: from localhost ([::1]:32905 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Zlueu-0007JX-BG for ged-emacs-devel@m.gmane.org; Tue, 13 Oct 2015 04:10:08 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:40097) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZlueJ-0007Dw-Bx for emacs-devel@gnu.org; Tue, 13 Oct 2015 04:09:32 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ZlueE-0006IR-Cq for emacs-devel@gnu.org; Tue, 13 Oct 2015 04:09:31 -0400 Original-Received: from mout.gmx.net ([212.227.17.22]:54888) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZlueE-0006IH-6O for emacs-devel@gnu.org; Tue, 13 Oct 2015 04:09:26 -0400 Original-Received: from detlef.gmx.de ([87.146.48.130]) by mail.gmx.com (mrgmx101) with ESMTPSA (Nemesis) id 0MgXCF-1Zyt5l1ge7-00NznT; Tue, 13 Oct 2015 10:09:10 +0200 In-Reply-To: <20151012113735.549056.FMU3051@unexploded-cow.prv.splode.com> (Noah Friedman's message of "Mon, 12 Oct 2015 11:37:35 -0700 (PDT)") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.0.50 (gnu/linux) X-Provags-ID: V03:K0:aLjcgTHCfQ9Fj72z+SQjqYQadZVj47Xay8Hv5u1w5teKqRJft8c AfWhRwfyV2dImsCZ/mbfS5lDZYs8byho61jPuOCC6jH28SmOAUee60VgBacM1sOPeSP0GJ6 W/NxkgdXu00o8Dvo68qZAwmbl2e0jR7adbDlCCjaIRx7JsyiOa/F7CTVIk3g5yJtap2nOcr Fol0Wcf/ZmtPkHk7xtl9Q== X-UI-Out-Filterresults: notjunk:1;V01:K0:4SepMprFutM=:ZKIyR3XSLu4p1fvEH+ImVC cBmwuxRR9O+9MjNjVz7ew7bu9u7C829tqbapte0B+SkMYgLOzrNviP52sx2aNXVeqch/CbJah bl75cWIRTSyI6rU5IE+mN1RRIkWMNUBkGehP7oqvp1nJtEED4o+1kuOIhsShGzmB5dFa1HQka 09iRl2GgiUmUsE+FCl+aaHj+oXX3gvr7EDl9qAaT877yxywGtjNpTE/Qky6ytnnurbBup4Ucp TbU3zDf/Rhws68jC5drNiVLsGq3NtDnfEMd609SIAI/jxBJjPyRF4KAn1b4Jgn3tz3Xy4yFVb rarvmWm7+Rp5ucniAFUYknaTy5HPjxGdjDxDCIVc5IVRtPNxdgTS4WfVDzFF1z1xKGX8FnyDi YdQNR49Jbq64dX6BI4uG05hYnneI6jXiAjL4FxExxZbduoPuhx7Q8IX4A4aS/xtHI2sMVPwkg ptF9vMPP1Q/JTXv5xzBBhdv+ApzxIH/vzj/JxZwLXXr8L5sunwuAFzjqwcMw+UVHd5yLJQJ8M EM2sKBZ/YMJhV0VEZUgxS468o3ZWaXqniwyGADxbtRZ3qhswKfeRJHSLVDcNDj6MG7AqJOKEE MF8Qego8aWczmREt2yxsdrK1AiKHGAZ+LFeXroHBxTa4RBAr2exth3aEQ8KFWj3uJoeqiNjZH 7Pa0dHShxoWtiAi6sRDD97uDZgYetgzdSZc9fEexjFOim0F+fmi5anZNcWhUVHzC5mpIAgB96 x2kDXNfwh6K9HYe8Dzg8pEJYyGw0JTUZOrbFTfq9StqsKwaR+ZggZ97NrCNXNnFLtezPbBtd X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 212.227.17.22 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:191432 Archived-At: Noah Friedman writes: > That's exactly the problem. Tramp runs an "interactive" shell on the > remote end; specifically, it sets "PS1". That means that if your remote > shell's .profile or .bashrc thinks you're interactive and runs "stty sane" > as part of the usual login process, then the onlcr flag gets set and all of > the output lines end with ^M. Subsequently, after trying to search for > commands to run on the remote end, tramp tries to send commands like > "/usr/bin/ls^M -args" and concludes that there is no valid ls on the remote > system. I see. Strange enough, that nobody else did report ever. > I've known for many years to put a guard in my .bashrc along the lines of > > case $PS1 in '' ) return 0 ;; esac > > before doing anything that would confuse batch processing, but tramp was > specifically defeating that. Tramp sets TERM=dumb; you could test for it. > And funny you should say the current settings have been used for years, > because for years tramp hasn't worked for me and I finally got tired of > trying it once in a while and seeing that it still didn't work. I've been > punting and setting up sshfs connections manually instead, but I was in a > mood last week and decided to debug it. sshfs has its merits, but when it comes to running processes on the remote side, you need Tramp. Well, I've pushed your patch also into the Tramp git repo. Let's see whether people will kill us because of this. I plan to release Tramp 2.2.13 end of the year (if I survive), until then there's enough time to get reports from people using either Emacs git master or Tramp git master. Thanks for all your work, and best regards, Michael.