emacs-devel
[Top][All Lists]
Advanced

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

Re: Irritation in C-u M-x grep, caused by overprotectiveness


From: Stefan Monnier
Subject: Re: Irritation in C-u M-x grep, caused by overprotectiveness
Date: Sun, 29 Jul 2007 09:49:33 -0400
User-agent: Gnus/5.11 (Gnus v5.11) Emacs/22.1.50 (gnu/linux)

> If I give an environment variable as "filename", the chances are I'll
> want to use it in subsequent greps.

I don't see why that'd generally be the case, but I guess it's just as good
a default as the current one.

Maybe a better and more general approach to the problem goes as follows:

Currently the code checks whether the previous "list of files" (typically
a global pattern) matches the current buffer's file name.  If it does then
the previous list of files is reused, otherwise the previous list of files
is ignored and replaced by a new glob pattern.

Now in your case, the list of files which *you* wrote did not "match" the
current buffer's file name, so clearly, the above heuristic shouldn't be
applied anyway.  I.e. we should only check "does it match the current file?"
if it did match the current file in its previous use.


        Stefan




reply via email to

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