unofficial mirror of help-gnu-emacs@gnu.org
 help / color / mirror / Atom feed
* Tramp crazy, starts automatically on startup
@ 2022-08-13 23:49 Emanuel Berg
  2022-08-14  8:24 ` Tramp bashing (was: Tramp crazy, starts automatically on startup) Michael Albinus
  0 siblings, 1 reply; 8+ messages in thread
From: Emanuel Berg @ 2022-08-13 23:49 UTC (permalink / raw)
  To: help-gnu-emacs

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




^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2022-08-15 13:03 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-08-13 23:49 Tramp crazy, starts automatically on startup Emanuel Berg
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

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