Ergus writes: > Hi Dmitry and Michael: Hi Ergus, > I enabled the project-mode-line recently and now when I try to open a > remote file emacs seems frozen forever (minutes in a not so bad > connection). > > I made a profile and it looks like there is some bad interaction between > project-mode-line and tramp names > > The profile report: > > 15458 75% - redisplay_internal (C function) > 15442 75% - eval > 15442 75% - project-mode-line-format > 15442 75% - project-current > 15442 75% - project--find-in-directory > 15442 75% - run-hook-with-args-until-success > 15442 75% - project-try-vc > 15442 75% - project--value-in-dir > 15442 75% - hack-dir-local-variables > 15442 75% - # > 15442 75% - hack-dir-local--get-variables > 15442 75% - dir-locals-find-file > 14648 71% - locate-dominating-file > 14644 71% - abbreviate-file-name > 14644 71% - tramp-file-name-handler > 14637 71% - apply > 14637 71% - tramp-sh-file-name-handler > 14611 71% - tramp-handle-insert-file-contents > 14611 71% - file-local-copy > 14611 71% - tramp-file-name-handler > 14611 71% - apply > 14611 71% - tramp-sh-file-name-handler > 14611 71% - tramp-sh-handle-file-local-copy > 14611 71% - tramp-barf-unless-okay > 14611 71% - tramp-send-command-and-check > 14611 71% - tramp-send-command > 14611 71% - tramp-wait-for-output > 14611 71% - tramp-wait-for-regexp > 14611 71% - sit-for > 14611 71% - redisplay_internal (C function) > 14574 71% - eval > 14574 71% - project-mode-line-format This is unfortune. sit-for should not trigger a redisplay. Does the appended patch in tramp.el helps? Best regards, Michael. > At the moment I disabled the project-mode-line. However There may be > a better solutions for this issue. > > Best, > Ergus Best regards, Michael.