From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: Kai Grossjohann Newsgroups: gmane.emacs.devel Subject: Re: enriched-mode and switching major modes. Date: Tue, 21 Sep 2004 11:53:41 +0200 Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Message-ID: <867jqot0be.fsf@ketchup.de.uu.net> References: <200409042358.i84Nwjt19152@raven.dms.auburn.edu> <87llfn5ihw.fsf@emacswiki.org> NNTP-Posting-Host: deer.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: sea.gmane.org 1095760521 21661 80.91.229.6 (21 Sep 2004 09:55:21 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Tue, 21 Sep 2004 09:55:21 +0000 (UTC) Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Tue Sep 21 11:55:12 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 1C9hMd-0000Pl-00 for ; Tue, 21 Sep 2004 11:55:11 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.33) id 1C9hSY-0004jm-K3 for ged-emacs-devel@m.gmane.org; Tue, 21 Sep 2004 06:01:18 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.33) id 1C9hSE-0004jX-To for emacs-devel@gnu.org; Tue, 21 Sep 2004 06:00:59 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.33) id 1C9hSD-0004j1-9n for emacs-devel@gnu.org; Tue, 21 Sep 2004 06:00:58 -0400 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.33) id 1C9hSD-0004im-3o for emacs-devel@gnu.org; Tue, 21 Sep 2004 06:00:57 -0400 Original-Received: from [80.91.229.2] (helo=main.gmane.org) by monty-python.gnu.org with esmtp (Exim 4.34) id 1C9hLh-0006La-6p for emacs-devel@gnu.org; Tue, 21 Sep 2004 05:54:13 -0400 Original-Received: from list by main.gmane.org with local (Exim 3.35 #1 (Debian)) id 1C9hLg-0000pE-00 for ; Tue, 21 Sep 2004 11:54:12 +0200 Original-Received: from 139.4.37.213 ([139.4.37.213]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Tue, 21 Sep 2004 11:54:12 +0200 Original-Received: from kai by 139.4.37.213 with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Tue, 21 Sep 2004 11:54:12 +0200 X-Injected-Via-Gmane: http://gmane.org/ Original-To: emacs-devel@gnu.org Original-Lines: 60 Original-X-Complaints-To: usenet@sea.gmane.org X-Gmane-NNTP-Posting-Host: 139.4.37.213 User-Agent: Gnus/5.110003 (No Gnus v0.3) Emacs/21.3.50 (gnu/linux) Cancel-Lock: sha1:Yqy2pj9hn/p3CHifc5ds7SGFfvw= 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:27365 X-Report-Spam: http://spam.gmane.org/gmane.emacs.devel:27365 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? I would expect Emacs to compute the numbers automatically, so that inserting an item into the middle would recompute the numbers. To me, this means it makes no sense to make the numbers themselves accessible via Lisp. But Lisp should see that there is an enumerated list using the "1." numbering style (as opposed to "1)" or "1/", say), and Lisp should see that the list has three items. I would also expect the line spacing between the items to vary depending on the style sheet. That is, Lisp shouldn't see two newline characters after "multi-line.", but just the end of the first item. Now let's talk about the newlines and spaces between "when" and "it" (in the first item). Suppose you decide that you want the item numbers to come out bold. Often, bold weight runs longer than medium weight. This means that the indentation of the "it" line might grow a bit. Does it really make sense to insert more spaces in front of "it" just because the user has changed the style sheet of the document to specify that enumerations should use bold numbers? Additionally, depending on the exact text, making the numbers wider could mean that the "when" does not fit on the line anymore. Making the newlines accessible via Lisp would mean that Lisp would suddenly see a newline in front of "when", instead of after "when". Now let's talk about cursor movement. I think that positioning point after "multi-line." and then hitting C-f should position point before "Second". The "2." part is not meaningfully editable, as it is computed automatically. The whitespace isn't meaningfully editable, either, since the amount depends on the stylesheet in use. I think that Lisp should have access to the stylesheet information, though. That is much more useful than knowing that "when" happens to be at the end of a line. For instance, I want to be able to search for enumeration items containing the word "when". (The search should ignore "when" occurring outside of enumerations.) What do people think? Kai