* bug#5360: 23.1.91; rgrep forces me to choose a directory
@ 2010-01-12 0:39 jidanni
2019-10-01 15:11 ` Lars Ingebrigtsen
0 siblings, 1 reply; 2+ messages in thread
From: jidanni @ 2010-01-12 0:39 UTC (permalink / raw)
To: emacs-pretest-bug
rgrep forces me to choose a directory, e.g.,
(rgrep "INIT" "* .*" "/usr/share/initscripts/" nil)
when I really want to choose a wildcard of several directories.
OK, so I use repeat-complex-command to forge in
(rgrep "INIT" "* .*" "/usr/share/init*" nil)
And low and behold, rgrep assumes it can cd to that "directory" and
proceeds even though the cd failed! So at least it should check that its
cd doesn't fail, even if wildcard directories will never be implemented.
In GNU Emacs 23.1.91.1
^ permalink raw reply [flat|nested] 2+ messages in thread
* bug#5360: 23.1.91; rgrep forces me to choose a directory
2010-01-12 0:39 bug#5360: 23.1.91; rgrep forces me to choose a directory jidanni
@ 2019-10-01 15:11 ` Lars Ingebrigtsen
0 siblings, 0 replies; 2+ messages in thread
From: Lars Ingebrigtsen @ 2019-10-01 15:11 UTC (permalink / raw)
To: jidanni; +Cc: 5360
jidanni@jidanni.org writes:
> rgrep forces me to choose a directory, e.g.,
> (rgrep "INIT" "* .*" "/usr/share/initscripts/" nil)
> when I really want to choose a wildcard of several directories.
>
> OK, so I use repeat-complex-command to forge in
> (rgrep "INIT" "* .*" "/usr/share/init*" nil)
> And low and behold, rgrep assumes it can cd to that "directory" and
> proceeds even though the cd failed! So at least it should check that its
> cd doesn't fail, even if wildcard directories will never be implemented.
This seems to be on purpose:
(unless (and dir (file-accessible-directory-p dir))
(setq dir default-directory))
If you name a directory and it doesn't exist, then default-directory is
used, and it's done on purpose:
commit 32a2cf25a74160b855041c176d2e7e937baa4de8
Author: Juri Linkov <juri@jurta.org>
Date: Sat Aug 22 00:17:56 2009 +0000
(lgrep, rgrep): At the beginning
set `dir' to `default-directory' unless `dir' is a non-nil
readable directory. (Bug#4052)
(lgrep, rgrep): Change a weird way to report an error
from using `read-string' to using `error'.
Instead of using interactive arguments in the function body,
add new argument `confirm'.
So I'm closing this bug report.
--
(domestic pets only, the antidote for overdose, milk.)
bloggy blog: http://lars.ingebrigtsen.no
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2019-10-01 15:11 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-01-12 0:39 bug#5360: 23.1.91; rgrep forces me to choose a directory jidanni
2019-10-01 15:11 ` Lars Ingebrigtsen
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.