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: David Kastrup
Subject: Re: enriched-mode and switching major modes.
Date: Thu, 23 Sep 2004 11:48:01 +0200
User-agent: Gnus/5.1006 (Gnus v5.10.6) Emacs/21.3.50 (gnu/linux)

Richard Stallman <address@hidden> writes:

>     Without thinking too much about it, I'd say that overlays seem
>     to be a better fit: each node is an overlay, the node's
>     attributes can be stored in the overlay's properties, the text
>     corresponding to a node can be stored directly in the buffer and
>     retrieved by (buffer-substring (overlay-start o) (overlay-end
>     o)), ...
>
> Overlays are no good for this because they will be lost completely
> if you cut and paste.  If you copy the text of a buffer to another
> buffer, the overlays won't come along.  (That is the purpose of
> overlays.)
>
> This information has to be *part of the text*.

I think that where we have structural information particular to the
buffer (like "this is a section heading"), it could be preferable if
this information got lost on copy&paste.  And also if I have some
indentation or formatting that is active due to the current document
structure, I would not want to get this pasted as well.  At least if
the structure is not copied completely.

OTOH, _if_ some entity is copied completely, then it would make sense
to carry over its structure.  So the task of the yank handler would be
to rip out everything which is not complete, but leave things that
_are_.

Ok, text properties after all, for most things.

-- 
David Kastrup, Kriemhildstr. 15, 44793 Bochum




reply via email to

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