GNU bug report logs - #21824
25.0.50; overlay modification-hooks called with wrong buffer

Previous Next

Package: emacs;

Reported by: Noam Postavsky <npostavs <at> users.sourceforge.net>

Date: Wed, 4 Nov 2015 03:07:02 UTC

Severity: normal

Merged with 21819

Found in versions 24.5, 25.0.50

Done: Noam Postavsky <npostavs <at> users.sourceforge.net>

Bug is archived. No further changes may be made.

Full log


Message #33 received at 21824-done <at> debbugs.gnu.org (full text, mbox):

From: Noam Postavsky <npostavs <at> users.sourceforge.net>
To: Eli Zaretskii <eliz <at> gnu.org>
Cc: 21824-done <at> debbugs.gnu.org
Subject: Re: bug#21824: 25.0.50;
 overlay modification-hooks called with wrong buffer
Date: Fri, 6 Nov 2015 21:24:50 -0500
On Fri, Nov 6, 2015 at 10:23 AM, Eli Zaretskii <eliz <at> gnu.org> wrote:
> (It sounds like a very old bug, as all the
> pieces of the puzzle were not touched in at least 15 years.)

Quite likely, the circumstances required to trigger it are pretty specific.

>
> Please see if the original bug is solved by the latest master.

Yes, it's fixed.

>
> Btw, any idea how come overlays wound up in *Messages* in the original
> scenario?

global-highlight-parentheses-mode puts overlays in every buffer.

> Actually, would you like converting your test case into a test, and
> post a patch to the test suite to that effect?  TIA.

Something like this? I'm not sure where to put it.

(ert-deftest overlay-modification-hooks ()
  "Test for bug#21824."
  (let ((buf nil))
    (with-temp-buffer
      (insert "123")
      (overlay-put (make-overlay 1 3) 'modification-hooks
                   (list (lambda (ov &rest _)
                           (setq buf (current-buffer)))))
      (goto-char 2)
      (insert "x")
      (with-current-buffer "*Messages*"
        (make-overlay 1 1))
      (message "a message")
      (message "a message")
      (should (eq buf (current-buffer))))))




This bug report was last modified 6 years and 311 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.