all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Dmitry Gutov <dgutov@yandex.ru>
To: Stefan Monnier <monnier@iro.umontreal.ca>
Cc: 59067@debbugs.gnu.org, Ihor Radchenko <yantar92@posteo.net>,
	Eli Zaretskii <eliz@gnu.org>
Subject: bug#59067: 29.0.50; Exexpected overlay order in `overlays-in' return value
Date: Thu, 10 Nov 2022 23:00:51 +0200	[thread overview]
Message-ID: <e2f9422e-9e4a-4796-90d0-e203aca4d77a@yandex.ru> (raw)
In-Reply-To: <jwv4jv6tu4a.fsf-monnier+emacs@gnu.org>

On 10.11.2022 22:51, Stefan Monnier via Bug reports for GNU Emacs, the 
Swiss army knife of text editors wrote:
>>> Maybe Someone™ should browse through the various calls to `overlays-in`
>>> out there to try and see which orderings could be useful.
>> FWIW, mmm-mode uses overlay sorting based on the value of overlay-start
>> (first come overlays where this value is higher, so basically the more
>> deeply nested ones, if we imagine all overlays to be strictly nested, as is
>> the case with mmm-mode).
> AFAICT it sorts first based on priority and only for equal-priority
> overlays does it use the overlay's start.
> 
> Is there any specific reason for this particular ordering?

Historical, I suppose. mmm-mode doesn't set the 'priority' property 
these days (the little snippet of code doing that is commented out).

It kind of makes sense, but I don't have a better argument than that.

>> You can check it out here, it also seems reasonable as the potential default
>> sort:
>> https://git.savannah.gnu.org/cgit/emacs/elpa.git/tree/mmm-region.el?h=externals/mmm-mode#n148
>>
>> If it's not too expensive to use as default, that is.
> I was thinking of doing like we did for `overlays-at`, i.e. leave the
> default to "unsorted" but add a `sorted` argument.  This also acts as
> a reminder that the default is not sorted.

Yeah, ok.





  reply	other threads:[~2022-11-10 21:00 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-11-06  3:39 bug#59067: 29.0.50; Exexpected overlay order in `overlays-in' return value Ihor Radchenko
2022-11-06  6:26 ` Eli Zaretskii
2022-11-06  7:04   ` Ihor Radchenko
2022-11-06  7:16     ` Eli Zaretskii
2022-11-07 23:47       ` Matt Armstrong
2022-11-10 10:19       ` Eli Zaretskii
2022-11-10 14:03     ` Stefan Monnier via Bug reports for GNU Emacs, the Swiss army knife of text editors
2022-11-10 20:37       ` Dmitry Gutov
2022-11-10 20:51         ` Stefan Monnier via Bug reports for GNU Emacs, the Swiss army knife of text editors
2022-11-10 21:00           ` Dmitry Gutov [this message]
2022-11-10 21:56             ` Stefan Monnier via Bug reports for GNU Emacs, the Swiss army knife of text editors
2022-11-11  2:13               ` Dmitry Gutov
2022-11-11  2:32                 ` Stefan Monnier via Bug reports for GNU Emacs, the Swiss army knife of text editors
2022-11-11  7:48                 ` Eli Zaretskii

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=e2f9422e-9e4a-4796-90d0-e203aca4d77a@yandex.ru \
    --to=dgutov@yandex.ru \
    --cc=59067@debbugs.gnu.org \
    --cc=eliz@gnu.org \
    --cc=monnier@iro.umontreal.ca \
    --cc=yantar92@posteo.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.