emacs-pretest-bug
[Top][All Lists]
Advanced

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

Re: find-directory-p always returns nil in locate-mode on windows xp


From: Luc Teirlinck
Subject: Re: find-directory-p always returns nil in locate-mode on windows xp
Date: Tue, 25 May 2004 10:19:58 -0500 (CDT)

Eli Zaretskii wrote:

   There are several issues that I'd like us to try to solve:

     - why does "/" fail on Windows? I don't see why it should

     - why did you get on GNU/Linux a concatenation of your home
       directory and the file name, as in
       "/home/teirllm/home/teirllm/compdir/"? where's the code that did
       that, and why that doesn't happen on MS-DOS?

Maybe we have been side-tracked by the "i" issue here, which I believe
is a separate problem, which I am trying to address in a separate
thread on emacs-devel.  The original problem concerned `V',
locate-find-directory.

Full code:

(defun locate-find-directory ()
  "Visit the directory of the file mentioned on this line."
  (interactive)
  (let ((directory-name (locate-get-dirname)))
    (if (file-directory-p directory-name)
        (find-file directory-name)
      (if (file-symlink-p directory-name)
          (error "Directory is a symlink to a nonexistent target")
        (error "Directory no longer exists; run `updatedb' to update 
database")))))

for:

    /home/teirllm/compdir

(locate-get-dirname) returns:

/home/teirllm/

The original (strange) claim was that, on MS Windows, even though
(locate-get-dirname) returned the absolute name of an existing
directory, the next call to file-directory-p returned nil, but _only_
in the *Locate* buffer and _only_ if default-directory was "/" in that
buffer.  As we both agree, since the file name is absolute,
default-directory "should" be completely irrelevant.  Apparently it is
not in the OP's set-up.  The question is whether this is somehow just
a (strange) local set-up problem, or whether other people can
reproduce it.

Sincerely,

Luc.
 




reply via email to

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