[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: enriched-mode and switching major modes.

From: Alex Schroeder
Subject: Re: enriched-mode and switching major modes.
Date: Mon, 06 Sep 2004 21:01:47 +0200
User-agent: Gnus/5.1003 (Gnus v5.10.3) Emacs/21.3.50 (gnu/linux)

Oliver Scholz <address@hidden> 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

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

.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.

reply via email to

[Prev in Thread] Current Thread [Next in Thread]