From xemacs-m  Thu Feb  6 22:46:33 1997
Received: from altair.xemacs.org (steve@xemacs.miranova.com [206.190.83.19])
	by xemacs.org (8.8.5/8.8.5) with ESMTP id WAA27901
	for <xemacs-beta@xemacs.org>; Thu, 6 Feb 1997 22:46:31 -0600 (CST)
Received: (from steve@localhost)
	by altair.xemacs.org (8.8.5/8.8.5) id UAA21079;
	Thu, 6 Feb 1997 20:57:22 -0800
To: xemacs-beta@xemacs.org
Subject: Re: 20.0: recipe for extent_changed_for_redisplay crash
References: <QQcbun05817.199702070223@crystal.WonderWorks.COM> 	<m2wwslw9wl.fsf@altair.xemacs.org> <QQcbuv07458.199702070429@crystal.WonderWorks.COM>
X-Url: http://www.miranova.com/%7Esteve/
Mail-Copies-To: never
X-Face: #!T9!#9s-3o8)*uHlX{Ug[xW7E7Wr!*L46-OxqMu\xz23v|R9q}lH?cRS{rCNe^'[`^sr5"
 f8*@r4ipO6Jl!:Ccq<xoV[Qz2u8<8-+Vwf2gzJ44lf_/y9OaQ`@#Q65{U4/TC)i2`~/M&QI$X>p:9I
 OSS'2{-)-4wBnVeg0S\O4Al@)uC[pD|+
X-Attribution: sb
From: Steven L Baur <steve@miranova.com>
In-Reply-To: Kyle Jones's message of Thu, 6 Feb 1997 23:29:38 -0500 (EST)
Mime-Version: 1.0 (generated by tm-edit 7.101)
Content-Type: text/plain; charset=US-ASCII
Date: 06 Feb 1997 20:57:20 -0800
Message-ID: <m2lo91w6vj.fsf@altair.xemacs.org>
Lines: 54
X-Mailer: Gnus v5.4.11/XEmacs 20.0

Kyle Jones writes:

> Steven L. Baur writes:
>> duplicable & replicating extents looks like it's completely broken.
>> 
>> Why do we need this feature?  Nothing appears to be using it now.

> VM 6 uses them for MIME attachment tags in mail composition
> buffers.  The idea is that you move around attachments with
> normal editing commands.  I don't suppose the 'replicating
> property is really needed, since the text properties code gets by
> without it.

Adding 'replicating to duplicable extents guarantees that each
duplicated extent is eq.

 replicating        Meaningful only in conjunction with `duplicable'.
                    If this flag is set, extents that are copied from
                    buffers into strings are made children of the
                    original extent.  When the string is pasted back
                    into a buffer, the same extent (i.e. the `eq'
                    predicate applies) that was originally in the
                    buffer will be used if possible -- i.e. if the
                    extent is detached or the paste location abuts or
                    overlaps the extent.  This behavior is compatible
                    with the old "extent replica" behavior and was
                    apparently required by Energize.

If you can get by without it, please do so.  The code is very broken
now.

You're hitting this code

      if (!NILP (children))
	{
	  /* first mark all of the extent's children.  We will lose big-time
	     if there are any circularities here, so we sure as hell better
	     ensure that there aren't. */
	  LIST_LOOP (rest, XWEAK_LIST_LIST (children))
	    extent_changed_for_redisplay (XEXTENT (XCAR (rest)), 1);
	}

in extent_changed_for_redisplay(), and I don't see how you can fix it
short of keeping a table of all extents visited, which will slow
things down.

You can replace the final (delete-region 8 9) in your test case with
just about anything and force a crash.

This looks like an old feature for backwards compatibility to
something we don't support any more.  Let's kill it.
-- 
steve@miranova.com baur
Unsolicited commercial e-mail will be billed at $250/message.

