From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: Alex Schroeder Newsgroups: gmane.emacs.devel Subject: Re: enriched-mode and switching major modes. Date: Mon, 06 Sep 2004 21:01:47 +0200 Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Message-ID: <87llfn5ihw.fsf@emacswiki.org> References: <200409042358.i84Nwjt19152@raven.dms.auburn.edu> NNTP-Posting-Host: deer.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: sea.gmane.org 1094497350 6956 80.91.224.253 (6 Sep 2004 19:02:30 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Mon, 6 Sep 2004 19:02:30 +0000 (UTC) Cc: boris@gnu.org, rms@gnu.org, emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Mon Sep 06 21:02:21 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 1C4Okv-00043k-00 for ; Mon, 06 Sep 2004 21:02:21 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.33) id 1C4Oq7-0002aB-0O for ged-emacs-devel@m.gmane.org; Mon, 06 Sep 2004 15:07:43 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.33) id 1C4Oq0-0002Zv-JI for emacs-devel@gnu.org; Mon, 06 Sep 2004 15:07:36 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.33) id 1C4Opx-0002ZZ-No for emacs-devel@gnu.org; Mon, 06 Sep 2004 15:07:36 -0400 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.33) id 1C4Opx-0002ZP-Ku for emacs-devel@gnu.org; Mon, 06 Sep 2004 15:07:33 -0400 Original-Received: from [62.2.95.247] (helo=smtp.hispeed.ch) by monty-python.gnu.org with esmtp (TLSv1:DES-CBC3-SHA:168) (Exim 4.34) id 1C4Oki-0002m6-0c; Mon, 06 Sep 2004 15:02:08 -0400 Original-Received: from confusibombus (80-218-4-216.dclient.hispeed.ch [80.218.4.216]) by smtp.hispeed.ch (8.12.6/8.12.6/tornado-1.0) with ESMTP id i86J1mls023539 (version=TLSv1/SSLv3 cipher=RC4-SHA bits=128 verify=NO); Mon, 6 Sep 2004 21:01:49 +0200 Original-Received: from alex by confusibombus with local (Exim 4.34) id 1C4OkN-0000pa-RV; Mon, 06 Sep 2004 21:01:48 +0200 Original-To: Oliver Scholz Face: iVBORw0KGgoAAAANSUhEUgAAADAAAAAwCAYAAABXAvmHAAACkElEQVR42s1a0bLsIAgzjv// y7kPd9pVKxKVdk6fzux2C4EAwR6QZBpcQEopIf3Fq3a52Lfh0Mjjk99zcWYBwA2ihEen9jVxfAf/ u0+Y2HQwNoVw4Dx34trRV6NSjiLPmfPt77jwiBxB/3PnZ3B2AGxzHnGu0wcBwAIAyQwZGvQhiFcy YLOFQcSB/MS82n3ec37vykNqRFTX9rVWR2U5+pZNIggll0CUOQN9BDdm1LfBmcZxIEqjL6r2JU/D galaB7Zg4jlY2ulnIx9OR4iMRl38CAFyKaA8jAxE7lNn650VKMULZ/54crqn0YQCJGQliebXkFIK hwqmGm28cgsSjz/hzRCMneQEwMjVoH3gWTtMPgIslJUV5uIluvUEkyzU+gUGQO62e9NuSdZCzNOM fDPC87iCqfE9gHinsIrSL16TPBfrYIeHzqKU90a50jCh54EcrgAUFo5ibzvebgr/I66USQ0CspQp IVSoBQK3WswDDIndIraHxoglqOjM1d044PQvu1NY0EHtqQR/XwJ+PeCs0x2dSlApZVw4MPER23PD 7JekoHxrqTRod/2Gx5nhx5dfAJhqPt7tDMIZxNN/7lOIaparPn7ZQ88drlORC2eLWXowxIq4gHTh VN1BSmsHoxYAbPWDTuGQuuecS+aYQUYpfr0YqPQOuuUk5tApK077+2xfOYP+XyWEIwPcE49lvT9N y2+wU2KylGGp4yxlALcm6fSlmgk62yfSsfNunDl5d6W91MBUoZw679YAJoMMkhijuXdFOL+khaL2 s+g3zy4APQuQvSc/BNAYnkl6E8ivYtEHJXa1dihE3zgnKMdNgN8DiIwgA17NykUMvFDQ+LALvXXI BuBLAHv/DvBmc/0HzR03PqXmLcQAAAAASUVORK5CYII= In-Reply-To: (Oliver Scholz's message of "Mon, 06 Sep 2004 09:36:21 +0200") User-Agent: Gnus/5.1003 (Gnus v5.10.3) 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:26834 X-Report-Spam: http://spam.gmane.org/gmane.emacs.devel:26834 Oliver Scholz writes: > IMO opinion enriched-mode actually serves two purposes: (1) editing of > (very restricted) WP-like documents in the format text/enriched (2) a > means to save the colours that appear in a buffer in a file. I agree with the analysis and also prefer to make enriched-mode a major-mode based on text-mode. As to (2) -- assume this is a programming language: The markup added by enriched-mode will essentially change the file and make it unusable. Therefore I think (2) could be served with a new defun M-x save-buffer-as-enriched-text or something like that. This will prompt the user for a new file-name, making it clear that the original file should not be overwritten. Maybe default to current-name + ".enriched". Reloading the file will the use the new major-mode enriched-mode. True, the current implementation allows future derivatives of text-mode -- such as a major mode to write movie scripts -- to add persistent colors to the text. But how often is this power used? And at what cost does this power come? Even if we wanted this power, wouldn't it be better if such modes could just add some defun to a hook or two that would automatically do the right thing: Automatically encode and decode text properties upon saving and reading files. Without all the other features of enriched mode which are rarely useful in this case, such as the the treatment of newlines or the keybindings. Alex. -- .O. http://www.emacswiki.org/alex/ ..O Schroeder's fifth law: OOO Never accept more work than you can handle in one night of hacking.