emacs-devel
[Top][All Lists]
Advanced

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

Re: bug with automount-dir-prefix handling in abbreviate-file-name


From: Ami Fischman
Subject: Re: bug with automount-dir-prefix handling in abbreviate-file-name
Date: Thu, 6 Aug 2009 11:39:31 -0700

Me being confused is a very likely possibility.

Many people still use automounters in corporate and academic
environments, where /home is likely an NFS automounter that makes
people's home directories available on demand from any machine they
happen to log onto, on a potentially worldwide network.  Latency in
such a network can be significant enough to be a real annoyance.

I started using automount-dir-prefix a while ago (~1 year?) because it
solved a particular problem: various emacs packages walk up the
directory tree searching for specific files and directories (things
like project settings, aka dir-locals-file).  Before adding
automount-dir-prefix, this would result in emacs speculatively asking
the NFS server about the existence of paths like /home/.dir-locals.el,
which could take several seconds to complete (the automounter may
consider mounting directories all over the world to satisfy various
requests).  Adding the path to automount-dir-prefix made these
annoying periodic pauses go away.  Looking at the current files.el
now, it looks like locate-dominating-file may have been reimplemented
to deal with this issue precisely, using
locate-dominating-stop-dir-regexp.  In fact it looks like you're the
one who did it 
(http://git.savannah.gnu.org/cgit/emacs.git/commit/?id=db8475d9dd2b674318c88e8dc09da3549596bd5d).
 Thanks!

I suspect that automount-dir-prefix was meant to address some other
problem that possibly manifested only in older automounters, but I've
been unable to find evidence to back this up.  Can you explain more
explicitly what that behavior was and what the variable is actually
meant to do?

Cheers,
-a

On Thu, Aug 6, 2009 at 11:09 AM, Stefan Monnier<address@hidden> wrote:
>> The default value of automount-dir-prefix is "^/tmp_mnt/" implying
>> that the prefix should have a trailing slash.  But using "^/home/" as
>> the prefix such as in:
>> (let ((automount-dir-prefix "^/home/"))
>>   (find-file "~/"))
>> results in an error:
>
> ¿¡¿Why would you want to set automount-dir-prefix to such a value?!?
>
> I think you're confused.  Most likely you don't need
> automount-dir-prefix (few people use automounters nowadays, and all
> automounters I know don't use anything like the /tmp_mnt used back
> then).  If you've accidentally used a directory named /tmp_mnt, then I'd
> suggest you set automount-dir-prefix to something harmless like "\\'a".
>
>
>        Stefan
>




reply via email to

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