all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Daniel Mendler <mail@daniel-mendler.de>
To: Eli Zaretskii <eliz@gnu.org>
Cc: 52097@debbugs.gnu.org
Subject: bug#52097: 28.0.50; Regression - posn-at-point returns wrong result if overlay is present
Date: Thu, 25 Nov 2021 12:23:02 +0100	[thread overview]
Message-ID: <988eefc4-e928-79f0-af74-a32948b1ddbb@daniel-mendler.de> (raw)
In-Reply-To: <831r347bl5.fsf@gnu.org>

>> 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)))))))





  reply	other threads:[~2021-11-25 11:23 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-11-25 10:13 bug#52097: 28.0.50; Regression - posn-at-point returns wrong result if overlay is present Daniel Mendler
2021-11-25 10:51 ` Eli Zaretskii
2021-11-25 11:23   ` Daniel Mendler [this message]
2021-11-25 11:40     ` Eli Zaretskii
2021-11-25 13:07       ` Eli Zaretskii
2021-11-25 13:52         ` Daniel Mendler
2021-11-25 14:08           ` Eli Zaretskii

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=988eefc4-e928-79f0-af74-a32948b1ddbb@daniel-mendler.de \
    --to=mail@daniel-mendler.de \
    --cc=52097@debbugs.gnu.org \
    --cc=eliz@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.