GNU bug report logs -
#41513
`compute-motion' can miscount buffer positions in the presence of 'before-string/'after-string overlays
Previous Next
Reported by: Stephen Bach <sjbach <at> sjbach.com>
Date: Sun, 24 May 2020 18:45:01 UTC
Severity: normal
Done: Stefan Kangas <stefan <at> marxist.se>
Bug is archived. No further changes may be made.
Full log
View this message in rfc822 format
On Tue, May 26, 2020 at 12:21 PM Eli Zaretskii <eliz <at> gnu.org> wrote:
>
> Depending on what exactly do you need to do, I can suggest the
> following APIs:
>
> vertical-motion
> posn-at-point
> pos-visible-in-window-p
> window-text-pixel-size
>
> Let me know if these don't cover the functionalities that you need.
I overlooked pos-visible-in-window-p before, thanks for the reference.
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)
Thanks Eli, I appreciate the help and also the work you do for Emacs.
This bug report was last modified 4 years and 330 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.