GNU bug report logs - #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

Previous Next

Package: emacs;

Reported by: Vardhan Varma <vardhan.varma <at> xilinx.com>

Date: Fri, 2 Mar 2012 16:38:01 UTC

Severity: normal

Tags: notabug

Found in version 24.0.94

Fixed in version 24.0.95

Done: Glenn Morris <rgm <at> gnu.org>

Bug is archived. No further changes may be made.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 10928 in the body.
You can then email your comments to 10928 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to bug-gnu-emacs <at> gnu.org:
bug#10928; Package emacs. (Fri, 02 Mar 2012 16:38:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to Vardhan Varma <vardhan.varma <at> xilinx.com>:
New bug report received and forwarded. Copy sent to bug-gnu-emacs <at> gnu.org. (Fri, 02 Mar 2012 16:38:02 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Vardhan Varma <vardhan.varma <at> xilinx.com>
To: <bug-gnu-emacs <at> gnu.org>
Subject: 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: Fri, 2 Mar 2012 18:45:35 +0800
[Message part 1 (text/plain, inline)]
Problem:

  Opening dired-mode on a directory which starts with '/proj/' give

  following error :

 

dir-locals-read-from-file: Opening input file: No such file or
directory, /proj/.dir-locals.el

 

  After this, the buffer comes out blank.

  Pressing 'g' in the buffer displays the dired-mode properly

 

-Thanx

 

 

 

 

 

 

In GNU Emacs 24.0.94.1 (x86_64-unknown-linux-gnu, GTK+ Version 2.10.4)

of 2012-03-02 on _machine_name_

Configured using:

`configure '--prefix=/scratch/sw' 'CFLAGS=-I/scratch/sw/include'

'LDFLAGS=-L/scratch/sw/lib''

 

Important settings:

  value of $LC_ALL: nil

  value of $LC_COLLATE: nil

  value of $LC_CTYPE: nil

  value of $LC_MESSAGES: nil

  value of $LC_MONETARY: nil

  value of $LC_NUMERIC: nil

  value of $LC_TIME: nil

  value of $LANG: nil

  value of $XMODIFIERS: nil

  locale-coding-system: nil

  default enable-multibyte-characters: t

 

Major mode: Fundamental

 

Minor modes in effect:

  tooltip-mode: t

  mouse-wheel-mode: t

  tool-bar-mode: t

  menu-bar-mode: t

  file-name-shadow-mode: t

  global-font-lock-mode: t

  auto-composition-mode: t

  auto-encryption-mode: t

  auto-compression-mode: t

  line-number-mode: t

  transient-mark-mode: t

 

Recent input:

ESC [ > 0 ; 1 3 6 ; 0 c C-x C-f / p r o j / m i g RET

C-x b * M e s TAB RET ESC x r e p o TAB TAB r TAB -

TAB RET d i r s - l o c a l RET ESC O B ESC O B ESC

O B ESC O B ESC O C ESC O C ESC O C RET ESC O A ESC

O B RET ESC O A ESC O B ESC x ESC O A C-e ESC DEL ESC

DEL ESC DEL ESC DEL TAB RET

 

Recent messages:

("emacs")

For information about GNU Emacs and the GNU system, type C-h C-a.

dir-locals-read-from-file: Opening input file: No such file or
directory, /proj/.dir-locals.el

Making completion list...

Using a proxy for http...

Contacting host: proxy:8080

Reporting new bug! [2 times]

 

Load-path shadows:

None found.

 

Features:

(shadow sort mail-extr wid-edit network-stream starttls url-cache

url-http tls url-gw url-auth url url-proxy url-privacy url-expand

url-methods url-history url-cookie url-util url-parse auth-source eieio

byte-opt bytecomp byte-compile cconv macroexp assoc gnus-util

password-cache url-vars mailcap emacsbug message format-spec rfc822 mml

mml-sec mm-decode mm-bodies mm-encode mail-parse rfc2231 mailabbrev

gmm-utils mailheader sendmail rfc2047 rfc2045 ietf-drums mm-util

mail-prsvr mail-utils help-mode easymenu view dired regexp-opt time-date

tooltip ediff-hook vc-hooks lisp-float-type mwheel x-win x-dnd tool-bar

dnd fontset image fringe lisp-mode register page menu-bar rfn-eshadow

timer select scroll-bar mouse jit-lock font-lock syntax facemenu

font-core frame cham georgian utf-8-lang misc-lang vietnamese tibetan

thai tai-viet lao korean japanese hebrew greek romanian slovak czech

european ethiopic indian cyrillic chinese case-table epa-hook

jka-cmpr-hook help simple abbrev minibuffer loaddefs button faces

cus-face files text-properties overlay sha1 md5 base64 format env

code-pages mule custom widget hashtable-print-readable backquote

make-network-process dbusbind dynamic-setting system-font-setting

font-render-setting move-toolbar gtk x-toolkit x multi-tty emacs)

 



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.

[Message part 2 (text/html, inline)]

Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#10928; Package emacs. (Fri, 02 Mar 2012 17:32:01 GMT) Full text and rfc822 format available.

Message #8 received at 10928 <at> debbugs.gnu.org (full text, mbox):

From: Glenn Morris <rgm <at> gnu.org>
To: Vardhan Varma <vardhan.varma <at> xilinx.com>
Cc: 10928 <at> debbugs.gnu.org
Subject: Re: 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: Fri, 02 Mar 2012 12:31:00 -0500
Vardhan Varma wrote:

>   Opening dired-mode on a directory which starts with '/proj/' give
>   following error :
>
> dir-locals-read-from-file: Opening input file: No such file or
> directory, /proj/.dir-locals.el

Thanks for the report, but I cannot reproduce this. I tried:

mkdir -p /proj/foo/bar
touch /proj/foo/bar/qux
emacs -Q
C-x d /proj/foo/bar RET

Please can you give a recipe starting from emacs -Q?

> In GNU Emacs 24.0.94.1 (x86_64-unknown-linux-gnu, GTK+ Version 2.10.4)




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#10928; Package emacs. (Fri, 02 Mar 2012 18:09:01 GMT) Full text and rfc822 format available.

Message #11 received at 10928 <at> debbugs.gnu.org (full text, mbox):

From: Vardhan Varma <vardhan.varma <at> xilinx.com>
To: Glenn Morris <rgm <at> gnu.org>
Cc: 10928 <at> debbugs.gnu.org
Subject: RE: 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: Sat, 3 Mar 2012 02:05:13 +0800
Hi Glenn Morris,

> 
> >   Opening dired-mode on a directory which starts with '/proj/' give
> >   following error :
> >
> > dir-locals-read-from-file: Opening input file: No such file or
> > directory, /proj/.dir-locals.el
> 
> Thanks for the report, but I cannot reproduce this. I tried:
> 
> mkdir -p /proj/foo/bar
> touch /proj/foo/bar/qux
> emacs -Q
> C-x d /proj/foo/bar RET
> 
> Please can you give a recipe starting from emacs -Q?
> 
> > In GNU Emacs 24.0.94.1 (x86_64-unknown-linux-gnu, GTK+ Version 2.10.

I again installed from emacs from :
-rw-r--r--  1 vardhan users 51251891 Feb 27 09:17 emacs-24.0.94.tar.gz

And run 'emacs -Q' and got the same message trying to access
/proj/foo/bar

On the machine, '/proj' is a nfs mounted directory .. if it helps you !

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")

But the file opens without any problem, and the message is only in
*Messages* buffer.

I looked in dired-x , and found variable enable-local-variables .

When i did a (set-variable 'enable-local-variables ()), i stopped
getting
these messages !!


If this doesn't help you in finding the problem,
I can try all the stuff on another machine

Thanx for the great work in developing emacs.

--
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.






Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#10928; Package emacs. (Fri, 02 Mar 2012 20:20:01 GMT) Full text and rfc822 format available.

Message #14 received at 10928 <at> debbugs.gnu.org (full text, mbox):

From: Glenn Morris <rgm <at> gnu.org>
To: Vardhan Varma <vardhan.varma <at> xilinx.com>
Cc: 10928 <at> debbugs.gnu.org
Subject: Re: 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: Fri, 02 Mar 2012 15:18:26 -0500
Vardhan Varma wrote:

> 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"?

> 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?


What does

emacs -Q

M-: (dir-locals-find-file "/proj/foo/bar") RET

return?




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#10928; Package emacs. (Mon, 05 Mar 2012 10:27:01 GMT) Full text and rfc822 format available.

Message #17 received at 10928 <at> debbugs.gnu.org (full text, mbox):

From: Vardhan Varma <vardhan.varma <at> xilinx.com>
To: Glenn Morris <rgm <at> gnu.org>
Cc: 10928 <at> debbugs.gnu.org
Subject: RE: 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.






Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#10928; Package emacs. (Tue, 06 Mar 2012 02:54:01 GMT) Full text and rfc822 format available.

Message #20 received at 10928 <at> debbugs.gnu.org (full text, mbox):

From: Glenn Morris <rgm <at> gnu.org>
To: Vardhan Varma <vardhan.varma <at> xilinx.com>
Cc: 10928 <at> debbugs.gnu.org
Subject: Re: 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, 05 Mar 2012 21:51:52 -0500
Vardhan Varma wrote:

> $  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

Is there really a /proj/.dir-locals.el directory (not file)?
(How does it have zero size - what is the file system?)
Can you just delete whatever that is?

It looks to me like your automounter is broken, because the above
sequence ought to be impossible, AIUI.

> 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 ...
[...]
> 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)

I don't understand what's going on there, but I made Emacs ignore
.dir-locals.el if it is a directory (or unreadable). I guess that will
fix your issue. But if /proj/.dir-locals.el was a weird file rather than
a weird directory, the same issue would occur. I don't think there would
anything Emacs could do about that.




Added tag(s) notabug. Request was from Glenn Morris <rgm <at> gnu.org> to control <at> debbugs.gnu.org. (Sat, 17 Mar 2012 01:24:02 GMT) Full text and rfc822 format available.

bug marked as fixed in version 24.0.95, send any further explanations to 10928 <at> debbugs.gnu.org and Vardhan Varma <vardhan.varma <at> xilinx.com> Request was from Glenn Morris <rgm <at> gnu.org> to control <at> debbugs.gnu.org. (Sat, 17 Mar 2012 01:24:02 GMT) Full text and rfc822 format available.

bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Sat, 14 Apr 2012 11:24:03 GMT) Full text and rfc822 format available.

This bug report was last modified 12 years and 8 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.