12

I was trying out tramp-mode, but now I cannot seem to get rid of it.. Whenever I start emacs, it spends about 20 seconds going through various tramp-related initialisations..

tramp: Waiting 60s for prompt from remote shell
tramp: Setting up remote shell environment

..and so on.

How on earth do I unload tramp? grep'ing my ~/.emacs.d found nothing aside from the plugin itself (which doesn't seem to be loaded anywhere..)

I've cleared the recent-files history, but that made no difference..

3
  • 6
    Other things to check: if you have desktop.el enabled, or perhaps custom.el settings? I'd start inserting (message "here") lines in your .emacs and checking the Messages buffer to track down where in your .emacs the tramp is starting. Commented May 19, 2009 at 3:44
  • 1
    Do you byte-compile your .emacs? Perhaps you forgot to re-compile after removing tramp then? Commented May 19, 2009 at 5:23
  • Trey: the messages buffer tip helped, thanks!
    – dbr
    Commented May 19, 2009 at 14:57

4 Answers 4

19

Aha, I found where tramp was being loaded:

Loading /Users/dbr/.recentf...done
Loading tramp-mode..

I had a two files in my ~/.recentf file-history which were opened with tramp, removing them stops tramp from loading..

I just found this section of the emacs wiki explaining the problem,

When using TrampMode with recentf.el, it’s advisable to turn off the cleanup feature of recentf that attempts to stat all the files and remove them from the recently accessed list if they are readable. Tramp means that this requires recentf to open up a remote site which will block your emacs process at the most inopportune times.

(require 'recentf)
(setq recentf-auto-cleanup 'never) ;; disable before we start recentf!
(recentf-mode 1)
1
6

Another possibility is a listing in ~/.ido.last, if you are using ido-mode. In that case, the remedy is just "rm ~/.ido.last".

3

It sounds to me like you have a file that is opened via tramp and is being reopened at startup. Have to set emacs to restore your session?

1
  • Nope, the only buffers that appear on startup are messages and scratch, and the tramp processes (one ssh and one scp)
    – dbr
    Commented May 19, 2009 at 14:00
2

From the tramp faq:

How can I disable tramp?

Shame on you, why did you read until now?

If you just want to have Ange-FTP as default remote files access package, you should > apply the following code:

     (setq tramp-default-method "ftp")

Unloading tramp can be achieved by applying M-x tramp-unload-tramp. This resets also > the Ange-FTP plugins.

Note that I haven't tried this but hope it works for you!

1
  • 1
    Hm, nope, (setq tramp-default-method "ftp") doesn't seem to make any difference, neither does M-x tramp-unload-tramp (Well, it might unload it from memory, but not from startup)
    – dbr
    Commented May 19, 2009 at 13:59

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.