all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Stefan Monnier via "Bug reports for GNU Emacs, the Swiss army knife of text editors" <bug-gnu-emacs@gnu.org>
To: Dmitry Gutov <dgutov@yandex.ru>
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 21:32:11 -0500	[thread overview]
Message-ID: <jwvo7tes005.fsf-monnier+emacs@gnu.org> (raw)
In-Reply-To: <9657304b-e6c2-6e4a-70cc-a24e24aa34ff@yandex.ru> (Dmitry Gutov's message of "Fri, 11 Nov 2022 04:13:03 +0200")

>> I'm not asking for any kind of justification, but I'm wondering what
>> would happen if you used a different sort order (i.e. the same but in
>> reverse, or sorted by overlays's end, ...): would the rest of the code
>> need to be adjusted?  If so, in a trivial way?  Or does some of the
>> algorithm rely crucially on this particular ordering?
>
> Most of the code there needs to use the "innermost" overlay, and more or
> less ignore the rest of them.

Hmm... but we're talking about `overlays-in`, so many/most overlays
might be completely disjoint and thus incomparable in the sense of
which one is "innermost".

> Another place which might be important is the order in which the 'face'
>  property is applied by Emacs (with 'priority' being equal).

Same here: this is designed for the case where all of those overlays
cover a given position, so they're not disjoint.  This said, sorting
using that same algorithm for disjoint overlays would end up sorting by
overlay-start, if I read the code correctly, so it might not be
a bad choice.


        Stefan






  reply	other threads:[~2022-11-11  2:32 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
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 [this message]
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=jwvo7tes005.fsf-monnier+emacs@gnu.org \
    --to=bug-gnu-emacs@gnu.org \
    --cc=59067@debbugs.gnu.org \
    --cc=dgutov@yandex.ru \
    --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.