all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Juri Linkov <juri@linkov.net>
To: Andrea Corallo <acorallo@gnu.org>
Cc: emacs-devel@gnu.org
Subject: remove-overlays test [was: * lisp/hi-lock.el: More fixes for revert-buffer (bug#57534)]
Date: Fri, 28 Jun 2024 09:43:30 +0300	[thread overview]
Message-ID: <867ce98t4d.fsf_-_@mail.linkov.net> (raw)
In-Reply-To: <yp1ttheky2j.fsf@fencepost.gnu.org> (Andrea Corallo's message of "Thu, 27 Jun 2024 15:03:32 -0400")

> just to mention this is causing a regression on my testbench:

Thanks for the heads-up.  The problem is that in 'remove-overlays'
values are compared with 'eq', and there is no way to specify
another test function.

This important detail is still missing in (info "(elisp) Managing Overlays")
(this could be added now), whereas the docstring was updated recently via
bug#13648.

This example demonstrates the problem:

(with-temp-buffer
  (insert "str")
  (let ((prop "a")
	(ov (make-overlay (point-min) (point-max))))
    (overlay-put ov 'prop prop)
    (remove-overlays nil nil 'prop prop)
    (overlays-in (point-min) (point-max))))
=> nil

(with-temp-buffer
  (insert "str")
  (let ((ov (make-overlay (point-min) (point-max))))
    (overlay-put ov 'prop "a")
    (remove-overlays nil nil 'prop "a")
    (overlays-in (point-min) (point-max))))
=> (#<overlay in no buffer>)

So this is fixed now by using the same string for 'eq'.



  reply	other threads:[~2024-06-28  6:43 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <171951175019.5752.4559993590758222831@vcs2.savannah.gnu.org>
     [not found] ` <20240627180913.2E298C1FB74@vcs2.savannah.gnu.org>
2024-06-27 19:03   ` emacs-30 6d94090cadc: * lisp/hi-lock.el: More fixes for revert-buffer (bug#57534) Andrea Corallo
2024-06-28  6:43     ` Juri Linkov [this message]
2024-06-28 11:54       ` remove-overlays test [was: * lisp/hi-lock.el: More fixes for revert-buffer (bug#57534)] 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=867ce98t4d.fsf_-_@mail.linkov.net \
    --to=juri@linkov.net \
    --cc=acorallo@gnu.org \
    --cc=emacs-devel@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.