From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: storm@cua.dk (Kim F. Storm) Newsgroups: gmane.emacs.devel Subject: Re: enriched-mode and switching major modes. Date: Tue, 21 Sep 2004 13:32:18 +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> <867jqot0be.fsf@ketchup.de.uu.net> NNTP-Posting-Host: deer.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: sea.gmane.org 1095766419 4308 80.91.229.6 (21 Sep 2004 11:33:39 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Tue, 21 Sep 2004 11:33:39 +0000 (UTC) Cc: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Tue Sep 21 13:33:24 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 1C9itf-0006og-00 for ; Tue, 21 Sep 2004 13:33:23 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.33) id 1C9izb-0004FI-7P for ged-emacs-devel@m.gmane.org; Tue, 21 Sep 2004 07:39:31 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.33) id 1C9iyw-000422-4D for emacs-devel@gnu.org; Tue, 21 Sep 2004 07:38:50 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.33) id 1C9iyp-0003zR-EW for emacs-devel@gnu.org; Tue, 21 Sep 2004 07:38:44 -0400 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.33) id 1C9iyp-0003zO-3o for emacs-devel@gnu.org; Tue, 21 Sep 2004 07:38:43 -0400 Original-Received: from [212.88.64.25] (helo=mail-relay.sonofon.dk) by monty-python.gnu.org with smtp (Exim 4.34) id 1C9isg-0003Iw-Js for emacs-devel@gnu.org; Tue, 21 Sep 2004 07:32:23 -0400 Original-Received: (qmail 20500 invoked from network); 21 Sep 2004 11:32:21 -0000 Original-Received: from unknown (HELO kfs-l.imdomain.dk.cua.dk) (213.83.150.2) by 0 with SMTP; 21 Sep 2004 11:32:21 -0000 Original-To: Kai Grossjohann In-Reply-To: <867jqot0be.fsf@ketchup.de.uu.net> (Kai Grossjohann's message of "Tue, 21 Sep 2004 11:53:41 +0200") User-Agent: Gnus/5.1006 (Gnus v5.10.6) Emacs/21.3.50 (gnu/linux) 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:27366 X-Report-Spam: http://spam.gmane.org/gmane.emacs.devel:27366 Kai Grossjohann writes: > Richard Stallman writes: > >> Because of Lisp, a similar thing happens for text in an Emacs buffer. >> In a typical word processor, text has a visual appearance and a way it >> is saved in a file, that's all. In Emacs, text has a visual >> appearance, a way it is saved in a file, and the way it appears as >> Lisp data. We have to design all three. > > Talking about the Lisp representation, consider an enumerated list > 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. > > What should Lisp see and what shouldn't it see? > It depends on which "level" of Lisp you are talking about. On the level which must take the "deep representation" and show it on the screen, Lisp definitely need to look at 1., 2., line wrapping, etc. On the level which navigates "on the screen" in response to cursor movement, or searching, only looking at the "text" while ignoring the formatting makes sense. But it will probably have to be aware of it anyway to DTRT... I don't think you can have a surface presentation which is radically different from the deep representation without writing a suitable set of cursor movement commands to accomplish it. Maybe the 'line-move' framework could be extended to allow a specific surface presentation to mark things to be skipped over (it already does that in various ways, but maybe there is a way to generalize that so a minor/major mode can modify the behaviour). -- Kim F. Storm http://www.cua.dk