bug-gnu-emacs
[Top][All Lists]
Advanced

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

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


From: Michael Albinus
Subject: bug#19636: [TRAMP] global minor mode hangs connection when accessing files in :lighter
Date: Sun, 25 Jan 2015 20:40:42 +0100
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/25.0.50 (gnu/linux)

Philippe Vaucher <philippe.vaucher@gmail.com> writes:

>> (setq buggy-tramp-mode-lighter
>>       '(:eval (format " Projectile[%s]"
>>                       (if (file-remote-p default-directory)
>>                           default-directory
>>                         (file-truename default-directory)))))
>
> That's an interesting workaround, can I assume that
> `default-directory` over a TRAMP connection is always absolute? what
> about symlinks?

You can always assume, that `default-directory' is absolute, being it
local or remote. Symlinks are not expanded, 'tho.

However, there is always the buffer local variable
`buffer-file-truename'. Maybe you could use it somehow, when setting the
lighter? Something like

(if buffer-file-truename (file-name-directory buffer-file-truename) 
default-directory)

Short analysis of the debug buffer:

> 18:06:05.604340 tramp-maybe-open-connection (3) # Opening connection for 
> silex@unitedsoft.ch using scpx...
> 18:06:05.604996 tramp-maybe-open-connection (6) # /bin/sh -i
> 18:06:05.607758 tramp-wait-for-regexp (6) # 
> #$ 

Here Tramp opens a second connection in order to call git.

> 18:06:05.610783 tramp-sh-handle-file-truename (4) # Finding true name for 
> `/scpx:silex@unitedsoft.ch:/tmp/'
> 18:06:05.610902 tramp-send-command (6) # echo are you awake
> 18:06:15.613967 tramp-wait-for-regexp (6) # 
> are you awake
> #$ 
> 18:06:15.614566 tramp-wait-for-regexp (1) # File error: [[Regexp `\(^\|\)[^#$
> ]*///06fdc8c8f4a1778883b636f13ae5468c#\$?$' not found in 10 secs]]

And here Tramp tries to use the primary connection for getting the
truename of the default directory. Tramp is not able to accept those
requests while preparing the second connection for
start-file-process. Maybe I need to add something in order to make it
more robust. This is not such easy, it might take time.

> Philippe

Best regards, Michael.





reply via email to

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