[Top][All Lists]
[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: |
Sat, 22 May 2004 22:06:27 -0500 (CDT) |
Peter Breton wrote:
I just tested removing the default-directory line and
locate.el seems to work fine. I believe that it uses
dired-move-to-filename-regexp to determine the file
name, so default-directory would be ignored in any
case, and as best I can recall, it was only set to get
dired-mode to work properly.
The value of default-directory is now "~/".
If you remove the line, the value of default-directory is going to be
whatever the value was in the buffer from which `locate' was invoked.
(Which may not be that bad if nothing better is available on MS Windows.)
I do not see however why one should fail to make dired mode work as
best as it can on those operating systems that support it, such as
GNU/Linux and Unix. So one could do something like the patch below.
Maybe some other operating systems might have to be added to the
'(ms-dos windows-nt cygwin).
===File ~/locate-diff=======================================
*** locate.el 20 May 2004 17:14:36 -0500 1.22
--- locate.el 22 May 2004 21:27:41 -0500
***************
*** 339,346 ****
(make-local-variable 'dired-subdir-alist)
(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
--- 339,347 ----
(make-local-variable 'dired-subdir-alist)
(use-local-map locate-mode-map)
(setq major-mode 'locate-mode
! mode-name "Locate")
! (unless (memq system-type '(ms-dos windows-nt cygwin))
! (setq 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
============================================================
- Re: find-directory-p always returns nil in locate-mode on windows xp, (continued)
- Re: find-directory-p always returns nil in locate-mode on windows xp, Eli Zaretskii, 2004/05/21
- Re: find-directory-p always returns nil in locate-mode on windows xp, Luc Teirlinck, 2004/05/21
- Re: find-directory-p always returns nil in locate-mode on windows xp, Peter Breton, 2004/05/21
- Re: find-directory-p always returns nil in locate-mode on windows xp, Jason Rumney, 2004/05/23
- Re: find-directory-p always returns nil in locate-mode on windows xp, Eli Zaretskii, 2004/05/23
- Re: find-directory-p always returns nil in locate-mode on windows xp, Peter Breton, 2004/05/23
- Re: find-directory-p always returns nil in locate-mode on windows xp, Peter Breton, 2004/05/23
- Re: find-directory-p always returns nil in locate-mode on windows xp,
Luc Teirlinck <=
- Re: find-directory-p always returns nil in locate-mode on windows xp, Eli Zaretskii, 2004/05/23
- Re: find-directory-p always returns nil in locate-mode on windows xp, Luc Teirlinck, 2004/05/23
- Re: find-directory-p always returns nil in locate-mode on windows xp, Eli Zaretskii, 2004/05/23
- Re: find-directory-p always returns nil in locate-mode on windows xp, Luc Teirlinck, 2004/05/23
- Re: find-directory-p always returns nil in locate-mode on windows xp, Eli Zaretskii, 2004/05/23
- Re: find-directory-p always returns nil in locate-mode on windows xp, Luc Teirlinck, 2004/05/23
- Re: find-directory-p always returns nil in locate-mode on windows xp, Eli Zaretskii, 2004/05/24
- Re: find-directory-p always returns nil in locate-mode on windows xp, Luc Teirlinck, 2004/05/24
- Re: find-directory-p always returns nil in locate-mode on windows xp, Eli Zaretskii, 2004/05/25
- Re: find-directory-p always returns nil in locate-mode on windows xp, Peter Breton, 2004/05/23