From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Philippe Vaucher Newsgroups: gmane.emacs.bugs Subject: bug#19636: [TRAMP] global minor mode hangs connection when accessing files in :lighter Date: Sat, 25 Mar 2017 21:43:56 +0100 Message-ID: References: <87d268jejx.fsf@gmx.de> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: multipart/alternative; boundary=001a1140f5b40c1eb0054b942de4 X-Trace: blaine.gmane.org 1490474717 18702 195.159.176.226 (25 Mar 2017 20:45:17 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Sat, 25 Mar 2017 20:45:17 +0000 (UTC) Cc: 19636 <19636@debbugs.gnu.org> To: Michael Albinus Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Sat Mar 25 21:45:13 2017 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1crsYd-0003sV-Ox for geb-bug-gnu-emacs@m.gmane.org; Sat, 25 Mar 2017 21:45:07 +0100 Original-Received: from localhost ([::1]:38631 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1crsYj-0001AN-RY for geb-bug-gnu-emacs@m.gmane.org; Sat, 25 Mar 2017 16:45:13 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:34913) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1crsYd-00018s-KX for bug-gnu-emacs@gnu.org; Sat, 25 Mar 2017 16:45:08 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1crsYY-0003Dv-Up for bug-gnu-emacs@gnu.org; Sat, 25 Mar 2017 16:45:07 -0400 Original-Received: from debbugs.gnu.org ([208.118.235.43]:46492) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1crsYY-0003Dq-Rs for bug-gnu-emacs@gnu.org; Sat, 25 Mar 2017 16:45:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1crsYY-0006hQ-LL for bug-gnu-emacs@gnu.org; Sat, 25 Mar 2017 16:45:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Philippe Vaucher Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 25 Mar 2017 20:45:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 19636 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 19636-submit@debbugs.gnu.org id=B19636.149047467425699 (code B ref 19636); Sat, 25 Mar 2017 20:45:02 +0000 Original-Received: (at 19636) by debbugs.gnu.org; 25 Mar 2017 20:44:34 +0000 Original-Received: from localhost ([127.0.0.1]:44690 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1crsY6-0006gR-If for submit@debbugs.gnu.org; Sat, 25 Mar 2017 16:44:34 -0400 Original-Received: from mail-vk0-f43.google.com ([209.85.213.43]:33557) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1crsY4-0006gB-E0 for 19636@debbugs.gnu.org; Sat, 25 Mar 2017 16:44:32 -0400 Original-Received: by mail-vk0-f43.google.com with SMTP id d188so19340079vka.0 for <19636@debbugs.gnu.org>; Sat, 25 Mar 2017 13:44:32 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=oZzdoeD0VbMZ24idAvMVlA14mzRcqh4PcLeivLesvS8=; b=Ri/E4ddi6wrXkUOE4e32T0VmtcY3ws0kiPHHN+qOno7Gb+I78tbrBPuvmCzwgVhUi1 +yGn7BGnlcpv3hGa0bJFZCXrUjZN922pZv4COmx0dqhCfCG0l1xzGfTw7rYLoGIB1p0X EFfPmnv6LBlnz8W1kRYWFfn+xPzWa155CO9ye97xHGEMTliHPJYJ5Zs3/Mvle4RPQFnF 236+sZBEOCj1Vu0zzhKNyeOSlYfnI+eQ2mD4j9cer6skmTTShBYBN+pkRsXAIQEd+3dv r4/M8mr5RhrslzwwKfJDc2g9ROnaAYIsgD1eZMIP7K9mzGsi0KxSHcadW9jcwIrAV5ra xW0w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=oZzdoeD0VbMZ24idAvMVlA14mzRcqh4PcLeivLesvS8=; b=lZRdyrVMw+y8Qqh521/TjXgZL2q807yb6gzg2JfwPNAG7gIpvUZZE+P9RRQDzy66dW QYgkrRvcsr9GZhEdBsPkLs9MRd3gTQiD1EZt1WJ6+yI5UtBBZu1tZdfVqtywJ1y+qUsy PCIbWSCpCpQ12xYBbix260Tb3feqP4pw43VUKhflRauekVny+CSWgmnJpuJLgFcDB/c+ JshdZsUifvF2IWsWqg59yUfSmtV1ItTucqhvOH/T+6TSzJDK4Kb1QabuH5Tm/6kGmir7 awCSnjrEmbcdxJhtqitELpboKBCu4arAx35AQGyNWJkVJACUAlzzW+y5R9LuPdqji9ue 65Vw== X-Gm-Message-State: AFeK/H3pCY+l8nEpacUB1ycjQUNfVEj3KPVgG+CwLssFTZPOfwK+oCFty4xh3VVtZuAGsVho7Hrdo1cHWV1N1g== X-Received: by 10.31.154.22 with SMTP id c22mr6903005vke.52.1490474666563; Sat, 25 Mar 2017 13:44:26 -0700 (PDT) Original-Received: by 10.103.45.8 with HTTP; Sat, 25 Mar 2017 13:43:56 -0700 (PDT) In-Reply-To: <87d268jejx.fsf@gmx.de> X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 208.118.235.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" Xref: news.gmane.org gmane.emacs.bugs:130957 Archived-At: --001a1140f5b40c1eb0054b942de4 Content-Type: text/plain; charset=UTF-8 > > (setq buggy-tramp-mode-lighter > '(:eval (format " Projectile[%s]" > (if (file-remote-p default-directory) > default-directory > (file-truename default-directory))))) > Hello, I just wanted to notice you that I made progress about this issue at https://github.com/bbatsov/projectile/pull/1129 To remind you a little bit the issue: TRAMP blocks or forgot to ask the password to the user if a minor's mode lighter tries to query the buffer's default-directory file properties. My workaround is the following: (let* ((dir default-directory) (is-local (not (file-remote-p dir))) (is-connected (file-remote-p dir nil t))) (if (or is-local is-connected) (do-the-thing) (do-nothing))) Basically, do nothing if there's no reliable way of getting the information yet (we are remote and not connected yet). This seems to repair the issue almost always, except for TRAMP 2.2.11 (the one in emacs 24.5). There is a recapitulary table at https://github.com/bbatsov/projectile/pull/1129#issuecomment-289237057 I believe this workaround seems future proof, given all the information comes from `file-remote-p` which is used to detect remoteness and connectivity. Hope it helps, Philippe --001a1140f5b40c1eb0054b942de4 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable
(setq buggy-tramp-mode-lighte= r
=C2=A0 =C2=A0 =C2=A0 '(:eval (format " Projectile[%s]"
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 (if (file-remote-p default-directory)
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0 =C2=A0 default-directory
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0 (file-truename default-directory)))))

<= /div>
Hello,

I just wanted to notice you that = I made progress about this issue at https://github.com/bbatsov/projectile/pull/1129

To remind you a little bit the issue: TRAMP blocks or forgot to= ask the password to the user if a minor's mode lighter tries to query = the buffer's default-directory file properties.

My workaround is the following:

=C2=A0(let*= ((dir default-directory)
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0(is-l= ocal (not (file-remote-p dir)))
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0(is-connected (file-remote-p dir nil t)))
=C2=A0 =C2=A0 (if (o= r is-local is-connected)
=C2=A0 =C2=A0 =C2=A0 =C2=A0 (do-the-thin= g)
=C2=A0 =C2=A0 =C2=A0 (do-nothing)))

=
Basically, do nothing if there's no reliable way of getting the in= formation yet (we are remote and not connected yet).

This see= ms to repair the issue almost always, except for TRAMP 2.2.11 (the one in e= macs 24.5).


I believe this workaround seems future pro= of, given all the information comes from `file-remote-p` which is used to d= etect remoteness and connectivity.

Hope it helps,<= /div>
Philippe
--001a1140f5b40c1eb0054b942de4--