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: Mon, 20 Aug 2018 19:34:04 +0300 Message-ID: <83d0uddmkj.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 1534782794 14397 195.159.176.226 (20 Aug 2018 16:33:14 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Mon, 20 Aug 2018 16:33:14 +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 Mon Aug 20 18:33:09 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 1frn76-0003c4-Q7 for geb-bug-gnu-emacs@m.gmane.org; Mon, 20 Aug 2018 18:33:08 +0200 Original-Received: from localhost ([::1]:48137 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1frn9D-0006po-AR for geb-bug-gnu-emacs@m.gmane.org; Mon, 20 Aug 2018 12:35:19 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:36830) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1frn90-0006oH-85 for bug-gnu-emacs@gnu.org; Mon, 20 Aug 2018 12:35:07 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1frn8w-0000ch-JU for bug-gnu-emacs@gnu.org; Mon, 20 Aug 2018 12:35:06 -0400 Original-Received: from debbugs.gnu.org ([208.118.235.43]:50801) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1frn8w-0000cY-Eo for bug-gnu-emacs@gnu.org; Mon, 20 Aug 2018 12:35:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1frn8w-0005Gx-BO for bug-gnu-emacs@gnu.org; Mon, 20 Aug 2018 12:35: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: Mon, 20 Aug 2018 16:35: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.153478285820197 (code B ref 30823); Mon, 20 Aug 2018 16:35:02 +0000 Original-Received: (at 30823) by debbugs.gnu.org; 20 Aug 2018 16:34:18 +0000 Original-Received: from localhost ([127.0.0.1]:55819 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1frn8E-0005Fh-8d for submit@debbugs.gnu.org; Mon, 20 Aug 2018 12:34:18 -0400 Original-Received: from eggs.gnu.org ([208.118.235.92]:43887) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1frn8D-0005FU-DY for 30823@debbugs.gnu.org; Mon, 20 Aug 2018 12:34:17 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1frn84-0008TW-S4 for 30823@debbugs.gnu.org; Mon, 20 Aug 2018 12:34:12 -0400 Original-Received: from fencepost.gnu.org ([2001:4830:134:3::e]:37455) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1frn84-0008TP-OV; Mon, 20 Aug 2018 12:34:08 -0400 Original-Received: from [176.228.60.248] (port=1084 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1frn84-0004DW-CK; Mon, 20 Aug 2018 12:34:08 -0400 In-reply-to: (message from Stefan Monnier on Sun, 19 Aug 2018 16:46:09 -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:149618 Archived-At: > From: Stefan Monnier > Cc: Noam Postavsky , victorhge@gmail.com, > 30823@debbugs.gnu.org > Date: Sun, 19 Aug 2018 16:46:09 -0400 > > >> Coming back to this, there is also the possibility of passing true for > >> PREPARE, though I'm not sure if that would be better or worse. Any > >> comments? > > AFAIR, we never want to use PREPARE = true when dealing with the > > *Messages* buffer, you can see that elsewhere in message_dolog. The > > reason I believe is that we might trigger infinite recursion if the > > modification hooks log a message for some reason. > > The current code already allows running `message` in this way (and that > leads to suboptimal behavior, tho nothing really serious). I think we > should use `true` here and then actively try and detect nested uses of > `message` and deal with those in an ad-hoc way (e.g. bind > inhibit-modification-hooks during the nested call so the recursion is at > most 2 deep). That doesn't cater to some of the uses of 'message', as I explained in the discussion to which you pointed. > The patch I sent in > https://lists.gnu.org/archive/html/emacs-devel/2018-05/msg00600.html > went in this direction and my experimentation with it did not encounter > any serious problem. IOW I think the comment near message_dolog is > largely out of date. Once again, interested readers may wish to read the whole discussion, because some of the issues raised there are not taken care of by this function, and some of the comment is justified, as I tried to explain.