From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: "Robert J. Chassell" Newsgroups: gmane.emacs.devel Subject: Re: enriched-mode and switching major modes. Date: Fri, 17 Sep 2004 15:08:17 +0000 (UTC) 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> Reply-To: bob@rattlesnake.com NNTP-Posting-Host: deer.gmane.org X-Trace: sea.gmane.org 1095433791 18147 80.91.229.6 (17 Sep 2004 15:09:51 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Fri, 17 Sep 2004 15:09:51 +0000 (UTC) Cc: boris@gnu.org, bob@rattlesnake.com, Oliver Scholz , alex@emacswiki.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Fri Sep 17 17:09:34 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 1C8KMf-0000Kn-00 for ; Fri, 17 Sep 2004 17:09:33 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.33) id 1C8KSO-0006sm-F2 for ged-emacs-devel@m.gmane.org; Fri, 17 Sep 2004 11:15:28 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.33) id 1C8KSC-0006sH-5Q for emacs-devel@gnu.org; Fri, 17 Sep 2004 11:15:16 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.33) id 1C8KSA-0006rb-MY for emacs-devel@gnu.org; Fri, 17 Sep 2004 11:15:15 -0400 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.33) id 1C8KSA-0006rQ-Hf for emacs-devel@gnu.org; Fri, 17 Sep 2004 11:15:14 -0400 Original-Received: from [69.168.110.189] (helo=rattlesnake.com) by monty-python.gnu.org with esmtp (Exim 4.34) id 1C8KML-0002Sp-4M; Fri, 17 Sep 2004 11:09:13 -0400 Original-Received: by rattlesnake.com via sendmail from stdin id (Debian Smail3.2.0.115) Fri, 17 Sep 2004 15:08:17 +0000 (UTC) Original-To: emacs-devel@gnu.org, In-reply-to: (message from Oliver Scholz on Thu, 16 Sep 2004 19:04:53 +0200) 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:27194 X-Report-Spam: http://spam.gmane.org/gmane.emacs.devel:27194 > I mean "the document's character data" here. The important point is > that formats suitable for WP (RTF, HTML ...) separate character data > from formatting information entirely. > > My point is that this is exactly what we must not do in Emacs, lest it > ruin everything in a subtle way. I think there is a confusion here: internally, Emacs works with a `deep representation'. People mostly work with `surface expressions'. Nowadays, the two can be different. In the old days, they were similar. (Oliver Scholz calls a deep representation the `encoded document file' and the surface expression the `visual (aural) representation' or `rendering'.) An Info file has a `deep representation' that you can see with `find-file-literally'. But many people look at Info files using `info' -- and what they see (or hear) is a `surface expression'. The Info `rendering' may convert a chapter heading with a line of asterisks below it to a heading without the asterisks and with a different font or voice. In its earliest days, Emacs always used what we now call `find-file-literally'. The rendering you saw was the deep representation. But ever since text properties and overlays were introduced, the deep representation has become different, or potentially different, from its rendering. (Images also look different than their deep representation.) The question is how far to go? * Should an HTML formatted line be displayed with formatting commands in it, as it is when using `find-file' or `find-file-literally', but with a different font or voice for the emphasized word when in W3 mode? (This is how it is now.) * Should a surface expression or rendering that is quite different from the deep representation be presented only in a read-only buffer? Or should a person be able to edit that rendering and be confident that the underlying `encoded document file' or deep representation will incorporate the correct tag? Put another way, when you type a command such as `C-c C-c i' (tempo-template-html-emphasized) in a buffer in HTML Helper mode, the string `' is inserted. Should you also be able to type that same command into a buffer in W3 mode and have that string be inserted properly in the `encoded document file'? Enriched mode illustrates this very well. When you run `find-file' on etc/enriched.doc you will see a line like this Colors: anything your screen can display... but with many colors. However, if you run `find-file-literally' on that same file, that line looks like this: Colors: redDarkSlateGrayanyDarkSlateGrayorangething yellowyourgreen screenblue light bluecanviolet display... The surface expression or rendering is different from the deep representation. Emacs already has shifted away from its beginnings. The question is not whether ... the appearance is represented by text in the buffer. That misses the point. One kind of appearance should always be shown when you run `find-file-literally'. That should represent what is saved, the `encoded document file'. That should be what is shown when you run `cat' on the file in a command line interface. The other kind of appearance should be shown when a display mode is invoked, as with Enriched mode and `find-file' or W3 mode and `w3'. The basic question is whether to install writing capabilities in surface expression buffers. Should typing `C-c C-c i' in a W3 mode buffer insert `' in a deep representation buffer? (If the latter, you should be able to look at the same HTML encoded buffer in several different modes in different windows: in W3 mode, in HTML Helper mode, and in whatever minor mode `find-file-literally' uses.) Texinfo already has one deep representation or `encoded document' form that is shown by `find-file-literally' and five `surface expressions'. (The surface renderings, however, do not come from the same file as the deep representation.) Texinfo mode, which is read-writable Info mode (and Emacspeak aural from Info) HTML XML DVI (and other printed) In the old days, surface expression rendering came directly from the rendition of the `encoded document' form, just like `find-file-literally' does now. Info showed files with asterisks below a chapter title. In those days, the only way to display the same document differently in different modes was to use different files. That ended and so `find-file-literally' had to be invented. At the moment, in Texinfo, the Texinfo mode (or `find-file-literally') file is writable. You cannot edit an Info expression and have the results show well in a printed book. Incidentally, I regularly use four of these renderings. I write and edit in Texinfo mode and I publish the resulting document in Info, HTML, DVI, PDF, and PostScript. -- Robert J. Chassell bob@rattlesnake.com GnuPG Key ID: 004B4AC8 http://www.rattlesnake.com http://www.teak.cc