Subject: bug#25592: Feature request: sorting overlays

From: Clément Pit--Claudel <[email-masked]>
Date: Thu, 2 Feb 2017 14:41:21 -0500

On 2017-02-01 08:01, Eli Zaretskii wrote:
>> From: Clément Pit--Claudel <[email-masked]>
>> Date: Tue, 31 Jan 2017 15:32:26 -0500
>>
>> Is there a way to get a list of all overlays in a buffer, sorted by priority?
> 
> I'm not sure I understand the request.  Do you mean that the result of
> this would be a list of overlays, where the first one is the overlay
> of the highest priority _anywhere_ in the buffer, the next one of the
> 2nd highest priority, possibly in an entirely different place in the
> buffer, and so on -- i.e. completely disregarding the overlay
> positions? 

Yup, that's what I mean.

> That's a very strange order.  Which job(s) need(s) such an
> order, and why?

I'm writing a function that copies overlay properties to text properties.  I reimplemented compare_overlays in ELisp, but that seems brittle.

Cheers,
Clément.