From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.bugs Subject: bug#30823: 25.3; modification-hooks of overlays are not run in some cases Date: Thu, 13 Sep 2018 16:43:50 +0300 Message-ID: <83h8itldgp.fsf@gnu.org> References: <83lgetri7r.fsf@gnu.org> <87in9cpd3a.fsf@gmail.com> <87in48ww9l.fsf@gmail.com> <83o9e0f9uj.fsf@gnu.org> <87tvnluvp4.fsf@gmail.com> <83bm9tb2yj.fsf@gnu.org> <875zzrrzv6.fsf@gmail.com> <83h8ja395r.fsf@gnu.org> <87sh2tqikk.fsf@gmail.com> <83sh2gmeic.fsf@gnu.org> <87in3afadu.fsf@gmail.com> NNTP-Posting-Host: blaine.gmane.org X-Trace: blaine.gmane.org 1536846186 3481 195.159.176.226 (13 Sep 2018 13:43:06 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Thu, 13 Sep 2018 13:43:06 +0000 (UTC) Cc: victorhge@gmail.com, 30823@debbugs.gnu.org, monnier@iro.umontreal.ca To: Noam Postavsky Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Thu Sep 13 15:43:02 2018 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1g0Rtd-0000lG-W1 for geb-bug-gnu-emacs@m.gmane.org; Thu, 13 Sep 2018 15:43:02 +0200 Original-Received: from localhost ([::1]:42602 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1g0Rvk-0002P2-Hn for geb-bug-gnu-emacs@m.gmane.org; Thu, 13 Sep 2018 09:45:12 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:36052) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1g0Rvd-0002Ow-Ty for bug-gnu-emacs@gnu.org; Thu, 13 Sep 2018 09:45:06 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1g0Rva-00053E-Np for bug-gnu-emacs@gnu.org; Thu, 13 Sep 2018 09:45:05 -0400 Original-Received: from debbugs.gnu.org ([208.118.235.43]:34605) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1g0Rva-000534-Ja for bug-gnu-emacs@gnu.org; Thu, 13 Sep 2018 09:45:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1g0Rva-0003jD-Ga for bug-gnu-emacs@gnu.org; Thu, 13 Sep 2018 09:45:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 13 Sep 2018 13:45:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 30823 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch Original-Received: via spool by 30823-submit@debbugs.gnu.org id=B30823.153684627114274 (code B ref 30823); Thu, 13 Sep 2018 13:45:02 +0000 Original-Received: (at 30823) by debbugs.gnu.org; 13 Sep 2018 13:44:31 +0000 Original-Received: from localhost ([127.0.0.1]:38863 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1g0Rv5-0003iA-Ir for submit@debbugs.gnu.org; Thu, 13 Sep 2018 09:44:31 -0400 Original-Received: from eggs.gnu.org ([208.118.235.92]:43092) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1g0Rv3-0003hv-Gq for 30823@debbugs.gnu.org; Thu, 13 Sep 2018 09:44:29 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1g0Ruu-0004XL-Vd for 30823@debbugs.gnu.org; Thu, 13 Sep 2018 09:44:24 -0400 Original-Received: from fencepost.gnu.org ([2001:4830:134:3::e]:35028) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1g0Rud-0004Hi-L5; Thu, 13 Sep 2018 09:44:03 -0400 Original-Received: from [176.228.60.248] (port=4558 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1g0Rud-000717-5O; Thu, 13 Sep 2018 09:44:03 -0400 In-reply-to: <87in3afadu.fsf@gmail.com> (message from Noam Postavsky on Wed, 12 Sep 2018 21:34:37 -0400) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] 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" Xref: news.gmane.org gmane.emacs.bugs:150280 Archived-At: > From: Noam Postavsky > Cc: victorhge@gmail.com, 30823@debbugs.gnu.org, monnier@iro.umontreal.ca > Date: Wed, 12 Sep 2018 21:34:37 -0400 > > Eli Zaretskii writes: > > > No, the protection was meant to be more general: to avoid calling > > overlay modification hooks when the overlay in question is from the > > wrong buffer. > > Ah, well I see your new patch fulfills this mission better (the old one > only looked the first overlay, so it seemed rather specific to > bug#21824). Yes, because the original change only considered the case of a wrong buffer, it didn't consider the case of a deleted overlay, where the buffer is nil. > > I'm not opposed to making the change you suggested for xdisp.c > > (although maybe it should go to master, not to emacs-26), but I would > > like to keep the protection in buffer.c. > > Funny, I feel the same but in reverse. Your patch should only affect > the case where overlays are deleted/moved by modification hooks which is > already a grey area, so the change is *probably* okay; but I would put > it in master in case of unforseen side effects. My rationale was that the changes in buffer.c fix a regression, whereas the changes in xdisp.c fix a potential problem for which we don't yet have a bug report. > I can confirm it works, and the change seems generally sensible. I > think it does make sense to have the xdisp.c change as well. The choice > of branch is up to you, of course. Well, unless you feel strongly against, I'd prefer to have the xdisp.c change on master, and the buffer.c change (with the added test) on emacs-26. Thanks.