From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: David Kastrup Newsgroups: gmane.emacs.devel Subject: Re: enriched-mode and switching major modes. Date: Thu, 23 Sep 2004 11:48:01 +0200 Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Message-ID: References: <200409042358.i84Nwjt19152@raven.dms.auburn.edu> <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> , alex@emacswiki.org, eliz@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Thu Sep 23 11:48:26 2004 Return-path: Original-Received: from lists.gnu.org ([199.232.76.165]) by deer.gmane.org with esmtp (Exim 3.35 #1 (Debian)) id 1CAQDC-0005Jd-00 for ; Thu, 23 Sep 2004 11:48:26 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.33) id 1CAQJD-0007h3-9H for ged-emacs-devel@m.gmane.org; Thu, 23 Sep 2004 05:54:39 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.33) id 1CAQIz-0007gF-M1 for emacs-devel@gnu.org; Thu, 23 Sep 2004 05:54:25 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.33) id 1CAQIz-0007g3-3U for emacs-devel@gnu.org; Thu, 23 Sep 2004 05:54:25 -0400 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.33) id 1CAQIz-0007ft-0p for emacs-devel@gnu.org; Thu, 23 Sep 2004 05:54:25 -0400 Original-Received: from [199.232.76.164] (helo=fencepost.gnu.org) by monty-python.gnu.org with esmtp (Exim 4.34) id 1CAQCv-0006Rv-OK for emacs-devel@gnu.org; Thu, 23 Sep 2004 05:48:09 -0400 Original-Received: from localhost ([127.0.0.1] helo=lola.goethe.zz) by fencepost.gnu.org with esmtp (Exim 4.34) id 1CAQCo-0001Nt-Hz; Thu, 23 Sep 2004 05:48:02 -0400 Original-To: rms@gnu.org In-Reply-To: (Richard Stallman's message of "Thu, 23 Sep 2004 05:29:46 -0400") User-Agent: Gnus/5.1006 (Gnus v5.10.6) Emacs/21.3.50 (gnu/linux) 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:27481 X-Report-Spam: http://spam.gmane.org/gmane.emacs.devel:27481 Richard Stallman writes: > 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*. I think that where we have structural information particular to the buffer (like "this is a section heading"), it could be preferable if this information got lost on copy&paste. And also if I have some indentation or formatting that is active due to the current document structure, I would not want to get this pasted as well. At least if the structure is not copied completely. OTOH, _if_ some entity is copied completely, then it would make sense to carry over its structure. So the task of the yank handler would be to rip out everything which is not complete, but leave things that _are_. Ok, text properties after all, for most things. -- David Kastrup, Kriemhildstr. 15, 44793 Bochum