GNU bug report logs - #30823
25.3; modification-hooks of overlays are not run in some cases

Previous Next

Package: emacs;

Reported by: Ren Victor <victorhge <at> gmail.com>

Date: Thu, 15 Mar 2018 04:17:02 UTC

Severity: normal

Tags: fixed, patch

Found in version 25.3

Fixed in version 26.2

Done: Noam Postavsky <npostavs <at> gmail.com>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: Noam Postavsky <npostavs <at> gmail.com>
To: Ren Victor <victorhge <at> gmail.com>
Cc: Eli Zaretskii <eliz <at> gnu.org>, 30823 <at> debbugs.gnu.org, Stefan Monnier <monnier <at> iro.umontreal.ca>
Subject: bug#30823: 25.3; modification-hooks of overlays are not run in some cases
Date: Fri, 17 Aug 2018 16:52:54 -0400
Noam Postavsky <npostavs <at> gmail.com> writes:

> @@ -10403,6 +10403,13 @@ message_dolog (const char *m, ptrdiff_t nbytes, bool nlflag, bool multibyte)
>  	  ptrdiff_t this_bol, this_bol_byte, prev_bol, prev_bol_byte;
>  	  printmax_t dups;
>  
> +          /* Since we call del_range_both passing false for PREPARE,
> +             we aren't prepared to run modification hooks (we could
> +             end up calling modification hooks from another buffer and
> +             only with AFTER=t, Bug#21824).  */
> +          ptrdiff_t count = SPECPDL_INDEX ();
> +          specbind (Qinhibit_modification_hooks, Qt);
> +
>  	  insert_1_both ("\n", 1, 1, true, false, false);
>  
>  	  scan_newline (Z, Z_BYTE, BEG, BEG_BYTE, -2, false);

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?

(adding Stefan to Cc since I think this somewhat relates to/collides
with the patch for *Messages* buffer text properties in
https://lists.gnu.org/archive/html/emacs-devel/2018-05/msg00600.html).





This bug report was last modified 6 years and 309 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.