Hrvoje Niksic writes:
Colin Rafferty <craffert(a)ms.com> writes:
> Could someone please explain to me why `set-text-properties'
is
> ideologically blasphemous.
Because it removes *all* the properties, not only those that your
application has set up. This can be catastrophic for hooks that
depend on properties being preserved.
It is a much better coding practice to remove the properties you
consider harmful (e.g. `read-only' or `keymap') using
`remove-text-properties'.
> Specifically, I want to get rid of all text properties on a
string,
> and I don't see why it is really such a big deal.
It may not be all that blasphemous for strings that you copy out of
a
buffer. Still, it's best avoided, unless you're sure you need it.
Thanks for the explanation.
My basic problem is that I am copying strings from a buffer and
writing them out. In some versions of emacs, this write text-property
crap into the output file.
Since I know what I want, and it is my code's file that I am removing
the properties from, I feel justified in using `set-text-properties'.
Again, thanks.
--
Colin