unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: Ami Fischman <ami@fischman.org>
To: Stefan Monnier <monnier@iro.umontreal.ca>
Cc: emacs-devel@gnu.org
Subject: Re: bug with automount-dir-prefix handling in abbreviate-file-name
Date: Thu, 6 Aug 2009 11:39:31 -0700	[thread overview]
Message-ID: <9aa0cfde0908061139tdf0851dlfddcad826c24af1a@mail.gmail.com> (raw)
In-Reply-To: <jwvskg424wm.fsf-monnier+emacs@gnu.org>

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<monnier@iro.umontreal.ca> 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	other threads:[~2009-08-06 18:39 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-08-06 16:35 bug with automount-dir-prefix handling in abbreviate-file-name Ami Fischman
2009-08-06 16:58 ` Andreas Schwab
2009-08-06 17:07   ` Ami Fischman
2009-08-06 18:09 ` Stefan Monnier
2009-08-06 18:39   ` Ami Fischman [this message]
2009-08-07  4:45     ` Stefan Monnier
2009-08-07  8:54       ` Andreas Schwab
2009-08-07 14:20         ` Ami Fischman

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=9aa0cfde0908061139tdf0851dlfddcad826c24af1a@mail.gmail.com \
    --to=ami@fischman.org \
    --cc=emacs-devel@gnu.org \
    --cc=monnier@iro.umontreal.ca \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).