From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.bugs Subject: bug#21824: 25.0.50; overlay modification-hooks called with wrong buffer Date: Sat, 07 Nov 2015 20:07:57 +0200 Message-ID: <8337whpts2.fsf@gnu.org> References: <83611hvl0w.fsf@gnu.org> <8337wktols.fsf@gnu.org> <83twozqhhe.fsf@gnu.org> <838u6aqklr.fsf@gnu.org> Reply-To: Eli Zaretskii NNTP-Posting-Host: plane.gmane.org X-Trace: ger.gmane.org 1446919766 3109 80.91.229.3 (7 Nov 2015 18:09:26 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sat, 7 Nov 2015 18:09:26 +0000 (UTC) Cc: 21824@debbugs.gnu.org To: Noam Postavsky Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Sat Nov 07 19:09:15 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 1Zv7vK-0000fS-V8 for geb-bug-gnu-emacs@m.gmane.org; Sat, 07 Nov 2015 19:09:11 +0100 Original-Received: from localhost ([::1]:44835 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Zv7vK-0004V1-G7 for geb-bug-gnu-emacs@m.gmane.org; Sat, 07 Nov 2015 13:09:10 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:46929) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Zv7vH-0004Uu-6h for bug-gnu-emacs@gnu.org; Sat, 07 Nov 2015 13:09:08 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Zv7vC-0000VU-6m for bug-gnu-emacs@gnu.org; Sat, 07 Nov 2015 13:09:07 -0500 Original-Received: from debbugs.gnu.org ([208.118.235.43]:38134) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Zv7vC-0000V9-3v for bug-gnu-emacs@gnu.org; Sat, 07 Nov 2015 13:09:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.80) (envelope-from ) id 1Zv7vB-0001av-KE for bug-gnu-emacs@gnu.org; Sat, 07 Nov 2015 13:09:01 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 07 Nov 2015 18:09:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 21824 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 21824-submit@debbugs.gnu.org id=B21824.14469196886065 (code B ref 21824); Sat, 07 Nov 2015 18:09:01 +0000 Original-Received: (at 21824) by debbugs.gnu.org; 7 Nov 2015 18:08:08 +0000 Original-Received: from localhost ([127.0.0.1]:57075 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1Zv7uJ-0001Zk-T7 for submit@debbugs.gnu.org; Sat, 07 Nov 2015 13:08:08 -0500 Original-Received: from mtaout29.012.net.il ([80.179.55.185]:54177) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1Zv7uG-0001ZZ-LL for 21824@debbugs.gnu.org; Sat, 07 Nov 2015 13:08:05 -0500 Original-Received: from conversion-daemon.mtaout29.012.net.il by mtaout29.012.net.il (HyperSendmail v2007.08) id <0NXG00A00I5AKW00@mtaout29.012.net.il> for 21824@debbugs.gnu.org; Sat, 07 Nov 2015 20:07:23 +0200 (IST) Original-Received: from HOME-C4E4A596F7 ([84.94.185.246]) by mtaout29.012.net.il (HyperSendmail v2007.08) with ESMTPA id <0NXG004ZOICBKG50@mtaout29.012.net.il>; Sat, 07 Nov 2015 20:07:23 +0200 (IST) In-reply-to: X-012-Sender: halo1@inter.net.il 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:108545 Archived-At: > Date: Sat, 7 Nov 2015 11:22:50 -0500 > From: Noam Postavsky > Cc: 21824@debbugs.gnu.org > > On Sat, Nov 7, 2015 at 3:28 AM, Eli Zaretskii wrote: > >> global-highlight-parentheses-mode puts overlays in every buffer. > > > > Does it really mean to do that in *Messages*? If not, perhaps we > > should suggest to the developers of highlight-parentheses to exempt > > *Messages* from that, as that buffer is pretty specialized anyway. In > > particular, due to the way the message logging in *Messages* is > > implemented, the overlay modification hooks will only ever be called > > in that buffer with AFTER non-nil, and even that will only happen when > > Emacs decides to delete some text from *Messages*; inserting a new > > message there will never call the overlay modification hooks. > > Well, I suppose users may want parentheses highlighted in messages too. > > But note that the overlays created by highlight-parentheses-mode do > *not* have any modification-hooks. It's the triggering > modification-hooks of (yasnippet's) overlays in another buffer in > addition to the existence of (highlight-parentheses') overlays in > *Messages* that triggers the bug. Yes. My point was that *Messages* is a special buffer, and all kinds of stuff we take for granted behaves differently there. > > Yes, this looks good to me. How about creating a new file > > buffer-tests.el (the offending code is in buffer.c)? > > Okay, see attached. Thanks, pushed. Btw, the FSF copyright assignment lists a different email address for you. Which one is correct?