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: Sun, 19 Aug 2018 17:46:55 +0300 Message-ID: <834lfqfm74.fsf@gnu.org> References: <83lgetri7r.fsf@gnu.org> <87in9cpd3a.fsf@gmail.com> <87in48ww9l.fsf@gmail.com> <83o9e0f9uj.fsf@gnu.org> NNTP-Posting-Host: blaine.gmane.org X-Trace: blaine.gmane.org 1534689966 15672 195.159.176.226 (19 Aug 2018 14:46:06 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Sun, 19 Aug 2018 14:46:06 +0000 (UTC) Cc: victorhge@gmail.com, npostavs@gmail.com, 30823@debbugs.gnu.org To: Stefan Monnier Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Sun Aug 19 16:46: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 1frOxt-0003xH-O8 for geb-bug-gnu-emacs@m.gmane.org; Sun, 19 Aug 2018 16:46:01 +0200 Original-Received: from localhost ([::1]:43083 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1frP00-0001lR-2S for geb-bug-gnu-emacs@m.gmane.org; Sun, 19 Aug 2018 10:48:12 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:47295) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1frOzt-0001lJ-Fv for bug-gnu-emacs@gnu.org; Sun, 19 Aug 2018 10:48:06 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1frOzq-0003Np-BU for bug-gnu-emacs@gnu.org; Sun, 19 Aug 2018 10:48:05 -0400 Original-Received: from debbugs.gnu.org ([208.118.235.43]:49716) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1frOzq-0003Nk-7x for bug-gnu-emacs@gnu.org; Sun, 19 Aug 2018 10:48:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1frOzq-0000fs-4f for bug-gnu-emacs@gnu.org; Sun, 19 Aug 2018 10:48: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: Sun, 19 Aug 2018 14:48: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.15346900322520 (code B ref 30823); Sun, 19 Aug 2018 14:48:02 +0000 Original-Received: (at 30823) by debbugs.gnu.org; 19 Aug 2018 14:47:12 +0000 Original-Received: from localhost ([127.0.0.1]:54734 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1frOz1-0000ea-No for submit@debbugs.gnu.org; Sun, 19 Aug 2018 10:47:11 -0400 Original-Received: from eggs.gnu.org ([208.118.235.92]:54259) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1frOyz-0000eN-Hy for 30823@debbugs.gnu.org; Sun, 19 Aug 2018 10:47:10 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1frOyr-0002xu-8r for 30823@debbugs.gnu.org; Sun, 19 Aug 2018 10:47:04 -0400 Original-Received: from fencepost.gnu.org ([2001:4830:134:3::e]:50564) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1frOyr-0002xq-6F; Sun, 19 Aug 2018 10:47:01 -0400 Original-Received: from [176.228.60.248] (port=2920 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1frOyq-0002GF-QZ; Sun, 19 Aug 2018 10:47:01 -0400 In-reply-to: (message from Stefan Monnier on Sat, 18 Aug 2018 23:48:02 -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:149594 Archived-At: > From: Stefan Monnier > Cc: Noam Postavsky , victorhge@gmail.com, > 30823@debbugs.gnu.org > Date: Sat, 18 Aug 2018 23:48:02 -0400 > > > Can we turn the table and ask whether it makes sense to delete an > > overlay from the modification hooks of that same overlay? > > Yes, it very much does make sense: e.g. you want to keep track of > a "region unmodified" status, so you place an overlay over that region > with a modification hook that sets a variable to nil to indicate that > the region was modified, and once that is done there's no point in > keeping the overlay any more so you can delete it immediately from that > modification-hook. I see that I tried too hard to be gentle, and that must have made my question unclear, because that's not what I was asking. I was asking whether we want to support code which does this, because maybe it is unreasonable to delete an overlay from within its modification hook.