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

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

bug#5360: 23.1.91; rgrep forces me to choose a directory


From: Lars Ingebrigtsen
Subject: bug#5360: 23.1.91; rgrep forces me to choose a directory
Date: Tue, 01 Oct 2019 17:11:14 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (gnu/linux)

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





reply via email to

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