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: Thu, 20 May 2004 12:58:25 -0500 (CDT)

Eli Zaretskii wrote:

   > From: Peter Lee <address@hidden>
   > Date: Thu, 20 May 2004 10:03:24 -0500
   > 
   >     Eli> Also, what is the value of default-directory local to the
   >     Eli> *Locate* buffer?
   > 
   > M-: (message default-directory) RET returned "/" in the Locate buffer.

   Sounds like a bug to me: it should have been set to the directory
   where `locate' was run, and should have included a drive letter, since
   this is MS-Windows.

   Could you try modifying locate.el to bind default-directory to
   something sensible in the *Locate* buffer, and see if that helps?

One probably should use `convert-standard-filename'.  That is supposed
to work on _all_ operating systems.

Would the following trivial change be sufficient to solve the problem?
I can not test it, since I only have access to GNU/Linux systems.

===File ~/locate-diff=======================================
*** locate.el   02 Sep 2003 07:34:37 -0500      1.21
--- locate.el   20 May 2004 12:36:18 -0500      
***************
*** 336,342 ****
    (use-local-map             locate-mode-map)
    (setq major-mode          'locate-mode
          mode-name           "Locate"
!         default-directory   "/")
    (dired-alist-add-1 default-directory (point-min-marker))
    (make-local-variable 'dired-move-to-filename-regexp)
    ;; This should support both Unix and Windoze style names
--- 336,342 ----
    (use-local-map             locate-mode-map)
    (setq major-mode          'locate-mode
          mode-name           "Locate"
!         default-directory   (convert-standard-filename "/"))
    (dired-alist-add-1 default-directory (point-min-marker))
    (make-local-variable 'dired-move-to-filename-regexp)
    ;; This should support both Unix and Windoze style names
============================================================




reply via email to

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