[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#4052: marked as done (Emacs hangs with C-u C-u lrgep)
From: |
Juri Linkov |
Subject: |
bug#4052: marked as done (Emacs hangs with C-u C-u lrgep) |
Date: |
Sat, 22 Aug 2009 03:18:22 +0300 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/23.1.50 (x86_64-pc-linux-gnu) |
>> Fixed.
>
> Are you sure this is fixed?
>
> emacs -Q
> M-x lgrep RET foo RET RET RET
> select grep buffer
> C-u C-u M-x lgrep RET M-p RET
>
> -> default-directory is now nil in the grep buffer (eg the scroll bars
> vanish)
>
> The very last clause in lgrep
>
> (if (eq next-error-last-buffer (current-buffer))
> (setq default-directory dir))
>
> is outside the let-binding that you changed.
Oops, I missed this case. Now fixed by checking for a non-nil
readable directory at the beginning of this command.
> Also, regardless of the above, does rgrep need the same kind of fix as lgrep?
When used interactively, rgrep doesn't need the same fix because it uses
a slightly different logic. But this is needed when rgrep is called
programmatically with an invalid `dir' argument.
`lgrep' and `rgrep' are still different in regard to their argument `dir'.
When `lgrep' is called programmatically with a non-nil `regexp' and `dir'
but with `files'=nil, then `lgrep' runs in the directory `dir'. However,
when `rgrep' is called with the same arguments, it runs in the current
directory. I'm not sure if this behavior should be the same for both.
--
Juri Linkov
http://www.jurta.org/emacs/