9

I have an issue where if I try to perform some random Emacs operations such as org-capture, or renaming a file to a different (local) directory in dired, Emacs attempts to contact a different machine using tramp, presumably for some sort of auto-completion or history reasoning. This causes a lot of hanging and waiting, because the machine tramp is trying to connect to is not available.

How can I prevent Emacs from looking up tramp files/locations when I perform other rudimentary operations? How can I determine where and how Emacs is getting the idea that it needs to look inside a remote file/location for operations like org-capture and dired-do-rename?

Drew
  • 75,699
  • 9
  • 109
  • 225
Lee H
  • 2,697
  • 1
  • 16
  • 31
  • Assuming that there is a short delay before Emacs starts to contact a remote machine when you try to rename a file in Dired, try pressing `C-f` right after you hit `R`. Does that help? – itsjeyd Oct 07 '14 at 09:23
  • The behaviour you're describing is not one I've ever experienced. Could you provide a minimal example? – Malabarba Oct 10 '14 at 12:38
  • I have experienced this behaviour before but with using helm as the completing read. I don't experience this with ido for example. – Gambo Oct 29 '14 at 10:22
  • This question describes behavior that cannot be reproduced and is thus unlikely to help future visitors. If you can reproduce it, please edit the question to describe how. – Gilles 'SO- stop being evil' Oct 30 '14 at 21:53
  • 1
    If you have recentf enabled it may try to connect to remote machines. I've got the following in my init.el file. `(setq recentf-exclude '("~$" "/tmp/" "/ssh:" "/sudo:"))` I set this up several years ago. Having remote files in the recent file list was causing me some problems but I don't remember the details. You may have to remove all remote files from the recent file list manually. Its location is defined by the variable `recentf-save-file`. – Colin Bell Nov 11 '14 at 05:34
  • 1
    Try enabling `debug-on-quit` by doing `M-x`toggle-debug-on-quit`RET` and then press `C-g` when emacs hangs. It would print a stacktrace, it might help debugging the problem – Iqbal Ansari Dec 27 '14 at 13:03
  • instrument the function `dired-do-rename` by using `M-x edebug-defun` and go step by step by pressing `n`. you will get the culprit who added tramp hook.... – Madhavan Feb 27 '15 at 09:22

1 Answers1

2

I suspect that some code kicks in, due to a hook or advise, which should be using remote-file-p instead of tramp-tramp-file-p. Read the documentation of both and then grep the installed packages for the latter symbol, replacing it were appropriate. If that fixes the issue, start opening pull requests.

tarsius
  • 25,298
  • 4
  • 69
  • 109