Subject: Re: bug#41513: `compute-motion' can miscount buffer positions in the presence of 'before-string/'after-string overlays

From: Stefan Kangas <[email-masked]>
Date: Sun, 23 Aug 2020 20:26:44 -0400

Eli Zaretskii <[email-masked]> writes:

>> From: Stephen Bach <[email-masked]>
>> Date: Tue, 26 May 2020 14:12:10 -0400
>> Cc: [email-masked]
>>
>> Do you have any points of advice for avoiding side-effects when moving
>> the cursor around the buffer programmatically?
>>
>> What I have so far:
>> - Wrap in save-excursion
>> - Bind to t:
>>   - inhibit-point-motion-hooks
>>   - cursor-sensor-inhibit
>>   - inhibit-field-text-motion (for precision, might be superfluous)
>> - Bind to nil:
>>   - goal-column (probably superfluous)
>
> save-excursion should do, usually.
>
>> Thanks Eli, I appreciate the help and also the work you do for Emacs.
>
> You are welcome.

>From skimming this thread, it looks like all issues here were
resolved.  I'm therefore closing this bug report.

If this conclusion is incorrect, please reply to this email (use "Reply
to all" in your email client) and we can reopen the bug report.

Best regards,
Stefan Kangas