emacs-devel
[Top][All Lists]
Advanced

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

Re: enriched-mode and switching major modes.


From: Oliver Scholz
Subject: Re: enriched-mode and switching major modes.
Date: Wed, 15 Sep 2004 10:06:16 +0200
User-agent: Gnus/5.1006 (Gnus v5.10.6) Emacs/21.3.50 (windows-nt)

Luc Teirlinck <address@hidden> writes:

> Oliver Scholz wrote:
>
>    However, about one thing I am positiv: there is absolutely no room
>    for a minor mode here.  That's why I say that enriched-mode (as a
>    minor mode) is a dead end.
>
> Note that with my latest patch you can essentially treat Enriched mode
> as a second major mode.  You are guaranteed that it runs _after_ the
> major mode, even if the user changes the major mode with Enriched mode
> enabled.  Hence you know that the major mode will not override any
> setting that is essential for proper functioning of Enriched mode.

But it would be a second major mode that steps on the other major
mode's toes, hits it in the stomach and says: "Heya, buddie! If ya
don't move, don't breath and do what I tell you, we'll be friends.
Otherwise you better get outa here."

When it is supposed to meet the requirements that I described, then
enriched-mode would need to be in full control of filling and maybe
even of font-lock; I am even tempted to say that it needs to be in
full control of the buffer contents and the interface to the user
(since it would introduce a significant difference between the buffer
contents and the abstract document).  At any rate the other major
mode must not be allowed to programatically change the buffer
contents in a way that is supposed to affect the visual appearance,
because that would mean that the document data structure and its
visual appearance get out of sync, which is tantamount to corrupting
the file, if the user falls for it.

> I do not believe that there is any requirement that Enriched mode be
> compatible with every single major mode.  That would be completely
> unrealistic and is currently already by no means the case.

I see. But while I appreciate your solution, I don't see anymore what
problem it is supposed to solve.  It turned out in this discussion that
the reason why enriched-mode should be more than the usual minor mode
is its future role in WP, while it should still be possible to use it
together with some of the text-modes.  I tried to explain the
difficulties the WP in Emacs will encounter.  Based on this reasoning,
I maintain, that this future WP mode is by no means compatible with
any of the text modes.  No way here.

Maybe I am missing some particular usage scenario.  But with what
major modes would such a fully fledged future WP mode be supposed to
work together?

You might argue that especially with what I described switching major
modes would mean lossage of data for the user.  So either there
should be a yes-or-no query before switching major modes or said data
should be preserved (in this case at the cost that the major mode
being switched to is not fully functional).  I'd argue that it is not
clear that blurrying the major-minor mode distinction is the best
solution to this.  At any rate it is really a future problem.

    Oliver
-- 
Oliver Scholz               30 Fructidor an 212 de la Révolution
Ostendstr. 61               Liberté, Egalité, Fraternité!
60314 Frankfurt a. M.       




reply via email to

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