From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: Oliver Scholz Newsgroups: gmane.emacs.devel Subject: Re: enriched-mode and switching major modes. Date: Wed, 15 Sep 2004 10:06:16 +0200 Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Message-ID: References: <200409042358.i84Nwjt19152@raven.dms.auburn.edu> <87llfn5ihw.fsf@emacswiki.org> <200409150139.i8F1dxa22225@raven.dms.auburn.edu> NNTP-Posting-Host: deer.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Trace: sea.gmane.org 1095236054 1587 80.91.229.6 (15 Sep 2004 08:14:14 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Wed, 15 Sep 2004 08:14:14 +0000 (UTC) Cc: boris@gnu.org, alex@emacswiki.org, rms@gnu.org, emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Wed Sep 15 10:13:55 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 1C7Uv6-0000oE-00 for ; Wed, 15 Sep 2004 10:13:40 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.33) id 1C7V0i-0000ge-Eb for ged-emacs-devel@m.gmane.org; Wed, 15 Sep 2004 04:19:28 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.33) id 1C7V0H-0000g6-ER for emacs-devel@gnu.org; Wed, 15 Sep 2004 04:19:01 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.33) id 1C7V0E-0000fi-96 for emacs-devel@gnu.org; Wed, 15 Sep 2004 04:18:59 -0400 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.33) id 1C7V0D-0000fR-VY for emacs-devel@gnu.org; Wed, 15 Sep 2004 04:18:58 -0400 Original-Received: from [213.165.64.20] (helo=mail.gmx.net) by monty-python.gnu.org with smtp (Exim 4.34) id 1C7Uua-0007E6-7i for emacs-devel@gnu.org; Wed, 15 Sep 2004 04:13:08 -0400 Original-Received: (qmail 25422 invoked by uid 65534); 15 Sep 2004 08:06:25 -0000 Original-Received: from dsl-082-083-143-140.arcor-ip.net (EHLO USER-2MOEN8BWBA.gmx.de) (82.83.143.140) by mail.gmx.net (mp009) with SMTP; 15 Sep 2004 10:06:25 +0200 X-Authenticated: #1497658 Original-To: Luc Teirlinck In-Reply-To: <200409150139.i8F1dxa22225@raven.dms.auburn.edu> (Luc Teirlinck's message of "Tue, 14 Sep 2004 20:39:59 -0500 (CDT)") X-Attribution: os X-Face: "HgH2sgK|bfH$; PiOJI6|qUCf.ve<51_Od(%ynHr?=>znn#~#oS>",F%B8&\vus),2AsPYb -n>PgddtGEn}s7kH?7kH{P_~vu?]OvVN^qD(L)>G^gDCl(U9n{:d>'DkilN!_K"eNzjrtI4Ya6; Td% IZGMbJ{lawG+'J>QXPZD&TwWU@^~A}f^zAb[Ru;CT(UA]c& User-Agent: Gnus/5.1006 (Gnus v5.10.6) Emacs/21.3.50 (windows-nt) 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:27126 X-Report-Spam: http://spam.gmane.org/gmane.emacs.devel:27126 Luc Teirlinck 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.