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: Tue, 21 Sep 2004 14:43:46 +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> Original-Received: from lists.gnu.org ([199.232.76.165]) by deer.gmane.org with esmtp (Exim 3.35 #1 (Debian)) id 1C9lsq-0005ux-00 for ; Tue, 21 Sep 2004 16:44:44 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.33) id 1C9lyl-0004lp-QG for ged-emacs-devel@m.gmane.org; Tue, 21 Sep 2004 10:50:51 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.33) id 1C9lyE-0004Vc-8b for emacs-devel@gnu.org; Tue, 21 Sep 2004 10:50:18 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.33) id 1C9lyC-0004Ty-I3 for emacs-devel@gnu.org; Tue, 21 Sep 2004 10:50:16 -0400 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.33) id 1C9lyC-0004Th-DJ for emacs-devel@gnu.org; Tue, 21 Sep 2004 10:50:16 -0400 Original-Received: from [69.168.110.189] (helo=rattlesnake.com) by monty-python.gnu.org with esmtp (Exim 4.34) id 1C9ls0-0001Yr-QN for emacs-devel@gnu.org; Tue, 21 Sep 2004 10:43:53 -0400 Original-Received: by rattlesnake.com via sendmail from stdin id (Debian Smail3.2.0.115) Tue, 21 Sep 2004 14:43:46 +0000 (UTC) Original-To: emacs-devel@gnu.org In-reply-to: (message from Oliver Scholz on Tue, 21 Sep 2004 11:07:23 +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:27372 X-Report-Spam: http://spam.gmane.org/gmane.emacs.devel:27372 Previously, when talking about transforming documents, I have focused on two terms for thinking from an end user's (not a programmer's) point of view, "deep representation" and "surface expression". But three terms fit the situation more closely: "deep representation" "intermediate expression" "surface expression" Among other things, the additon enables us to talk about the Lisp object representation more readily. Suppose we want to display an enumerated list, such as Kai Grossjohann provided. In plain text it looks like this: 1. First item. This item has a lot of text to show what happens when it is multi-line. 2. Second item. 3. Third item. In Texinfo, the list looks like this: @enumerate @item First item. This item has a lot of text to show what happens when it is multi-line. @item Second item. @item Third item. @end enumerate The Texinfo source is the "deep representation" which is also the "encoded document file". For Info, makeinfo produces this: 1. First item. This item has a lot of text to show what happens when it is multi-line. 2. Second item. 3. Third item. (In the past, the Info file has been a permanent file rather than a temporary data structure. That does not matter for this discussion.) The Info output is a `surface expression' for one kind of human/computer interaction but the source for another. When talking about it as a source, it is an `intermediate expression'. Similarly for HTML. `makeinfo' currently produces this ugly looking output for that Texinfo source:
  1. First item. This item has a lot of text to show what happens when it is multi-line.
  2. Second item.
  3. Third item.
(The HTML should look more like
  1. First item. ....
  2. Second item.
  3. Third item.
but this is a digression.) Again the HTML is a surface expression in one circumstance (such as here in the mail message) and a source in another, such as when I look at my `test.html' file in Firefox. The term `intermediate expression' helps clarify this. A Lisp object representation is, from this point of view, another `intermediate expression'. It is not the "encoded document file" nor is it what a novice user looks at or listens to. (When a programmer works with the Lisp object representation, then it is to him a `surface expression.) In current Emacs Enriched mode, the deep representation is the version that is seen by `find-file-literally'. It has lots of angle brackets. The surface expression has colors (or if you listen to it, it has different voices, I think). In Enriched mode, the Lisp object representation is an `intermediate expression'. Of course, there are more steps to each process. For example, when you view an HTML file in Emacs W3 mode, the (simpliefied) sequence goes like this: test.texi --> test.html --> W3 buffer deep representation --> intermediate expression --> surface expression | | V V the `makeinfo' transform the W3 mode transform uses uses temporary data a Lisp object representation as an `intermediate expression' And depending on how you look at it, `test.html' may serve as a `deep representation' or as a `surface expression'. -- Robert J. Chassell bob@rattlesnake.com GnuPG Key ID: 004B4AC8 http://www.rattlesnake.com http://www.teak.cc