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: Eli Zaretskii <eliz <at> gnu.org>
To: Noam Postavsky <npostavs <at> gmail.com>
Cc: victorhge <at> gmail.com, 30823 <at> debbugs.gnu.org, monnier <at> iro.umontreal.ca
Subject: bug#30823: 25.3; modification-hooks of overlays are not run in some cases
Date: Thu, 13 Sep 2018 16:43:50 +0300
> From: Noam Postavsky <npostavs <at> gmail.com>
> Cc: victorhge <at> gmail.com,  30823 <at> debbugs.gnu.org,  monnier <at> iro.umontreal.ca
> Date: Wed, 12 Sep 2018 21:34:37 -0400
> 
> Eli Zaretskii <eliz <at> gnu.org> 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.




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.