[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Irritation about re-search-backward
From: |
Michael Heerdegen |
Subject: |
Re: Irritation about re-search-backward |
Date: |
Thu, 24 May 2018 17:41:50 +0200 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (gnu/linux) |
Marco Wahl <marcowahlsoft@gmail.com> writes:
> Hi,
>
> with "|" marking point and the following buffer
>
> #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))
The docstring once included this sentence:
The match found is the one starting last in the buffer
and yet ending before the origin of the search.
but it obviously has been removed.
I would make a bug report, since the documentation is insufficient in
this regard.
Michael.