help-gnu-emacs
[Top][All Lists]
Advanced

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

Re: whats wrong in this picture - re-search-forward


From: Miles Bader
Subject: Re: whats wrong in this picture - re-search-forward
Date: 23 Mar 2001 16:46:51 +0900

Harry Putnam <reader@newsguy.com> writes:
> M-x re-search-forward <RET>$ <RET> -  The cursor moves to the end of the
> first `one'.  Repeat the search the cursor doesn't move.  What happened
> to `forward'?
> 
> Is this a bug?

No; it's an artifact of the fact that the search matched a zero-length
sequence of characters.

The `repeating the search finds the next match' behavior is due to the
cursor being left at the end of the match, so that any subsequent
invocation will find the next occurance -- however, for zero-length
matches, the end of the match is the same as the beginning!

-Miles
-- 
Love is a snowmobile racing across the tundra.  Suddenly it flips over,
pinning you underneath.  At night the ice weasels come.  --Nietzsche



reply via email to

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