GNU bug report logs - #19636
[TRAMP] global minor mode hangs connection when accessing files in :lighter

Previous Next

Package: emacs;

Reported by: Philippe Vaucher <philippe.vaucher <at> gmail.com>

Date: Tue, 20 Jan 2015 18:17:03 UTC

Severity: normal

Fixed in version 26.1

Done: Michael Albinus <michael.albinus <at> gmx.de>

Bug is archived. No further changes may be made.

Full log


Message #29 received at 19636 <at> debbugs.gnu.org (full text, mbox):

From: Philippe Vaucher <philippe.vaucher <at> gmail.com>
To: Michael Albinus <michael.albinus <at> gmx.de>
Cc: 19636 <19636 <at> debbugs.gnu.org>
Subject: Re: bug#19636: [TRAMP] global minor mode hangs connection when
 accessing files in :lighter
Date: Sat, 25 Mar 2017 21:43:56 +0100
[Message part 1 (text/plain, inline)]
>
> (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
[Message part 2 (text/html, inline)]

This bug report was last modified 7 years and 308 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.