unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
* bug with automount-dir-prefix handling in abbreviate-file-name
@ 2009-08-06 16:35 Ami Fischman
  2009-08-06 16:58 ` Andreas Schwab
  2009-08-06 18:09 ` Stefan Monnier
  0 siblings, 2 replies; 8+ messages in thread
From: Ami Fischman @ 2009-08-06 16:35 UTC (permalink / raw)
  To: emacs-devel

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




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

end of thread, other threads:[~2009-08-07 14:20 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
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
2009-08-07  4:45     ` Stefan Monnier
2009-08-07  8:54       ` Andreas Schwab
2009-08-07 14:20         ` Ami Fischman

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