all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* M-x locate fails with no such directory /
@ 2003-08-06 14:40 Robert Mecklenburg
  2003-08-06 15:33 ` Kevin Rodgers
  2003-08-06 19:55 ` Eli Zaretskii
  0 siblings, 2 replies; 5+ messages in thread
From: Robert Mecklenburg @ 2003-08-06 14:40 UTC (permalink / raw)


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

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2003-08-07 17:04 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2003-08-06 14:40 M-x locate fails with no such directory / Robert Mecklenburg
2003-08-06 15:33 ` Kevin Rodgers
2003-08-06 19:55 ` Eli Zaretskii
2003-08-06 19:20   ` Robert Mecklenburg
2003-08-07 17:04     ` Eli Zaretskii

Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.