unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
* tags-search doesn't check files are up-to-date
@ 2008-02-01 18:35 Chris Moore
  2008-02-01 23:46 ` Chong Yidong
  0 siblings, 1 reply; 2+ messages in thread
From: Chris Moore @ 2008-02-01 18:35 UTC (permalink / raw)
  To: emacs-pretest-bug

I was just trying to find something in an old IRC logfile.  I went to
the directory holding the files with dired, marked the last week's
worth of logs and hit "A" (dired-do-search) to search them for the
string.

Emacs told me "All files processed" - it didn't find the string.

"grep" tells me differently - the string is there.

It turns out that I had visited one of the logs when it still being
written a few days ago.  Emacs had the first half of the file in a
buffer, and the string I wanted was in the 2nd half - on disk, but not
in the buffer.

I would expect Emacs to say "File ... changed on disk.  Reread from
disk? (yes or no) " when I try searching a file that's changed, but it
silently assumes I don't want to know that it is using an old copy.

It's pretty simple to reproduce:  make an empty file, visit it, append
'xxx' to it outside of Emacs, mark the file in dired and search it for
'xxx' using the "A" (dired-do-search) key.  It won't find the 'xxx'.




^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: tags-search doesn't check files are up-to-date
  2008-02-01 18:35 tags-search doesn't check files are up-to-date Chris Moore
@ 2008-02-01 23:46 ` Chong Yidong
  0 siblings, 0 replies; 2+ messages in thread
From: Chong Yidong @ 2008-02-01 23:46 UTC (permalink / raw)
  To: Chris Moore; +Cc: emacs-pretest-bug

"Chris Moore" <christopher.ian.moore@gmail.com> writes:

> I was just trying to find something in an old IRC logfile.  I went to
> the directory holding the files with dired, marked the last week's
> worth of logs and hit "A" (dired-do-search) to search them for the
> string.
>
> Emacs told me "All files processed" - it didn't find the string.
>
> "grep" tells me differently - the string is there.
>
> It turns out that I had visited one of the logs when it still being
> written a few days ago.  Emacs had the first half of the file in a
> buffer, and the string I wanted was in the 2nd half - on disk, but not
> in the buffer.
>
> I would expect Emacs to say "File ... changed on disk.  Reread from
> disk? (yes or no) " when I try searching a file that's changed, but it
> silently assumes I don't want to know that it is using an old copy.
>
> It's pretty simple to reproduce:  make an empty file, visit it, append
> 'xxx' to it outside of Emacs, mark the file in dired and search it for
> 'xxx' using the "A" (dired-do-search) key.  It won't find the 'xxx'.

This can be fixed by setting tags-loop-revert-buffers to non-nil.

Maybe dired-do-search and the other commands that use etags should
automatically bind tags-loop-revert-buffers to t?




^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2008-02-01 23:46 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-02-01 18:35 tags-search doesn't check files are up-to-date Chris Moore
2008-02-01 23:46 ` Chong Yidong

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).