[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: tramp (2.2.5-pre); Lingering default-directory causing damage

From: Michael Albinus
Subject: Re: tramp (2.2.5-pre); Lingering default-directory causing damage
Date: Thu, 14 Jun 2012 11:03:34 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.1.50 (gnu/linux)

Dave Abrahams <address@hidden> 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'.


Best regards, Michael.

reply via email to

[Prev in Thread] Current Thread [Next in Thread]