[Top][All Lists]

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

default-directory and file-name-all-completions

From: Stephen Eglen
Subject: default-directory and file-name-all-completions
Date: Thu, 11 Oct 2007 15:36:28 +0100

Dear tramp-devel:

The following issue has come up within our ESS project
(  A user has reported that if he opens a
file using tramp, he gets the following backtrace:

Debugger entered--Lisp error: (file-error "Opening directory" "no x1
such file or directory" "/ssh:address@hidden:/home/xxx/PhD/stats")
   file-name-all-completions("Splus" ".")
   mapcar(ess-find-exec-completions ("Splus"))

This is because our major mode in ESS tries to find programs such as
"Splus" within the users PATH.   Since users often have "." on their
path name, at some point we hit a call:

   file-name-all-completions("Splus" ".")

and since default-directory is a tramp-style directory, an error is
then generated.

I can repeat this bug by visiting a remote file over tramp, and
then evaluating in that buffer the sexp

  (file-name-all-completions "Splus" ".")

This seems to be a bug, but I'm not sure what the best way to solve it
is.  Of course, for our application, we can always just add a check to
not call file-name-all-completions when the directory to check looks
like a tramp dir.  But I thought I'd mention this in case anyone had a
cleaner way to solve this problem.

Thanks, Stephen

reply via email to

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