[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#19636: [TRAMP] global minor mode hangs connection when accessing fil

From: Philippe Vaucher
Subject: bug#19636: [TRAMP] global minor mode hangs connection when accessing files in :lighter
Date: Sat, 25 Mar 2017 21:43:56 +0100

(setq buggy-tramp-mode-lighter
      '(:eval (format " Projectile[%s]"
                      (if (file-remote-p default-directory)
                        (file-truename default-directory)))))


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)

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,

reply via email to

[Prev in Thread] Current Thread [Next in Thread]