GNU bug report logs - #5360
23.1.91; rgrep forces me to choose a directory

Previous Next

Package: emacs;

Reported by: jidanni <at> jidanni.org

Date: Tue, 12 Jan 2010 01:08:02 UTC

Severity: wishlist

Done: Lars Ingebrigtsen <larsi <at> gnus.org>

Bug is archived. No further changes may be made.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 5360 in the body.
You can then email your comments to 5360 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to owner <at> debbugs.gnu.org, bug-gnu-emacs <at> gnu.org:
bug#5360; Package emacs. (Tue, 12 Jan 2010 01:08:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to jidanni <at> jidanni.org:
New bug report received and forwarded. Copy sent to bug-gnu-emacs <at> gnu.org. (Tue, 12 Jan 2010 01:08:02 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: jidanni <at> jidanni.org
To: emacs-pretest-bug <at> gnu.org
Subject: 23.1.91; rgrep forces me to choose a directory
Date: Tue, 12 Jan 2010 08:39:12 +0800
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




Severity set to 'wishlist' from 'normal' Request was from Glenn Morris <rgm <at> gnu.org> to control <at> debbugs.gnu.org. (Fri, 15 Jan 2010 02:35:02 GMT) Full text and rfc822 format available.

Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#5360; Package emacs. (Tue, 01 Oct 2019 15:12:02 GMT) Full text and rfc822 format available.

Message #10 received at 5360 <at> debbugs.gnu.org (full text, mbox):

From: Lars Ingebrigtsen <larsi <at> gnus.org>
To: jidanni <at> jidanni.org
Cc: 5360 <at> debbugs.gnu.org
Subject: Re: bug#5360: 23.1.91; rgrep forces me to choose a directory
Date: Tue, 01 Oct 2019 17:11:14 +0200
jidanni <at> 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 <at> 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




bug closed, send any further explanations to 5360 <at> debbugs.gnu.org and jidanni <at> jidanni.org Request was from Lars Ingebrigtsen <larsi <at> gnus.org> to control <at> debbugs.gnu.org. (Tue, 01 Oct 2019 15:12:04 GMT) Full text and rfc822 format available.

bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Wed, 30 Oct 2019 11:24:09 GMT) Full text and rfc822 format available.

This bug report was last modified 5 years and 292 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.