From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Noam Postavsky Newsgroups: gmane.emacs.bugs Subject: bug#21824: 25.0.50; overlay modification-hooks called with wrong buffer Date: Fri, 6 Nov 2015 21:24:50 -0500 Message-ID: References: <83611hvl0w.fsf@gnu.org> <8337wktols.fsf@gnu.org> <83twozqhhe.fsf@gnu.org> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 X-Trace: ger.gmane.org 1446863187 5790 80.91.229.3 (7 Nov 2015 02:26:27 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sat, 7 Nov 2015 02:26:27 +0000 (UTC) Cc: 21824-done@debbugs.gnu.org To: Eli Zaretskii Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Sat Nov 07 03:26:16 2015 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1ZutCp-0001Jz-J1 for geb-bug-gnu-emacs@m.gmane.org; Sat, 07 Nov 2015 03:26:15 +0100 Original-Received: from localhost ([::1]:41895 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZutCj-0007hz-3V for geb-bug-gnu-emacs@m.gmane.org; Fri, 06 Nov 2015 21:26:09 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:33783) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZutCf-0007gS-Ke for bug-gnu-emacs@gnu.org; Fri, 06 Nov 2015 21:26:06 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ZutCc-0001RU-Ev for bug-gnu-emacs@gnu.org; Fri, 06 Nov 2015 21:26:05 -0500 Original-Received: from debbugs.gnu.org ([208.118.235.43]:37367) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZutCc-0001RN-Au for bug-gnu-emacs@gnu.org; Fri, 06 Nov 2015 21:26:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.80) (envelope-from ) id 1ZutCc-0000fZ-4m for bug-gnu-emacs@gnu.org; Fri, 06 Nov 2015 21:26:02 -0500 Resent-From: Noam Postavsky Original-Sender: "Debbugs-submit" Resent-To: bug-gnu-emacs@gnu.org Resent-Date: Sat, 07 Nov 2015 02:26:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: cc-closed 21824 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Mail-Followup-To: 21824@debbugs.gnu.org, npostavs@users.sourceforge.net, npostavs@users.sourceforge.net Original-Received: via spool by 21824-done@debbugs.gnu.org id=D21824.14468631112500 (code D ref 21824); Sat, 07 Nov 2015 02:26:01 +0000 Original-Received: (at 21824-done) by debbugs.gnu.org; 7 Nov 2015 02:25:11 +0000 Original-Received: from localhost ([127.0.0.1]:56305 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1ZutBm-0000eF-PL for submit@debbugs.gnu.org; Fri, 06 Nov 2015 21:25:11 -0500 Original-Received: from mail-ig0-f178.google.com ([209.85.213.178]:38276) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1ZutBT-0000dU-19 for 21824-done@debbugs.gnu.org; Fri, 06 Nov 2015 21:25:09 -0500 Original-Received: by igbxm8 with SMTP id xm8so22999940igb.1 for <21824-done@debbugs.gnu.org>; Fri, 06 Nov 2015 18:24:50 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:sender:in-reply-to:references:date:message-id:subject :from:to:cc:content-type; bh=Ac4hlNC9TEJ71abx02EB0DHWEJZgf8RS2JsG1kaT0Bc=; b=pJT9zNVZ98Q+IxNMRu8cPj5iBTV6gXNMSH/33oya01xgKHa8mZ5K5Kb42TR6povPKF 5ll8fF4Fvnaz30FKf0H8ZrB9NjkCH+s8b3AazxmBvL4GSHGzhlcQwoV875WZ3oVJIdAa FQUI7X/lAiXfHGFMZZAFYsMcMe1nXyryOHiX9odHD7+iId/sWwHsVyRzQIR/dojKrFzX f+I6bXRsVyh6v65jNW/yDS0UnIUb0zvBGRjv7pGyqYnwn/3MESHhH/Aw/mfQXQ219D3J nDrYzmH6T1ch8wExl8tLsdxt80XvlJ0g9DwFssaJG5vfLQi3oShVichSa8J/C4BBaJn8 ZtVQ== X-Received: by 10.50.32.69 with SMTP id g5mr12468341igi.35.1446863090376; Fri, 06 Nov 2015 18:24:50 -0800 (PST) Original-Received: by 10.79.119.2 with HTTP; Fri, 6 Nov 2015 18:24:50 -0800 (PST) In-Reply-To: <83twozqhhe.fsf@gnu.org> X-Google-Sender-Auth: 5zP-LSFr85ToYqKlGjQpIV_tfrA X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x X-Received-From: 208.118.235.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:108509 Archived-At: On Fri, Nov 6, 2015 at 10:23 AM, Eli Zaretskii 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))))))