all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Michael Albinus <michael.albinus@gmx.de>
To: Philippe Vaucher <philippe.vaucher@gmail.com>
Cc: 19636@debbugs.gnu.org
Subject: bug#19636: [TRAMP] global minor mode hangs connection when accessing files in :lighter
Date: Sun, 25 Jan 2015 20:40:42 +0100	[thread overview]
Message-ID: <87h9vey7gl.fsf@gmx.de> (raw)
In-Reply-To: <CAGK7Mr5XVEXiuee-o9hAYiu-ewoZR1U=9=T+8NmUD2zuVjr-Cw@mail.gmail.com> (Philippe Vaucher's message of "Wed, 21 Jan 2015 18:40:40 +0100")

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.





  parent reply	other threads:[~2015-01-25 19:40 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 [this message]
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
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=87h9vey7gl.fsf@gmx.de \
    --to=michael.albinus@gmx.de \
    --cc=19636@debbugs.gnu.org \
    --cc=philippe.vaucher@gmail.com \
    /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.