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: Eli Zaretskii
Subject: Re: find-directory-p always returns nil in locate-mode on windows xp
Date: Sat, 22 May 2004 15:13:38 +0200

> Date: Fri, 21 May 2004 13:29:19 -0500 (CDT)
> From: Luc Teirlinck <address@hidden>
> 
> Jason suggested (expand-file-name "/").

I was under the impression that Jason suggested (expand-file-name "~/"),
but perhaps I misunderstood.

> I _guess_ from your comments above that this does not work either.

I don't know, I didn't have the time to check.

The problem that bothers me is what happens when the value of
default-directory refers to a drive that is different from the drive
of files in the *Locate* buffer.  Since locate.db could (and does, in
many practical situations) contain file names from several drives, we
would have a Dired buffer where the top-level directory is "c:/", say,
but some file names begin with a "d:/" or "f:/".  Will locate.el and
the Dired features it relies upon still work in such a situation?

> I guess that "what was decided long ago" refers to:
> 
>   if (! STRINGP (default_directory))
>     {
> #ifdef DOS_NT
>       /* "/" is not considered a root directory on DOS_NT, so using "/"
>        here causes an infinite recursion in, e.g., the following:
> 
>             (let (default-directory)
>                 (expand-file-name "a"))
> 
>                  To avoid this, we set default_directory to the root of the
>                   current drive.  */
>       extern char *emacs_root_dir (void);
> 
>       default_directory = build_string (emacs_root_dir ());
> #else
>       default_directory = build_string ("/");
> #endif
>     }

Yes, that's what I had in mind.

>    Again, I don't think Emacs on Windows should have any buffer whose
>    default-directory is "/".
> 
> Yes, but I suppose you read the comment below, which Jason already
> referred to.

Of course, I read them; thus my concern described above.




reply via email to

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