From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Stefan Monnier via "Bug reports for GNU Emacs, the Swiss army knife of text editors" Newsgroups: gmane.emacs.bugs Subject: bug#59067: 29.0.50; Exexpected overlay order in `overlays-in' return value Date: Thu, 10 Nov 2022 15:51:04 -0500 Message-ID: References: <871qqgn44l.fsf@localhost> <838rko38g6.fsf@gnu.org> <878rkobm21.fsf@localhost> Reply-To: Stefan Monnier Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="37481"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Cc: 59067@debbugs.gnu.org, Ihor Radchenko , Eli Zaretskii To: Dmitry Gutov Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Thu Nov 10 21:52:23 2022 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1otEX7-0009Xu-N1 for geb-bug-gnu-emacs@m.gmane-mx.org; Thu, 10 Nov 2022 21:52:21 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1otEWq-0000OX-26; Thu, 10 Nov 2022 15:52:04 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1otEWo-0000Kv-He for bug-gnu-emacs@gnu.org; Thu, 10 Nov 2022 15:52:02 -0500 Original-Received: from debbugs.gnu.org ([209.51.188.43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1otEWo-0003xp-9f for bug-gnu-emacs@gnu.org; Thu, 10 Nov 2022 15:52:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1otEWn-0003Wu-OT for bug-gnu-emacs@gnu.org; Thu, 10 Nov 2022 15:52:01 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Stefan Monnier Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 10 Nov 2022 20:52:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 59067 X-GNU-PR-Package: emacs Original-Received: via spool by 59067-submit@debbugs.gnu.org id=B59067.166811347813521 (code B ref 59067); Thu, 10 Nov 2022 20:52:01 +0000 Original-Received: (at 59067) by debbugs.gnu.org; 10 Nov 2022 20:51:18 +0000 Original-Received: from localhost ([127.0.0.1]:44502 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1otEW6-0003W1-IV for submit@debbugs.gnu.org; Thu, 10 Nov 2022 15:51:18 -0500 Original-Received: from mailscanner.iro.umontreal.ca ([132.204.25.50]:4993) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1otEW2-0003Vl-0O for 59067@debbugs.gnu.org; Thu, 10 Nov 2022 15:51:17 -0500 Original-Received: from pmg2.iro.umontreal.ca (localhost.localdomain [127.0.0.1]) by pmg2.iro.umontreal.ca (Proxmox) with ESMTP id 42138807AF; Thu, 10 Nov 2022 15:51:08 -0500 (EST) Original-Received: from mail01.iro.umontreal.ca (unknown [172.31.2.1]) by pmg2.iro.umontreal.ca (Proxmox) with ESMTP id DC676804C0; Thu, 10 Nov 2022 15:51:05 -0500 (EST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=iro.umontreal.ca; s=mail; t=1668113465; bh=N5apHGp9HacqeayFkHz6oh12rx1kbDKFAf3LLECdi+M=; h=From:To:Cc:Subject:In-Reply-To:References:Date:From; b=VPWQQJUJxq1G58nL/SKR1LT+NpbnJUKE/eSapc34mwXivQkdSZ0bP84SUry7I5o5p ihHMv3fX79d1vUyFWxxtVTwATw26TSDIOP3KkFsFLRcS7RcKWZfIXFpc+XT/VeJgom 3mohUb/uhHa+V2p0Rnn6jHiAEXCSTKuM3BLZj2oQl3qQO8QSacX+NZ0E2wgcFUK/k+ DKdJPyg/Qk7jtKS+jcdAFWKsJb0WdDS5UCXMF+IjaH6+WcWvqjZBmpEvU7TnofjnqY lMb2Qj/TkfO9XtMtVLVDXp/n3PaDj4YF5Tz0u3tmLay7rYfl2B421U7b2Rml41hww+ V4RWaVYeW1wHg== Original-Received: from alfajor (unknown [45.44.229.252]) by mail01.iro.umontreal.ca (Postfix) with ESMTPSA id A356E120E24; Thu, 10 Nov 2022 15:51:05 -0500 (EST) In-Reply-To: (Dmitry Gutov's message of "Thu, 10 Nov 2022 22:37:01 +0200") X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.bugs:247547 Archived-At: >> Maybe Someone=E2=84=A2 should browse through the various calls to `overl= ays-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? > You can check it out here, it also seems reasonable as the potential defa= ult > sort: > https://git.savannah.gnu.org/cgit/emacs/elpa.git/tree/mmm-region.el?h=3De= xternals/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. Stefan