From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Michael Albinus Newsgroups: gmane.emacs.bugs Subject: bug#18940: 24.4; vc-hg does not disable pager, leading to hangs (at least with tramp) Date: Sun, 09 Nov 2014 11:24:21 +0100 Message-ID: <87y4rkhdt6.fsf@gmx.de> References: <030C5AEB-C009-4995-B153-6EECD44802C8@fb.com> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Trace: ger.gmane.org 1415528724 4508 80.91.229.3 (9 Nov 2014 10:25:24 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sun, 9 Nov 2014 10:25:24 +0000 (UTC) Cc: 18940@debbugs.gnu.org To: Daniel Pittman Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Sun Nov 09 11:25:18 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 1XnPgL-0001FB-VK for geb-bug-gnu-emacs@m.gmane.org; Sun, 09 Nov 2014 11:25:18 +0100 Original-Received: from localhost ([::1]:38237 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XnPgL-0008AT-Ep for geb-bug-gnu-emacs@m.gmane.org; Sun, 09 Nov 2014 05:25:17 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:55916) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XnPgD-0008AL-TC for bug-gnu-emacs@gnu.org; Sun, 09 Nov 2014 05:25:15 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1XnPg8-00029M-Am for bug-gnu-emacs@gnu.org; Sun, 09 Nov 2014 05:25:09 -0500 Original-Received: from debbugs.gnu.org ([140.186.70.43]:56998) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XnPg8-000299-87 for bug-gnu-emacs@gnu.org; Sun, 09 Nov 2014 05:25:04 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.80) (envelope-from ) id 1XnPg7-0007aU-LO for bug-gnu-emacs@gnu.org; Sun, 09 Nov 2014 05:25:03 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Michael Albinus Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sun, 09 Nov 2014 10:25:03 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 18940 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 18940-submit@debbugs.gnu.org id=B18940.141552866729105 (code B ref 18940); Sun, 09 Nov 2014 10:25:03 +0000 Original-Received: (at 18940) by debbugs.gnu.org; 9 Nov 2014 10:24:27 +0000 Original-Received: from localhost ([127.0.0.1]:54210 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1XnPfX-0007ZN-6t for submit@debbugs.gnu.org; Sun, 09 Nov 2014 05:24:27 -0500 Original-Received: from mout.gmx.net ([212.227.17.21]:63217) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1XnPfU-0007Z6-5o for 18940@debbugs.gnu.org; Sun, 09 Nov 2014 05:24:25 -0500 Original-Received: from detlef.gmx.de ([87.146.43.187]) by mail.gmx.com (mrgmx103) with ESMTPSA (Nemesis) id 0LZzY9-1YS1M32AyD-00lkHF; Sun, 09 Nov 2014 11:24:22 +0100 In-Reply-To: <030C5AEB-C009-4995-B153-6EECD44802C8@fb.com> (Daniel Pittman's message of "Mon, 3 Nov 2014 21:47:14 +0000") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.0.50 (gnu/linux) X-Provags-ID: V03:K0:Y96fl/1sV6SwIoia5is5K93rGNrfti81g920Xy2akaryzLXt17V sV2UKAYwJoujRBxF/sUXRokQv1GXYz0qYzMPaQBozF+lKKazknULHbU1iqFe63ShJ9Y6RE9 fu3Fnc5HJc9cPTzgz7v8da/vX+gULgFdqzDd9QC38/kK12v3qEM6Y9rK7xLrkh7OODVhihJ 4tLWsb6Je8GjJCjk99OMA== X-UI-Out-Filterresults: notjunk:1; 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:95762 Daniel Pittman writes: > C-x C-f /sshx:dpittman@remotehost.local:/path/to/file/in/hg/repo.txt > > =E2=80=A6and Emacs hangs. > > I had problems with the Hg backend hanging via tramp; checking showed tha= t it > was hung waiting on `less`, which was sitting there telling me that the > terminal wasn't fully featured and could it please, kindly, have some hum= an > input to let it know that it was OK to continue. discusses the problem, and proposes even a solution for "Tramp in Emacs" :-) > Anyway, options that probably make sense to set to make this smoother: > > 1. `HGPLAIN` exists in the environment. > > This disables things that might change output, and is recommended for > non-interactive calls to try and discourage random breakage. I'm a little bit reluctant to add this per default to `tramp-remote-process-environment'. There shouldn't be such default application specific settings. But the following patch might be sufficient (could you, please, test?): --8<---------------cut here---------------start------------->8--- *** /home/albinus/src/emacs/lisp/vc/vc-hg.el.~118313~ 2014-11-09 11:19:05.8= 51785605 +0100 --- /home/albinus/src/emacs/lisp/vc/vc-hg.el 2014-11-09 11:13:53.255025363 = +0100 *************** *** 210,220 **** ;; can parse the output. (append (list "TERM=3Ddumb" "LANGUAGE=3DC") process-environment))) ! (process-file ! vc-hg-program nil t nil ! "--config" "alias.status=3Dstatus" ! "--config" "defaults.status=3D" ! "status" "-A" (file-relative-name file))) ;; Some problem happened. E.g. We can't find an `hg' ;; executable. (error nil))))))) --- 210,227 ---- ;; can parse the output. (append (list "TERM=3Ddumb" "LANGUAGE=3DC") process-environment))) ! (if (file-remote-p file) ! (process-file ! "env" nil t nil ! "HGPLAIN=3D1" vc-hg-program ! "--config" "alias.status=3Dstatus" ! "--config" "defaults.status=3D" ! "status" "-A" (file-relative-name file)) ! (process-file ! vc-hg-program nil t nil ! "--config" "alias.status=3Dstatus" ! "--config" "defaults.status=3D" ! "status" "-A" (file-relative-name file)))) ;; Some problem happened. E.g. We can't find an `hg' ;; executable. (error nil))))))) --8<---------------cut here---------------end--------------->8--- > 3. --color never > > ...because if you have a tty, and less/hg think it is an interactive enou= gh > call to invoke the pager and complain to a human, you might well get color > displayed as well. > > 4. --pager never > > ...because you just don't want to page the output for non-interactive use. It looks, like you need to enable the respective extensions in your .hgrc. Therefore, they cannot be added in vg-hg.el by default, I fear. Best regards, Michael.