While running Emacs (24.3.1) with Tramp (2.2.6-24.3) on Ubuntu 12.10 I'll have a bunch of remote files open through Tramp for example:
m-x find-file: /scp:[email protected]:~/file.txt
After a suspend/resume cycle on my laptop I'll go back into Emacs and start working in an open buffer. Once I save or it autosaves it freezes, and will show an "args out of range(000 - 000)"(this message is from memory, the zeros represent numbers it shows will edit this next time I get it) error and not save. Any subsequent attempts will just hang.
Also I cannot open any other files using the same protocol in find-file, as in the case above 'scp'.
Some workarounds I have found are to first delete ~/.emacs.d/tramp file, which works sometimes, and there are times that it wasn't there after multiple suspend/resume cycles.
Another workaround is to use another protocol when opening files, so in the find-file line above I would use 'ssh' or 'scpc'. This is for only opening new buffers, not for saving current buffers, so I would usually close the file's buffer then reopen it using the different protocol I mentioned.
Any suggestions?
I haven't seen the "args out of range" error, but when I've had hangs after an interrupted connection I've been successful by killing the Tramp buffer for the protocol/host. It's generally named something like *tramp/scpc hostname*
. The next operation on the file buffer that requires communication reestablishes the connection.
This is really easy with ido-switch-buffer
because you can do it all in the mini-buffer - type a few letters to find the Tramp buffer and C-k to kill it.
An alternative (and perhaps cleaner) way to reset a connection is to use "M-x tramp-cleanup-this-connection":
tramp-cleanup-this-connection is an interactive autoloaded compiled Lisp function in `tramp-cmds.el'.
(tramp-cleanup-this-connection)
Flush all connection related objects of the current buffer's connection.
Also see "M-x tramp-cleanup-all-connections" and "M-x tramp-cleanup-all-buffers".
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With