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

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

Re: Irritation about re-search-backward


From: Marco Wahl
Subject: Re: Irritation about re-search-backward
Date: Thu, 24 May 2018 22:25:39 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (gnu/linux)

Michael Heerdegen <michael_heerdegen@web.de> writes:

> Marco Wahl <marcowahlsoft@gmail.com> writes:
>
>> Hi,
>>
>> with "|" marking point and the following buffer
>>
nn>> #v+
>> aaaaaaaaaaaa|
>> #v-
>>
>>
>> M-: (re-search-backward "a*")
>>
>> does not change point.
>>
>> Shouldn't point have been moved to the beginning of the line?
>
> Good question - but it's the intended behavior.  Try
>
> (progn (re-search-backward "a*")
>        (message "Matched string: \"%s\"" (match-string 0))
>        (sit-for 2))

Thanks!

BTW to get the "greedy" match backwards I use now a further element in
the search pattern like (re-search-backward "^a*").

[...]

> I would make a bug report, since the documentation is insufficient in
> this regard.

Thanks for the suggestion but I won't file a report.  If you would like
to take over feel free to do so.


Best regards,
-- 
Marco



reply via email to

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