[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Tramp crazy, starts automatically on startup
From: |
Emanuel Berg |
Subject: |
Tramp crazy, starts automatically on startup |
Date: |
Sun, 14 Aug 2022 01:49:21 +0200 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (gnu/linux) |
Tramp has gone crazy, it starts automatically on startup!
Here is some other poor soul having the same issue, what he
uses tho and how he solves, that doesn't ring a bell.
"Very annoying" no kidding, what IS this???
Tramp tries to connect to remote hosts on emacs startup
This happens when you used ido to browse directories on
a remote host and it saved them in `ido-dir-file-cache`.
Ido will then save this cache to
`ido-save-directory-list-file` which is loaded when emacs
starts up. You can use the following code to clean the cache
of tramp entries when emacs quits:
(defun ido-remove-tramp-from-cache nil
"Remove any TRAMP entries from `ido-dir-file-cache'.
This stops tramp from trying to connect to remote hosts on emacs startup,
which can be very annoying."
(interactive)
(setq ido-dir-file-cache
(cl-remove-if
(lambda (x)
(string-match
"/\\(rsh\\|ssh\\|telnet\\|su\\|sudo\\|sshx\\|krlogin\\|ksu\\|rcp\\|scp\\|rsync\\|scpx\\|fcp\\|nc\\|ftp\\|smb\\|adb\\):"
(car x)))
ido-dir-file-cache)))
;; redefine `ido-kill-emacs-hook' so that cache is cleaned before being saved
(defun ido-kill-emacs-hook ()
(ido-remove-tramp-from-cache)
(ido-save-history))
https://www.emacswiki.org/emacs/TrampMode
--
underground experts united
https://dataswamp.org/~incal
- Tramp crazy, starts automatically on startup,
Emanuel Berg <=