[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: grep-tree bug
From: |
Stefan Monnier |
Subject: |
Re: grep-tree bug |
Date: |
26 May 2004 11:08:11 -0400 |
User-agent: |
Gnus/5.09 (Gnus v5.9.0) Emacs/21.3.50 |
> @@ -533,7 +533,8 @@
> (files
> (read-string (concat "Search for \"" regexp "\" in files (default "
> grep-tree-last-files "): ")))
> (dir
> - (read-directory-name "Base directory: " nil default-directory t)))
> + (file-name-as-directory
> + (read-directory-name "Base directory: " nil default-directory t))))
> (list regexp files dir)))
> (unless grep-tree-command
> (grep-compute-defaults))
This works around the bug rather than fixing it.
The patch below is preferable: `default-directory should always end with
a slash and should always be absolute.
Stefan
* auto-adding address@hidden/emacs--monnier--0--patch-45 to greedy revision
library /part/00/Tmp/monnier/archlib
* found immediate ancestor revision in library
(address@hidden/emacs--monnier--0--patch-44)
* patching for this revision (address@hidden/emacs--monnier--0--patch-45)
--- orig/lisp/progmodes/grep.el
+++ mod/lisp/progmodes/grep.el
@@ -555,7 +555,7 @@
nil) ;; we change default-directory to dir
(and grep-tree-ignore-CVS-directories "-path '*/CVS'
-prune -o ")
grep-tree-ignore-case))
- (default-directory dir)
+ (default-directory (file-name-as-directory (expand-file-name dir)))
(null-device nil)) ; see grep
(grep command-args regexp)))