unofficial mirror of bug-gnu-emacs@gnu.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

* Re: M-x locate fails with no such directory /
  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
  1 sibling, 0 replies; 5+ messages in thread
From: Kevin Rodgers @ 2003-08-06 15:33 UTC (permalink / raw)


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

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

* Re: M-x locate fails with no such directory /
  2003-08-06 19:55 ` Eli Zaretskii
@ 2003-08-06 19:20   ` Robert Mecklenburg
  2003-08-07 17:04     ` Eli Zaretskii
  0 siblings, 1 reply; 5+ messages in thread
From: Robert Mecklenburg @ 2003-08-06 19:20 UTC (permalink / raw)
  Cc: bug-gnu-emacs

RM> (I've evaluated the source lisp function.)  It appears to me that the
RM> default-directory which is "/" is wrong for NTEmacs.

EZ> Why is "/" wrong for NTEmacs?  It means the root directory on the
EZ> current drive.

Okay, I agree with your statement.  Nevertheless I get an emacs error
(and backtrace) with "/" and not with "C:/".  I don't know why.

Thanks,
-- 
Robert

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

* Re: M-x locate fails with no such directory /
  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
  1 sibling, 1 reply; 5+ messages in thread
From: Eli Zaretskii @ 2003-08-06 19:55 UTC (permalink / raw)
  Cc: bug-gnu-emacs

> Date: Wed, 6 Aug 2003 08:40:46 -0600
> From: Robert Mecklenburg <mecklen@cimsoft.com>
> 
> (I've evaluated the source lisp function.)  It appears to me that the
> default-directory which is "/" is wrong for NTEmacs.

Why is "/" wrong for NTEmacs?  It means the root directory on the
current drive.

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

* Re: M-x locate fails with no such directory /
  2003-08-06 19:20   ` Robert Mecklenburg
@ 2003-08-07 17:04     ` Eli Zaretskii
  0 siblings, 0 replies; 5+ messages in thread
From: Eli Zaretskii @ 2003-08-07 17:04 UTC (permalink / raw)
  Cc: bug-gnu-emacs

> From: Robert Mecklenburg <mecklen@cimsoft.com>
> Date: Wed, 6 Aug 2003 13:20:16 -0600
> 
> EZ> Why is "/" wrong for NTEmacs?  It means the root directory on the
> EZ> current drive.
> 
> Okay, I agree with your statement.  Nevertheless I get an emacs error
> (and backtrace) with "/" and not with "C:/".  I don't know why.

I don't know either.  This snippet from your backtrace:

    Debugger entered--Lisp error: (file-error "Setting current directory" "no such file or directory" "/")
      call-process("locate" nil t nil "cimsoft/Makefile")

doesn't make sense to me: it seems to suggest that Emacs cannot chdir
to the root of the current drive.  Does "M-x cd RET / RET" also fail
on that drive if you type it inside an Emacs session?

^ 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 public inbox

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

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).