emacs-devel
[Top][All Lists]
Advanced

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

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


From: Ami Fischman
Subject: bug with automount-dir-prefix handling in abbreviate-file-name
Date: Thu, 6 Aug 2009 09:35:51 -0700

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:

Debugger entered--Lisp error: (file-error "Setting current directory"
"no such file or directory" "/fischman/")
  call-process("ls" nil t nil "--dired" "-al" "--" "/fischman/.")
  apply(call-process "ls" nil t nil ("--dired" "-al" "--" "/fischman/."))
  insert-directory("/fischman/" "--dired -al" nil t)
  dired-insert-directory("/fischman/" "-al" nil nil t)
  dired-readin-insert()
  dired-readin()
  dired-internal-noselect("/fischman/" nil)
  dired-noselect("~/")
  run-hook-with-args-until-success(dired-noselect "~/")
  find-file-noselect("~/" nil nil nil)
  find-file("~/")
  (let ((automount-dir-prefix "^/home/")) (find-file "~/"))
  eval((let ((automount-dir-prefix "^/home/")) (find-file "~/")))
  eval-last-sexp-1(nil)
  eval-last-sexp(nil)
  call-interactively(eval-last-sexp nil nil)

The error is caused by abbreviate-file-name stripping /home from /home/fischman.

Removing the trailing slash like this:
(let ((automount-dir-prefix "^/home"))
  (find-file "~/"))
works fine (brings up a dired buffer containing my homedir).

This is all with emacs 23.1 started as "emacs -Q".  The same behavior
occurs in 22.1.1 and 21.4.1.

-a




reply via email to

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