From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Wolfgang Jenkner Newsgroups: gmane.emacs.bugs Subject: bug#18858: 24.4; tramp vc-registered errors after upgrading to 24.4 Date: Tue, 28 Oct 2014 05:43:51 +0100 Message-ID: <85lho0pzne.fsf@iznogoud.viz> References: <86d29db6e7.fsf@gly.ftfl.ca> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: ger.gmane.org 1414471829 13800 80.91.229.3 (28 Oct 2014 04:50:29 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Tue, 28 Oct 2014 04:50:29 +0000 (UTC) Cc: Michael Albinus , 18858@debbugs.gnu.org To: Joseph Mingrone Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Tue Oct 28 05:50:22 2014 Return-path: Envelope-to: geb-bug-gnu-emacs@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 1Xiyjd-0007XC-HT for geb-bug-gnu-emacs@m.gmane.org; Tue, 28 Oct 2014 05:50:21 +0100 Original-Received: from localhost ([::1]:37202 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Xiyjd-00080D-2M for geb-bug-gnu-emacs@m.gmane.org; Tue, 28 Oct 2014 00:50:21 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:57754) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XiyjS-0007zu-TF for bug-gnu-emacs@gnu.org; Tue, 28 Oct 2014 00:50:18 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1XiyjL-00083C-Ep for bug-gnu-emacs@gnu.org; Tue, 28 Oct 2014 00:50:10 -0400 Original-Received: from debbugs.gnu.org ([140.186.70.43]:45015) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XiyjL-00082m-Bg for bug-gnu-emacs@gnu.org; Tue, 28 Oct 2014 00:50:03 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.80) (envelope-from ) id 1XiyjK-000066-FJ for bug-gnu-emacs@gnu.org; Tue, 28 Oct 2014 00:50:02 -0400 X-Loop: help-debbugs@gnu.org In-Reply-To: <86d29db6e7.fsf@gly.ftfl.ca> Resent-From: Wolfgang Jenkner Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 28 Oct 2014 04:50:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 18858 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 18858-submit@debbugs.gnu.org id=B18858.1414471760314 (code B ref 18858); Tue, 28 Oct 2014 04:50:02 +0000 Original-Received: (at 18858) by debbugs.gnu.org; 28 Oct 2014 04:49:20 +0000 Original-Received: from localhost ([127.0.0.1]:37113 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1Xiyie-000050-3v for submit@debbugs.gnu.org; Tue, 28 Oct 2014 00:49:20 -0400 Original-Received: from b2bfep13.mx.upcmail.net ([62.179.121.58]:39736) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1Xiyib-0008WN-SM for 18858@debbugs.gnu.org; Tue, 28 Oct 2014 00:49:19 -0400 Original-Received: from edge12.upcmail.net ([192.168.13.82]) by b2bfep13-int.chello.at (InterMail vM.8.01.05.11 201-2260-151-128-20120928) with ESMTP id <20141028044911.LQZB28235.b2bfep13-int.chello.at@edge12.upcmail.net> for <18858@debbugs.gnu.org>; Tue, 28 Oct 2014 05:49:11 +0100 Original-Received: from iznogoud.viz ([91.119.209.99]) by edge12.upcmail.net with edge id 8Up91p00R29D6fP0CUpA18; Tue, 28 Oct 2014 05:49:11 +0100 X-SourceIP: 91.119.209.99 Original-Received: from wolfgang by iznogoud.viz with local (Exim 4.84 (FreeBSD)) (envelope-from ) id 1XiyiT-0000by-K1; Tue, 28 Oct 2014 05:49:09 +0100 User-Agent: Gnus/5.130012 (Ma Gnus v0.12) Emacs/24.4.50 (berkeley-unix) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x X-Received-From: 140.186.70.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-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:95184 On Mon, Oct 27 2014, Joseph Mingrone wrote: > C-x C-f /remote-host:/some/path/file > > In the minibuffer I see "Tramp: Checking `vc-registered' for > /scp:phe:/home/jrm/input.tre" (then an indefinitely rotating '/'). > > When I cancel with C-g, then try again visiting the file again > everything works. If I try again it will fail again. > > I've attached the contents of the tramp buffers. I've reproduced the > problem on other hosts also running FreeBSD (amd64 9.3). I have been running tramp with a local patch for this for a while now (and forgot about it). The tramp bug is in code which is only used if sending "stty -echo" to the remote /bin/sh leaves echoing on, in effect. In FreeBSD this happens with /bin/sh if line editing via libedit is used and emacs or vi bindings are enabled (see also bug#10295). Date: Sat, 8 Mar 2014 16:14:10 +0100 Subject: [PATCH] Fix hang in `tramp-sh-handle-vc-registered'. --- lisp/net/tramp-sh.el | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/lisp/net/tramp-sh.el b/lisp/net/tramp-sh.el index 315bc08..4a25980 100644 --- a/lisp/net/tramp-sh.el +++ b/lisp/net/tramp-sh.el @@ -4763,6 +4763,17 @@ function waits for output unless NOOUTPUT is set." (when (tramp-get-connection-property p "remote-echo" nil) ;; We mark the command string that it can be erased in the output buffer. (tramp-set-connection-property p "check-remote-echo" t) + ;; If we put `tramp-echo-mark' after a trailing newline (which + ;; is assumed to be unquoted) `tramp-send-string' doesn't see + ;; that newline and adds `tramp-rsh-end-of-line' right after + ;; `tramp-echo-mark', so the remote shell sees two consecutive + ;; trailing line endings and sends two prompts after executing + ;; the command, which confuses `tramp-wait-for-output'. + (when (and (not (string= command "")) + (string-equal (substring command -1) "\n")) + (setq command (substring command 0 -1))) + ;; No need to restore a trailing newline here since `tramp-send-string' + ;; makes sure that the string ends in `tramp-rsh-end-of-line', anyway. (setq command (format "%s%s%s" tramp-echo-mark command tramp-echo-mark))) ;; Send the command. (tramp-message vec 6 "%s" command) -- 2.1.2