[Top][All Lists]

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

Re: Question about copy-region-as-kill

From: Miles Bader
Subject: Re: Question about copy-region-as-kill
Date: 07 Apr 2002 15:53:09 +0900

Colin Walters <address@hidden> writes:
> My point is that in this case overlays aren't being used for
> their primary purpose: specificity to the current buffer.  

I don't think the concept of a `primary purpose' is all that useful,
since it's rather objective; the original reason may be different that
current thinking, and one person's view may differ from another's.

>From my point of view, the _most_ important thing about overlays is that
they are distinct objects that are distinct from the text, and interact
with text properties and other overlays.

This gives them certain advantages:  an overlay can be quickly and
easily be moved or removed as a unit, possibly affecting many individual
properties; you can discover where a certain property came from, and
find other properties in the same overlay (even if they are otherwise
hidden by other overlays); you can have `layers' of properties that

However most of attributes are _disadvantages_ in many cases, where you
really just want to attach properties to the text; for such cases, text
properties are much more straightforward and easy to understand.

Not surprisingly, the particular advantages of overlays are most useful
for very dynamic properties (e.g. a highlighted region) that (surprise)
`overlay' the text.  [for this reason, it doesn't seem particularly
useful to have overlays be copyable like text properties; in my
experience overlays are often referred chiefly by an external reference
(e.g., a buffer-local variable).

> What I am trying to show is that the distinction between text
> properties and overlays is arbitrary.  Or at least it certainly has
> been in my experience.

I think you're quite wrong.

`...the Soviet Union was sliding in to an economic collapse so comprehensive
 that in the end its factories produced not goods but bads: finished products
 less valuable than the raw materials they were made from.'  [The Economist]

reply via email to

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