From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: "Eli Zaretskii" Newsgroups: gmane.emacs.devel Subject: Re: enriched-mode and switching major modes. Date: Wed, 22 Sep 2004 07:54:23 +0300 Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Message-ID: <01c4a060$Blat.v2.2.2$60059660@zahav.net.il> 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> <01c4a00e$Blat.v2.2.2$7 Reply-To: Eli Zaretskii NNTP-Posting-Host: deer.gmane.org Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7BIT X-Trace: sea.gmane.org 1095829027 29511 80.91.229.6 (22 Sep 2004 04:57:07 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Wed, 22 Sep 2004 04:57:07 +0000 (UTC) Cc: boris@gnu.org, alkibiades@gmx.de, emacs-devel@gnu.org, alex@emacswiki.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Wed Sep 22 06:56:49 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 1C9zBQ-0005HQ-00 for ; Wed, 22 Sep 2004 06:56:49 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.33) id 1C9zHO-0008AI-Dd for ged-emacs-devel@m.gmane.org; Wed, 22 Sep 2004 01:02:58 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.33) id 1C9zHH-00088v-Fo for emacs-devel@gnu.org; Wed, 22 Sep 2004 01:02:51 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.33) id 1C9zHF-00086X-6E for emacs-devel@gnu.org; Wed, 22 Sep 2004 01:02:51 -0400 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.33) id 1C9zHF-00086P-3V for emacs-devel@gnu.org; Wed, 22 Sep 2004 01:02:49 -0400 Original-Received: from [192.114.186.15] (helo=balder.inter.net.il) by monty-python.gnu.org with esmtp (Exim 4.34) id 1C9zB9-0001nG-QR; Wed, 22 Sep 2004 00:56:32 -0400 Original-Received: from zaretski ([80.230.154.85]) by balder.inter.net.il (Mirapoint Messaging Server MOS 3.3.7-GR) with ESMTP id DUL64741 (AUTH halo1); Wed, 22 Sep 2004 06:56:25 +0200 (IST) Original-To: Stefan Monnier X-Mailer: emacs 21.3.50 (via feedmail 8 I) and Blat ver 2.2.2 In-reply-to: (message from Stefan Monnier on Tue, 21 Sep 2004 16:06:34 -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:27413 X-Report-Spam: http://spam.gmane.org/gmane.emacs.devel:27413 > Cc: rms@gnu.org, boris@gnu.org, alex@emacswiki.org, > emacs-devel@gnu.org, alkibiades@gmx.de > From: Stefan Monnier > Date: Tue, 21 Sep 2004 16:06:34 -0400 > > If it's explicit in the form of markup commands (as is the case in > tex-mode), then it's a non-issue (i.e. it's now an issue for the user > rather than for the word processor. Not really, not with complex styles. A style can have lots of complicated settings, and it could be very hard to undesrtand which ones are in effect, even with explicit markup, since some directives that set the style can be very far away of the text you are copying. It is even harder to understand what will happen when the copied text removes some of the directives or stretches into another style area. As the first approximation to guessing ``what the user wants'' I'd simply remove all style settings from the copied text and applied the settings of the target text portion when the text is pasted. It is not always the 100% right thing to do, but it is usually close, and simple commands (such as renumber an itemized list) can be added to fix whatever becomes broken as the result.