[Top][All Lists]

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

Occur in the *Occur* buffer

From: Dan Jacobson
Subject: Occur in the *Occur* buffer
Date: 02 Jun 2001 00:37:20 +0800
User-agent: Gnus/5.0808 (Gnus v5.8.8) Emacs/20.7

First do
(occur "string1" nil)
Then switch to the *Occur* buffer and do
(occur "string2" nil)
0 lines matching "string2" in buffer *Occur*.
Why of course.  It will never find string2 because it first clears
that buffer for putting the result into, the reader says to himself
laughing.  However: 1. it doesn't warn about this in the docs nor does
the program stop you from doing this.
2. saying '0 lines matching "string2" in buffer *Occur*' isn't the
best thing to say, as there were clearly plenty of string2 before all
was wiped away.  3. why don't you not make this a special case and
give the user what he wants, with even an undo enabled to restore
previous states of the *Occur* buffer.  [No I am not planning on asking
you to make also grep string file > file work in the shell.]
http://www.geocities.com/jidanni Tel886-4-25854780 e-mail:restore .com.

reply via email to

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