bug-gnu-emacs
[Top][All Lists]
Advanced

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

bug#10928: 24.0.94; dired-mode on /proj/foo/bar gives error : dir-locals


From: Vardhan Varma
Subject: bug#10928: 24.0.94; dired-mode on /proj/foo/bar gives error : dir-locals-read-from-file: Opening input file: No such file or directory, /proj/.dir-locals.el
Date: Mon, 5 Mar 2012 18:25:01 +0800

hi Glenn,

> > On the machine, '/proj' is a nfs mounted directory .. if it helps
you !
> 
> I tried with an nfs-mounted /proj, it still works for me.
> Does this only happen with directories literally called "/proj"?
> 

 Yes, this is happening only with directories and files inside the
'/proj/' tree.

 
> > I also got following message on trying to open a file:
> > Directory-local variables error: (file-error "Opening input file"
"No
> > such file or directory" "/proj/.dir-locals.el")
> 
> What does
> 
> ls -l /proj/.dir-locals.el
> 
> say in a shell?

Thanx for asking .. suddenly i'm enlightned ...
$  ls -l /proj/.dir-locals.el
ls: /proj/.dir-locals.el: No such file or directory
$  ls -dl /proj/.dir-locals.el
dr-xr-xr-x 2 root root 0 Jan  5 02:33 /proj/.dir-locals.el

To me, it looks like the automount is playing some tricks .. initially
it tells emacs that this exists 
and when emacs tries to read it .. it tells that it doesn't exist ... or
something like that ...

And i'm sorry for giving partial info .. /proj is nfs and is auto
mounted..

Here is the strace of calls that emacs is doing ...
stat("/proj/foo/bar/qux/.dir-locals.el", 0x7fff6e27f590) = -1 ENOENT (No
such file or directory)
stat("/proj/foo/bar/.dir-locals.el", 0x7fff6e27f590) = -1 ENOENT (No
such file or directory)
stat("/proj/foo/.dir-locals.el", 0x7fff6e27f590) = -1 ENOENT (No such
file or directory)
stat("/proj/.dir-locals.el", {st_mode=S_IFDIR|0555, st_size=0, ...}) = 0
stat("/proj/.dir-locals.el", {st_mode=S_IFDIR|0555, st_size=0, ...}) = 0
open("/proj/.dir-locals.el", O_RDONLY)  = -1 ENOENT (No such file or
directory)
stat("/proj/foo/bar/.dir-locals.el", 0x7fff6e27fb80) = -1 ENOENT (No
such file or directory)
stat("/proj/foo/.dir-locals.el", 0x7fff6e27fb80) = -1 ENOENT (No such
file or directory)
stat("/proj/.dir-locals.el", {st_mode=S_IFDIR|0555, st_size=0, ...}) = 0
stat("/proj/.dir-locals.el", {st_mode=S_IFDIR|0555, st_size=0, ...}) = 0
open("/proj/.dir-locals.el", O_RDONLY)  = -1 ENOENT (No such file or
directory)


> 
> What does
> 
> emacs -Q
> 
> M-: (dir-locals-find-file "/proj/foo/bar") RET
> 
> return?
> 
"/proj/.dir-locals.el"

===
 I think this behaviour is quirk of automounting. Just for the record, 

$ cat /etc/redhat-release
Red Hat Enterprise Linux Client release 5.6 (Tikanga)
 : 15:45:39 : /home/vardhan
$ rpm -qa | grep autofs
autofs-5.0.1-0.rc2.148.bz667273.1.el5

Glenn,
  thanx a lot for helping me in finding this.
  This is a unique case, where '/proj/' is an automounted directory,
  and it's hightly improbable that lot of people will hit it !

  It's up to you ... if you think some change can be done in emacs or
dired.el !

Thanx a lot
-Vardhan
  

      


This email and any attachments are intended for the sole use of the named 
recipient(s) and contain(s) confidential information that may be proprietary, 
privileged or copyrighted under applicable law. If you are not the intended 
recipient, do not read, copy, or forward this email message or any attachments. 
Delete this email message and any attachments immediately.







reply via email to

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