unofficial mirror of help-gnu-emacs@gnu.org
 help / color / mirror / Atom feed
* .dir-locals/automount
@ 2015-02-24 17:20 HASM
  2015-02-24 21:08 ` .dir-locals/automount Glenn Morris
       [not found] ` <mailman.776.1424812114.31049.help-gnu-emacs@gnu.org>
  0 siblings, 2 replies; 3+ messages in thread
From: HASM @ 2015-02-24 17:20 UTC (permalink / raw)
  To: help-gnu-emacs


In my machine I have two automount points:
  /net -hosts
which allows me to go to
  /net/host/path/to/remote/file/on/host
and
  /smb (complicated automount map)
which allows me to to go
  /smb/windows_host/share/path/to/file/on/windows_host/share
the "complicated automount map" makes
  /smb/windows_host
another mount point of type autofs

In emacs 24.4.1 when I open
  /net/host/path/to/remote/file/on/host
things seem to work fine, when I try to open
  /smb/windows_host/share/path/to/file/on/windows_host/share
I get this error:
  Error reading dir-locals: (file-error "Read error" "is a directory" "/smb/.dir-locals.el")
Note that until first (auto)mount, neither /smb/windows_host nor
/smb/windows_host/share, exist on the system.

Setting the obsolete variable automount-dir-prefix as
  (setq automount-dir-prefix "^/smb/")
makes no difference.
Setting its replacement
  (setq directory-abbrev-alist '(("^/smb/" . "/"))
makes the opening fail.

What is the workaround for this?  (Works fine on xemacs ...)

-- HASM


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: .dir-locals/automount
  2015-02-24 17:20 .dir-locals/automount HASM
@ 2015-02-24 21:08 ` Glenn Morris
       [not found] ` <mailman.776.1424812114.31049.help-gnu-emacs@gnu.org>
  1 sibling, 0 replies; 3+ messages in thread
From: Glenn Morris @ 2015-02-24 21:08 UTC (permalink / raw)
  To: HASM; +Cc: help-gnu-emacs

HASM wrote:

>   /smb/windows_host/share/path/to/file/on/windows_host/share
> I get this error:
>   Error reading dir-locals: (file-error "Read error" "is a directory" "/smb/.dir-locals.el")

It's a message, not an error (unless you have debug-on-error non-nil).
It sounds like your smb share is returning weird file results.
See eg http://debbugs.gnu.org/10928

What do:

ls -l /smb/.dir-locals.el
ls -ld /smb/.dir-locals.el

return?

> Setting the obsolete variable automount-dir-prefix as
>   (setq automount-dir-prefix "^/smb/")
> makes no difference.
> Setting its replacement
>   (setq directory-abbrev-alist '(("^/smb/" . "/"))
> makes the opening fail.
>
> What is the workaround for this?  

Adding an entry for /smb to locate-dominating-stop-dir-regexp ought to
avoid the issue:

net\\|afs  ->  net\\|afs\\|smb

> (Works fine on xemacs ...)

XEmacs doesn't have directory local variables, does it?
For a slightly less antediluvian experience, you could revert to Emacs
22.3, which doesn't have them either. ;)



^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: .dir-locals/automount
       [not found] ` <mailman.776.1424812114.31049.help-gnu-emacs@gnu.org>
@ 2015-02-24 22:40   ` HASM
  0 siblings, 0 replies; 3+ messages in thread
From: HASM @ 2015-02-24 22:40 UTC (permalink / raw)
  To: help-gnu-emacs

Glenn Morris <rgm@gnu.org> writes:

me> Error reading dir-locals: (file-error "Read error" "is a directory" "/smb/.dir-locals.el")
glenn> It's a message, not an error (unless you have debug-on-error non-nil).

It's a message about an error:-)  It's also a bit of a pain as it keeps
coming back for every file under that mount point

glenn> Adding an entry for /smb to locate-dominating-stop-dir-regexp
glenn> ought to avoid the issue: net\\|afs -> net\\|afs\\|smb

Seems to work, thanks.  I've googled (and did find some of your
responses, but none on this variable.

> It sounds like your smb share is returning weird file results.  See eg
> http://debbugs.gnu.org/10928

It is autofs-5.1.0-10.fc21.x86_64 on linux kernel 3.18.7-200.fc21.x86_64.

glenn> ls -l /smb/.dir-locals.el
glenn> ls -ld /smb/.dir-locals.el

% ls -l /smb/.dir-locals.el
total 0
% ls -ld /smb/.dir-locals.el
dr-xr-xr-x 2 root root 0 Feb 24 08:10 /smb/.dir-locals.el

My map for /smb has a few named entries and then a wildcard entry, like:

* -fstype=autofs,-Dhost=&,-Duser=<cifs-username> file:/etc/<some-other-map>

and <some-other-map> has:

* -fstype=cifs,nocase,noserverino,credentials=<cred_file>,uid=${UID},gid=${GID},nounix ://${host}/&

so .dir-locals.el will be looked up as the hostname of a potential
windows machine that I may be able to mount, If the second wildcard, a
potential share exists, it will be mounted, so .dir-locals.el should
really be a directory (mount-point).  This would explain why emacs
thinks .dir-locals.el is a directory, because momentarily it is, until
the mount fails.

-- HASM


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2015-02-24 22:40 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-02-24 17:20 .dir-locals/automount HASM
2015-02-24 21:08 ` .dir-locals/automount Glenn Morris
     [not found] ` <mailman.776.1424812114.31049.help-gnu-emacs@gnu.org>
2015-02-24 22:40   ` .dir-locals/automount HASM

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