From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: Richard Stallman Newsgroups: gmane.emacs.devel Subject: Re: enriched-mode and switching major modes. Date: Thu, 23 Sep 2004 05:29:46 -0400 Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Message-ID: References: <200409042358.i84Nwjt19152@raven.dms.auburn.edu> <87llfn5ihw.fsf@emacswiki.org> <01c49c75$Blat.v2.2.2$7a37cb00@zahav.net.il> <01c49d70$Blat.v2.2.2$f7cfb860@zahav.net.il> <01c49da7$Blat.v2.2.2$cd5f7160@zahav.net.il> <01c49dc6$Blat.v2.2.2$3b624d40@zahav.net.il> Original-Received: from lists.gnu.org ([199.232.76.165]) by deer.gmane.org with esmtp (Exim 3.35 #1 (Debian)) id 1CAPwu-0004J7-00 for ; Thu, 23 Sep 2004 11:31:36 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.33) id 1CAQ2v-0004LI-R6 for ged-emacs-devel@m.gmane.org; Thu, 23 Sep 2004 05:37:49 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.33) id 1CAQ26-0003pd-8E for emacs-devel@gnu.org; Thu, 23 Sep 2004 05:36:58 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.33) id 1CAQ23-0003nj-SZ for emacs-devel@gnu.org; Thu, 23 Sep 2004 05:36:56 -0400 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.33) id 1CAQ23-0003m3-Lj for emacs-devel@gnu.org; Thu, 23 Sep 2004 05:36:55 -0400 Original-Received: from [199.232.76.164] (helo=fencepost.gnu.org) by monty-python.gnu.org with esmtp (Exim 4.34) id 1CAPvA-0003qu-GX for emacs-devel@gnu.org; Thu, 23 Sep 2004 05:29:48 -0400 Original-Received: from rms by fencepost.gnu.org with local (Exim 4.34) id 1CAPv8-0000U8-Es; Thu, 23 Sep 2004 05:29:46 -0400 Original-To: Stefan Monnier In-reply-to: (message from Stefan Monnier on Wed, 22 Sep 2004 09:11:07 -0400) X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: main.gmane.org gmane.emacs.devel:27480 X-Report-Spam: http://spam.gmane.org/gmane.emacs.devel:27480 Without thinking too much about it, I'd say that overlays seem to be a better fit: each node is an overlay, the node's attributes can be stored in the overlay's properties, the text corresponding to a node can be stored directly in the buffer and retrieved by (buffer-substring (overlay-start o) (overlay-end o)), ... Overlays are no good for this because they will be lost completely if you cut and paste. If you copy the text of a buffer to another buffer, the overlays won't come along. (That is the purpose of overlays.) This information has to be *part of the text*.