Dave Abrahams <[email protected]> writes:

> Hi Michael,

Hi Dave,

> It's fairly common that even after tramp-cleanup-all-connections, I am
> left with lots of buffers (especially Gnus buffers!) whose buffer-local
> default-directory is set to a tramp path.  This causes all kinds of
> problems, especially if I've disconnected from the network where those
> paths could be reached.  I was thinking it might be a good idea to add
> something like this to tramp-cleanup-all-connections:
>
> --8<---------------cut here---------------start------------->8---
> (dolist (b (buffer-list))
>         (with-current-buffer b
>           (when (tramp-tramp-file-p default-directory)
>             (setq default-directory user-emacs-directory)
>             )))
> --8<---------------cut here---------------end--------------->8---

But this would also alter other buffers, which are still useful (like
dired buffers etc). For those buffers, it would be fatal if
`default-directory' would have been faked.

That's why there is another command `tramp-cleanup-all-buffers'. This
command deletes all buffers which have a remote buffer name. We could
also delete buffers with a remote `default-directory'.

WDYT?

Best regards, Michael.

_______________________________________________
Tramp-devel mailing list
[email protected]
https://lists.gnu.org/mailman/listinfo/tramp-devel

Reply via email to