all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Philippe Vaucher <philippe.vaucher@gmail.com>
To: Michael Albinus <michael.albinus@gmx.de>
Cc: 19636 <19636@debbugs.gnu.org>
Subject: bug#19636: [TRAMP] global minor mode hangs connection when accessing files in :lighter
Date: Sat, 25 Mar 2017 21:43:56 +0100	[thread overview]
Message-ID: <CAGK7Mr5+Z6RygLqYF_SEd4UAPPAj+YEsXb=NfSXxW-=bc_cjbA@mail.gmail.com> (raw)
In-Reply-To: <87d268jejx.fsf@gmx.de>

[-- Attachment #1: Type: text/plain, Size: 1301 bytes --]

>
> (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

[-- Attachment #2: Type: text/html, Size: 2051 bytes --]

  parent reply	other threads:[~2017-03-25 20:43 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-01-20 17:49 bug#19636: [TRAMP] global minor mode hangs connection when accessing files in :lighter Philippe Vaucher
2015-01-21 16:15 ` Michael Albinus
2015-01-21 17:40   ` Philippe Vaucher
2015-01-22 11:07     ` Philippe Vaucher
2015-01-25 19:40     ` Michael Albinus
2015-01-25 20:15       ` Philippe Vaucher
2015-01-25 21:10         ` Michael Albinus
2015-01-25 21:47           ` Philippe Vaucher
2017-03-25 20:43   ` Philippe Vaucher [this message]
2017-03-27 13:36     ` Michael Albinus
2017-03-27 15:46       ` Philippe Vaucher
2017-07-14 13:12         ` Michael Albinus
2017-07-21 12:56           ` Philippe Vaucher

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='CAGK7Mr5+Z6RygLqYF_SEd4UAPPAj+YEsXb=NfSXxW-=bc_cjbA@mail.gmail.com' \
    --to=philippe.vaucher@gmail.com \
    --cc=19636@debbugs.gnu.org \
    --cc=michael.albinus@gmx.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.