From: Emanuel Berg <incal@dataswamp.org>
To: help-gnu-emacs@gnu.org
Subject: Tramp crazy, starts automatically on startup
Date: Sun, 14 Aug 2022 01:49:21 +0200 [thread overview]
Message-ID: <874jyfbt6m.fsf@dataswamp.org> (raw)
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
next reply other threads:[~2022-08-13 23:49 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-08-13 23:49 Emanuel Berg [this message]
2022-08-14 8:24 ` Tramp bashing (was: Tramp crazy, starts automatically on startup) Michael Albinus
2022-08-14 18:04 ` Emanuel Berg
2022-08-15 4:32 ` tomas
2022-08-15 4:47 ` Emanuel Berg
2022-08-15 8:19 ` Tramp bashing Michael Albinus
2022-08-15 10:59 ` Emanuel Berg
2022-08-15 13:03 ` Michael Albinus
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=874jyfbt6m.fsf@dataswamp.org \
--to=incal@dataswamp.org \
--cc=help-gnu-emacs@gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).