Dave Abrahams | 13 Jun 2012 17:29
Picon
Picon
Favicon
Gravatar

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


Enter your bug report in this message, including as much detail
as you possibly can about the problem, what you did to cause it
and what the local and remote machines are.

If you can give a simple set of instructions to make this bug
happen reliably, please include those.  Thank you for helping
kill bugs in Tramp.

Before reproducing the bug, you might apply

  M-x tramp-cleanup-all-connections

This allows to investigate from a clean environment.  Another
useful thing to do is to put

  (setq tramp-verbose 9)

in the ~/.emacs file and to repeat the bug.  Then, include the
contents of the *tramp/foo* buffer and the *debug tramp/foo*
buffer in your bug report.

--bug report follows this line--

Hi Michael,

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
(Continue reading)

Michael Albinus | 14 Jun 2012 11:03
Picon
Picon
Gravatar

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

Dave Abrahams <dave <at> boostpro.com> 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?
(Continue reading)

Dave Abrahams | 14 Jun 2012 16:51
Picon
Picon
Favicon
Gravatar

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


on Thu Jun 14 2012, Michael Albinus <michael.albinus-AT-gmx.de> wrote:

> Dave Abrahams <dave <at> boostpro.com> 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'. 

(Continue reading)

Michael Albinus | 14 Jun 2012 17:38
Picon
Picon
Gravatar

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

Dave Abrahams <dave <at> boostpro.com> writes:

Hi Dave,

>> 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.
>
> Deleting them would be bad in many circumstances, e.g. if they are Gnus
> buffers.

So we have a conflict, 'cause faking the default directory would also
hit buffers I do not want to change this way in my use case.

Wouldn't it be better to ask the Gnus folks to use a local default
directory for their buffers? Like this:

(let ((default-directory user-emacs-directory))
 ...)

Best regards, Michael.
Dave Abrahams | 16 Jun 2012 06:16
Picon
Picon
Favicon
Gravatar

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


on Thu Jun 14 2012, Michael Albinus <michael.albinus-AT-gmx.de> wrote:

> Dave Abrahams <dave <at> boostpro.com> writes:
>
> Hi Dave,
>
>>> 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.
>>
>> Deleting them would be bad in many circumstances, e.g. if they are Gnus
>> buffers.
>
> So we have a conflict, 'cause faking the default directory would also
> hit buffers I do not want to change this way in my use case.

Even if it's just tied to cleanup-all-buffers?

> Wouldn't it be better to ask the Gnus folks to use a local default
> directory for their buffers? Like this:
>
> (let ((default-directory user-emacs-directory))
>  ...)

Hahaha.  The funny thing is, the Gnus folks don't seem to think it's
their business to solve this problem either.  See
http://debbugs.gnu.org/cgi/bugreport.cgi?bug=11666

--

-- 
(Continue reading)

Michael Albinus | 16 Jun 2012 09:42
Picon
Picon
Gravatar

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

Dave Abrahams <dave <at> boostpro.com> writes:

Hi Dave,

>> So we have a conflict, 'cause faking the default directory would also
>> hit buffers I do not want to change this way in my use case.
>
> Even if it's just tied to cleanup-all-buffers?

That might be possible. But it's still a second class solution, 'cause
Tramp would change configuration done by other packages. I have a bad
feeling.

>> Wouldn't it be better to ask the Gnus folks to use a local default
>> directory for their buffers? Like this:
>>
>> (let ((default-directory user-emacs-directory))
>>  ...)
>
> Hahaha.  The funny thing is, the Gnus folks don't seem to think it's
> their business to solve this problem either.  See
> http://debbugs.gnu.org/cgi/bugreport.cgi?bug=11666

I haven't seen this; I don't follow gnus bugs per default. I will hook
into this discussion, let's see. Thanks for the pointer.

Best regards, Michael.
Michael Albinus | 16 Jun 2012 10:30
Picon
Picon
Gravatar

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

Michael Albinus <michael.albinus <at> gmx.de> writes:

>> Hahaha.  The funny thing is, the Gnus folks don't seem to think it's
>> their business to solve this problem either.  See
>> http://debbugs.gnu.org/cgi/bugreport.cgi?bug=11666
>
> I haven't seen this; I don't follow gnus bugs per default. I will hook
> into this discussion, let's see. Thanks for the pointer.

Before I go: have you tried Lars' recommendation to set
`gnus-default-directory' to a local directory? Are there still problems?

Best regards, Michael.
Dave Abrahams | 17 Jun 2012 15:26
Picon
Picon
Favicon
Gravatar

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


on Sat Jun 16 2012, Michael Albinus <michael.albinus-AT-gmx.de> wrote:

> Michael Albinus <michael.albinus <at> gmx.de> writes:
>
>>> Hahaha.  The funny thing is, the Gnus folks don't seem to think it's
>>> their business to solve this problem either.  See
>>> http://debbugs.gnu.org/cgi/bugreport.cgi?bug=11666
>>
>> I haven't seen this; I don't follow gnus bugs per default. I will hook
>> into this discussion, let's see. Thanks for the pointer.
>
> Before I go: have you tried Lars' recommendation to set
> `gnus-default-directory' to a local directory? Are there still problems?

Huh, somehow I missed that suggestion.  I'll try it.  My guess is that
the problems will be greatly reduced, but also that they will crop up
from time-to-time.  I'm not sure whether that would be often enough to
cause me to complain again, though ;-)

--

-- 
Dave Abrahams
BoostPro Computing
http://www.boostpro.com
Michael Albinus | 17 Jun 2012 20:20
Picon
Picon
Gravatar

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

Dave Abrahams <dave <at> boostpro.com> writes:

> Huh, somehow I missed that suggestion.  I'll try it.  My guess is that
> the problems will be greatly reduced, but also that they will crop up
> from time-to-time.  I'm not sure whether that would be often enough to
> cause me to complain again, though ;-)

But it would be a good reason to ask the gnus folks for proper use of
`gnus-default-directory', if they don't.

And for the other cases we'll see. Stand up, when Tramp annoys you!

Best regards, Michael.
Dave Abrahams | 17 Jun 2012 22:05
Picon
Picon
Favicon
Gravatar

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


on Sun Jun 17 2012, Michael Albinus <michael.albinus-AT-gmx.de> wrote:

> Dave Abrahams <dave <at> boostpro.com> writes:
>
>> Huh, somehow I missed that suggestion.  I'll try it.  My guess is that
>> the problems will be greatly reduced, but also that they will crop up
>> from time-to-time.  I'm not sure whether that would be often enough to
>> cause me to complain again, though ;-)
>
> But it would be a good reason to ask the gnus folks for proper use of
> `gnus-default-directory', if they don't.

What do you consider "proper" in this case?  Do you think you might ask,
if you are clear on what the right behavior is.

> And for the other cases we'll see. Stand up, when Tramp annoys you!

As you know, I never hesitate.  Google found quite an impressive series
of reports from me about this particular problem over the past few
years!

Best Regards,
--

-- 
Dave Abrahams
BoostPro Computing
http://www.boostpro.com
Michael Albinus | 4 Jul 2012 08:28
Picon
Picon
Gravatar

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

Dave Abrahams <dave <at> boostpro.com> writes:

Hi Dave,

during my monthly check of the SPAM folder, I've found your message. No
idea why my provider believes you belong to, hopefully they don't
continue to handle you so.

>> But it would be a good reason to ask the gnus folks for proper use of
>> `gnus-default-directory', if they don't.
>
> What do you consider "proper" in this case?  Do you think you might ask,
> if you are clear on what the right behavior is.

Yes. For every single process-file call, they shall wrap it by

(let ((default-directory (or gnus-default-directory default-directory)))
  (process-file ...))

Hopefully, they do. Have you tried to check, whether 

(setq gnus-default-directory "/tmp")

or something similar works for you?

> Best Regards,

Best regards, Michael.
Dave Abrahams | 21 Jul 2012 18:21
Picon
Picon
Favicon
Gravatar

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


on Wed Jul 04 2012, Michael Albinus <michael.albinus-AT-gmx.de> wrote:

> Dave Abrahams <dave <at> boostpro.com> writes:
>
> Hi Dave,
>
> during my monthly check of the SPAM folder, I've found your message. No
> idea why my provider believes you belong to, hopefully they don't
> continue to handle you so.
>
>>> But it would be a good reason to ask the gnus folks for proper use of
>>> `gnus-default-directory', if they don't.
>>
>> What do you consider "proper" in this case?  Do you think you might ask,
>> if you are clear on what the right behavior is.
>
> Yes. For every single process-file call, they shall wrap it by
>
> (let ((default-directory (or gnus-default-directory default-directory)))
>   (process-file ...))
>
> Hopefully, they do. Have you tried to check, whether 
>
> (setq gnus-default-directory "/tmp")
>
> or something similar works for you?

I customized it to "~" and I haven't been seeing the problem since.

(Continue reading)

Thierry Volpiatto | 21 Jul 2012 18:46
Picon
Gravatar

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

Dave Abrahams <dave <at> boostpro.com> writes:

> on Wed Jul 04 2012, Michael Albinus <michael.albinus-AT-gmx.de> wrote:
>
>> Dave Abrahams <dave <at> boostpro.com> writes:
>>
>> Hi Dave,
>>
>> during my monthly check of the SPAM folder, I've found your message. No
>> idea why my provider believes you belong to, hopefully they don't
>> continue to handle you so.
>>
>>>> But it would be a good reason to ask the gnus folks for proper use of
>>>> `gnus-default-directory', if they don't.
>>>
>>> What do you consider "proper" in this case?  Do you think you might ask,
>>> if you are clear on what the right behavior is.
>>
>> Yes. For every single process-file call, they shall wrap it by
>>
>> (let ((default-directory (or gnus-default-directory default-directory)))
>>   (process-file ...))
>>
>> Hopefully, they do. Have you tried to check, whether 
>>
>> (setq gnus-default-directory "/tmp")
>>
>> or something similar works for you?
>
> I customized it to "~" and I haven't been seeing the problem since.
(Continue reading)

Michael Albinus | 22 Jul 2012 12:13
Picon
Picon
Gravatar

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

Dave Abrahams <dave <at> boostpro.com> writes:

> on Wed Jul 04 2012, Michael Albinus <michael.albinus-AT-gmx.de> wrote:
>
>> Dave Abrahams <dave <at> boostpro.com> writes:
>>
>> Hi Dave,
>>
>> during my monthly check of the SPAM folder, I've found your message. No
>> idea why my provider believes you belong to, hopefully they don't
>> continue to handle you so.
>>
>>>> But it would be a good reason to ask the gnus folks for proper use of
>>>> `gnus-default-directory', if they don't.
>>>
>>> What do you consider "proper" in this case?  Do you think you might ask,
>>> if you are clear on what the right behavior is.
>>
>> Yes. For every single process-file call, they shall wrap it by
>>
>> (let ((default-directory (or gnus-default-directory default-directory)))
>>   (process-file ...))
>>
>> Hopefully, they do. Have you tried to check, whether 
>>
>> (setq gnus-default-directory "/tmp")
>>
>> or something similar works for you?
>
> I customized it to "~" and I haven't been seeing the problem since.
(Continue reading)

Dave Abrahams | 27 Jul 2012 17:42
Picon
Picon
Favicon
Gravatar

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


on Sun Jul 22 2012, Michael Albinus <michael.albinus-AT-gmx.de> wrote:

> Dave Abrahams <dave <at> boostpro.com> writes:
>
>> on Wed Jul 04 2012, Michael Albinus <michael.albinus-AT-gmx.de> wrote:
>>
>>> Dave Abrahams <dave <at> boostpro.com> writes:
>>>
>>> Hi Dave,
>>>
>>> during my monthly check of the SPAM folder, I've found your message. No
>>> idea why my provider believes you belong to, hopefully they don't
>>> continue to handle you so.
>>>
>>>>> But it would be a good reason to ask the gnus folks for proper use of
>>>>> `gnus-default-directory', if they don't.
>>>>
>>>> What do you consider "proper" in this case?  Do you think you might ask,
>>>> if you are clear on what the right behavior is.
>>>
>>> Yes. For every single process-file call, they shall wrap it by
>>>
>>> (let ((default-directory (or gnus-default-directory default-directory)))
>>>   (process-file ...))
>>>
>>> Hopefully, they do. Have you tried to check, whether 
>>>
>>> (setq gnus-default-directory "/tmp")
>>>
(Continue reading)


Gmane