Subject: Re: bug#11666: default-directory

From: Dave Abrahams <[email-masked]>
Date: Sun, 10 Jun 2012 21:48:42 -0400

on Sun Jun 10 2012, Lars Magne Ingebrigtsen <larsi-AT-gnus.org> wrote:

> Dave Abrahams <[email-masked]> writes:
>
>>> I can't really imagine how Gnus would set the default directory in any
>>> of its buffers to a TRAMP path by itself...
>>
>> I'm sure it doesn't do anything "by itself" :-).  Maybe something
>> changes the global definition of default-directory, or dynamic scoping
>> is unexpectedly getting in the way.
>
> I see that all it takes is that you go to a tramp buffer and then say
> `M-x gnus' for all the Gnus process buffers to get that as the default
> directory.

Sounds about right.

> That's probably not very nice.  

Prolly not :-).

I think there are also circumstances where gnus *acquires* some
not-very-nice default-directory setting after it's already running.
It's possible that just happens via `M-x gnus' when the *Group* buffer
already exists --- I do that fairly often --- but I have the sense that
it has happened via subtler means.

> But would binding `default-directory' to "/" (or something) for the
> Gnus process buffers be the right thing?  

Why not?

> Would that work?

I think so.  How about binding it to something that is pretty much
guaranteed to exist as long as Emacs is running, say, the user's home
directory or user-emacs-directory?

> I have a feeling that this might be one of those "don't do that, then"
> things.

That'd be a shame; it bites me all the time.  I can't see any reason not
to eliminate pitfalls for the unwary user.

-- 
Dave Abrahams
BoostPro Computing
http://www.boostpro.com