Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Stop tramp-mode running on emacs' startup

Tags:

emacs

tramp

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

like image 845
dbr Avatar asked May 19 '09 01:05

dbr


4 Answers

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)
like image 78
dbr Avatar answered Oct 20 '22 17:10

dbr


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

like image 43
Erin Keenan Avatar answered Oct 20 '22 17:10

Erin Keenan


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?

like image 40
Singletoned Avatar answered Oct 20 '22 16:10

Singletoned


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!

like image 42
Michael Havas Avatar answered Oct 20 '22 16:10

Michael Havas