views:

652

answers:

4

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..

+2  A: 

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!

Michael Havas
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
+2  A: 

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?

Singletoned
Nope, the only buffers that appear on startup are messages and scratch, and the tramp processes (one ssh and one scp)
dbr
+4  A: 

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)
dbr
Also see: http://stackoverflow.com/questions/2068697/emacs-is-slow-opening-recent-files, where the recommended solution is (setq recentf-keep '(file-remote-p file-readable-p))
Leo Alekseyev
A: 

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

Erin Keenan