> Does the diff below yield
the expected behavior?

Yes. It works perfectly.

Thanks.

Best regards,
Siyuan Chen

On Mon, Jun 17, 2024 at 11:15 PM Eshel Yaron <me@eshelyaron.com> wrote:
Eli Zaretskii <eliz@gnu.org> writes:

>> Cc: 71603@debbugs.gnu.org
>> Date: Mon, 17 Jun 2024 08:34:29 +0200
>> From:  Eshel Yaron via "Bug reports for GNU Emacs,
>>  the Swiss army knife of text editors" <bug-gnu-emacs@gnu.org>
>>
>> > The expected behavior: jump cursor to bk1 or bk2
>> >
>> > The actual behavior: nothing happens, except the left fringe displays an additional bookmark icon if your current
>> > point is not at one of the bookmark locations.
>>
>> Thanks, I can reproduce this issue on master.  Does the diff below yield
>> the expected behavior?
>
> Thanks, I have independently came to the same solution.  So please
> install this on master, but with a comment explaining why we record
> point before calling display-function.

All right, see commit 27f46ba4b96.


Eshel