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

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

Re: M-x locate fails with no such directory /


From: Kevin Rodgers
Subject: Re: M-x locate fails with no such directory /
Date: Wed, 06 Aug 2003 09:33:08 -0600
User-agent: Mozilla/5.0 (X11; U; SunOS i86pc; en-US; rv:0.9.4.1) Gecko/20020406 Netscape6/6.2.2

Robert Mecklenburg wrote:

(defun locate-mode ()
  "Major mode for the `*Locate*' buffer made by \\[locate]."
  (kill-all-local-variables)
  ;; Avoid clobbering this variables
  (make-local-variable 'dired-subdir-alist)
  (use-local-map             locate-mode-map)
  (setq major-mode          'locate-mode
        mode-name           "Locate"
        default-directory   "/")

I changed default-directory to:

(defun locate-mode ()
  "Major mode for the `*Locate*' buffer made by \\[locate]."
  (kill-all-local-variables)
  ;; Avoid clobbering this variables
  (make-local-variable 'dired-subdir-alist)
  (use-local-map             locate-mode-map)
  (setq major-mode          'locate-mode
        mode-name           "Locate"
        default-directory   "C:/")

and M-x locate works again.

Perhaps there should be a root-directory variable that would default to

"/" on Unix, "C:/" on Windows, and something else on VMS.  It would be
analagous to the null-device variable.

--
Kevin Rodgers






reply via email to

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