[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
insertion/deletion
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
USA
www.fsf.org www.gnu.org
Skype: No way! That's nonfree (freedom-denying) software.
Use Ekiga or an ordinary phone call.
Re: Overlay mechanic improvements,
Richard Stallman <=
- Re: Overlay mechanic improvements, Vladimir Kazanov, 2014/09/20
- Tokenizing, Richard Stallman, 2014/09/20
- Re: Tokenizing, Stephen Leake, 2014/09/20
- Re: Tokenizing, Vladimir Kazanov, 2014/09/20
- Re: Tokenizing, Eric Ludlam, 2014/09/20
- Re: Tokenizing, Vladimir Kazanov, 2014/09/20
- Re: parsing (was tokenizing), Stephen Leake, 2014/09/21
Re: Tokenizing, Vladimir Kazanov, 2014/09/20
Re: Tokenizing, Stefan Monnier, 2014/09/20
Re: Tokenizing, Stephen Leake, 2014/09/21