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

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

M-x locate fails with no such directory /


From: Robert Mecklenburg
Subject: M-x locate fails with no such directory /
Date: Wed, 6 Aug 2003 08:40:46 -0600

This bug report will be sent to the Free Software Foundation,
not to your local site managers!
Please write in English, because the Emacs maintainers do not have
translators to read other languages for them.

Your bug report will be posted to the bug-gnu-emacs@gnu.org mailing list,
and to the gnu.emacs.bug news group.

In GNU Emacs 21.3.1 (i386-msvc-nt5.1.2600)
 of 2003-03-27 on buffy
configured using `configure --with-msvc (12.00)'
Important settings:
  value of $LC_ALL: nil
  value of $LC_COLLATE: nil
  value of $LC_CTYPE: nil
  value of $LC_MESSAGES: nil
  value of $LC_MONETARY: nil
  value of $LC_NUMERIC: nil
  value of $LC_TIME: nil
  value of $LANG: ENU
  locale-coding-system: iso-latin-1
  default-enable-multibyte-characters: t

Please describe exactly what actions triggered the bug
and the precise symptoms of the bug:

When I execute :

M-x locate <ret> cimsoft/Makefile<ret> 

I get the error:

apply: Setting current directory: no such file or directory, /

When I enable debug-on-error I get the stack trace:

Debugger entered--Lisp error: (file-error "Setting current directory" "no such 
file or directory" "/")
  call-process("locate" nil t nil "cimsoft/Makefile")
  apply(call-process "locate" nil t nil "cimsoft/Makefile")
  (if run-locate-command (shell-command search-string locate-buffer-name) 
(apply (quote call-process) locate-cmd nil t nil locate-cmd-args))
  (save-window-excursion (set-buffer (get-buffer-create locate-buffer-name)) 
(locate-mode) (erase-buffer) (setq locate-current-filter filter) (if 
run-locate-command (shell-command search-string locate-buffer-name) (apply ... 
locate-cmd nil t nil locate-cmd-args)) (and filter (locate-filter-output 
filter)) (locate-do-setup search-string))
  (let* ((locate-cmd-list ...) (locate-cmd ...) (locate-cmd-args ...) 
(run-locate-command ...)) (save-window-excursion (set-buffer ...) (locate-mode) 
(erase-buffer) (setq locate-current-filter filter) (if run-locate-command ... 
...) (and filter ...) (locate-do-setup search-string)) (and (not ...) 
(switch-to-buffer-other-window locate-buffer-name)) (run-hooks (quote 
dired-mode-hook)) (run-hooks (quote locate-post-command-hook)))
  locate("cimsoft/Makefile")
  call-interactively(locate)
  execute-extended-command(nil)
* call-interactively(execute-extended-command)


(I've evaluated the source lisp function.)  It appears to me that the
default-directory which is "/" is wrong for NTEmacs.  The locate-mode
defun says:

(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.

I have no clue if this is a "correct" fix.

Thanks,


Recent input:
n o SPC i d e a SPC i f SPC t h i s SPC i s SPC a SPC 
c o r r e c t SPC f i x SPC o r SPC n o t C-a C-k I 
SPC h a v e SPC n o SPC c l u e SPC i f SPC t h i s 
SPC i s SPC a SPC " c o r r e c t " SPC f i x . <return> 
<return> T h a n k s , M-< C-x 1 C-x C-s <menu-bar> 
<help-menu> <report-emacs-bug>

Recent messages:
Mark set [3 times]
Auto-saving...done
Back to top level.
Loading ebuff-menu...done
<<< Press Return to bury the buffer list >>>

Mark set [4 times]
Auto-saving...done
Mark set
Wrote c:/home/mecklen/emacs-bug-locate


-- 
Robert





reply via email to

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