GNU bug report logs -
#52097
28.0.50; Regression - posn-at-point returns wrong result if overlay is present
Previous Next
Reported by: Daniel Mendler <mail <at> daniel-mendler.de>
Date: Thu, 25 Nov 2021 10:14:02 UTC
Severity: normal
Found in version 28.0.50
Done: Eli Zaretskii <eliz <at> gnu.org>
Bug is archived. No further changes may be made.
Full log
View this message in rfc822 format
>> 1. emacs -Q
>> 2. Create new buffer bug.el
>> 3. Activate flymake-mode (for the overlay)
>> 4. Enter " invalid-ident" (note the spaces at the beginning)
>> 5. Wait until the flymake overlay appears
>
> The overlay doesn't seem to appear for me, for some reason.
I am using emacs -Q. I just recompiled the current emacs-28 branch.
After some time flymake should underline the invalid identifier.
> Could you please post a recipe that doesn't require Flymake?
Try this command:
(defun posn-bug ()
(interactive)
(let ((buffer (get-buffer-create "*bug*")))
(with-current-buffer buffer
(erase-buffer)
(pop-to-buffer buffer)
(goto-char (point-min))
(insert " word")
(let ((ov (make-overlay 3 7)))
(overlay-put ov 'before-string
#("!" 0 1 (display (left-fringe exclamation-mark error))))
(message "Reported positions %S %S %S %S %S %S %S"
(posn-x-y (posn-at-point 1))
(posn-x-y (posn-at-point 2))
(posn-x-y (posn-at-point 3))
(posn-x-y (posn-at-point 4))
(posn-x-y (posn-at-point 5))
(posn-x-y (posn-at-point 6))
(posn-x-y (posn-at-point 7)))))))
This bug report was last modified 3 years and 237 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.