emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: enriched-mode and switching major modes.


From: Kim F. Storm
Subject: Re: enriched-mode and switching major modes.
Date: Tue, 21 Sep 2004 13:32:18 +0200
User-agent: Gnus/5.1006 (Gnus v5.10.6) Emacs/21.3.50 (gnu/linux)

Kai Grossjohann <address@hidden> writes:

> Richard Stallman <address@hidden> 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 <address@hidden> http://www.cua.dk





reply via email to

[Prev in Thread] Current Thread [Next in Thread]