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

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

Re: re-search-forward hangs


From: Robert Girault
Subject: Re: re-search-forward hangs
Date: Mon, 30 Jul 2018 16:35:38 -0300
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3 (windows-nt)

Andreas Röhler <andreas.roehler@easy-emacs.de> writes:

> On 30.07.2018 16:33, Eli Zaretskii wrote:
>>> From: Andreas Röhler <andreas.roehler@easy-emacs.de>
>>> Date: Mon, 30 Jul 2018 14:24:06 +0200
>>>
>>> (while (re-search-forward "" nil t 1))
>>>
>>> Emacs hangs.
>>>
>>> Same with plain
>>>
>>> (while (search-forward "" nil t 1))
>>>
>>> Expect it terminating.
>>>
>>> Are there reasons for this?
>>
>> Why did you expect it to terminate?
>
> Expect a call of search-forward from  EOB not being successful.

I see.  But searching for the empty string seems to be an always
successful operation as long as you have a string.  The empty string is
before or after any character in a string, so I would expect it to be
always found by {re-}search-forward.


reply via email to

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