[Top][All Lists]

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

Re: Overlay mechanic improvements

From: Richard Stallman
Subject: Re: Overlay mechanic improvements
Date: Fri, 19 Sep 2014 14:03:52 -0400

[[[ To any NSA and FBI agents reading my email: please consider    ]]]
[[[ whether defending the US Constitution against all enemies,     ]]]
[[[ foreign or domestic, requires you to follow Snowden's example. ]]]

    It turns out that the only viable alternative to overlays is using text
    properties, and text properties were not meant for the purpose.

I designed text properties precisely for uses like this.

     All I need
    is an ability to save position pairs, the positions should survive text

I see multiple meanings for that; could you clarify?

                       and there should be a way to find those pairs given a
    buffer point.

Text properties are designed to be preserved through copying of text.
Overlays are not.  So it seems to me that you must use text properties.

For each token, you put a text property 'token' onto the characters in
the token.  The value of the property would say what token they are.
The property would be eq for all the characters in one token.

Then you can use 'next-single-char-property-change' and
'previous-single-char-property-change' to find the end and the
beginning of the token.

If you run into any difficulties using the existing interfaces
for text properties, we should improve the interfaces to make your
program easier to write.

Dr Richard Stallman
President, Free Software Foundation
51 Franklin St
Boston MA 02110
www.fsf.org  www.gnu.org
Skype: No way! That's nonfree (freedom-denying) software.
  Use Ekiga or an ordinary phone call.

reply via email to

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