Sometimes, the file of a TRAMP buffer in #emacs can no longer be reached (because the host went down). It’s a bit tricky to kill the buffer, TRAMP will attempt a futile connection on kill-buffer
. Same for tramp-cleanup-all-buffers
.
Solution: remove the backing file from the buffer before killing it.
Visit the buffer, and then run with M-x eval-expression
:
(set-visited-file-name nil)
Now you should be able to kill the buffer.