From unknown Fri Aug 15 03:37:48 2025 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-Mailer: MIME-tools 5.509 (Entity 5.509) Content-Type: text/plain; charset=utf-8 From: bug#59067 <59067@debbugs.gnu.org> To: bug#59067 <59067@debbugs.gnu.org> Subject: Status: 29.0.50; Exexpected overlay order in `overlays-in' return value Reply-To: bug#59067 <59067@debbugs.gnu.org> Date: Fri, 15 Aug 2025 10:37:48 +0000 retitle 59067 29.0.50; Exexpected overlay order in `overlays-in' return val= ue reassign 59067 emacs submitter 59067 Ihor Radchenko severity 59067 normal thanks From debbugs-submit-bounces@debbugs.gnu.org Sat Nov 05 23:38:41 2022 Received: (at submit) by debbugs.gnu.org; 6 Nov 2022 03:38:41 +0000 Received: from localhost ([127.0.0.1]:58473 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1orWUa-0003V1-UD for submit@debbugs.gnu.org; Sat, 05 Nov 2022 23:38:41 -0400 Received: from lists.gnu.org ([209.51.188.17]:36958) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1orWUX-0003Ur-El for submit@debbugs.gnu.org; Sat, 05 Nov 2022 23:38:39 -0400 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 1orWUX-0008JP-6P for bug-gnu-emacs@gnu.org; Sat, 05 Nov 2022 23:38:37 -0400 Received: from mout02.posteo.de ([185.67.36.66]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1orWUQ-0002qj-UZ for bug-gnu-emacs@gnu.org; Sat, 05 Nov 2022 23:38:36 -0400 Received: from submission (posteo.de [185.67.36.169]) by mout02.posteo.de (Postfix) with ESMTPS id D0DB5240101 for ; Sun, 6 Nov 2022 04:38:28 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=posteo.net; s=2017; t=1667705908; bh=RSN3mrqpNEUGs7Dv7XKGgqDQTsE4F+4FRykwzNKz19k=; h=From:To:Subject:Date:From; b=cnlR7IYfN0tQG99O94q8uwD3J1CwBadeGD2KLav5GlQ7nnd3bE+edYO0dU3nn7oum +FezKCeu2rfrSrGgcMSsg1qQ8ILTsSlkA13ewBwtvzC1IL6h8bq0dvdWUN1pmZEp2v yDPLzx2fZGjKs6DPpZunqQ8SNNMw+gnkg+1R6nysiiLCLjeFOAPErvzMQ5nfKZWhOd 3v55ojv1PHLMXNsJlZl6jpLCRghmLdiXYIqiLe2qGEfuLY22jd/HhGVHRm/DBBiRTy D4PIyyqj6ORUjfUaQdGZVyGV7htoz9A6aHZD4wBQ6QAyI8An06OEqZvt4ZIqljO6PN 5m0oHnCcjYINQ== Received: from customer (localhost [127.0.0.1]) by submission (posteo.de) with ESMTPSA id 4N4g7R26hSz9rxF for ; Sun, 6 Nov 2022 04:38:26 +0100 (CET) From: Ihor Radchenko To: bug-gnu-emacs@gnu.org Subject: 29.0.50; Exexpected overlay order in `overlays-in' return value Date: Sun, 06 Nov 2022 03:39:06 +0000 Message-ID: <871qqgn44l.fsf@localhost> MIME-Version: 1.0 Content-Type: text/plain Received-SPF: pass client-ip=185.67.36.66; envelope-from=yantar92@posteo.net; helo=mout02.posteo.de X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H2=-0.001, SPF_PASS=-0.001, T_SPF_HELO_TEMPERROR=0.01 autolearn=ham autolearn_force=no X-Spam_action: no action X-Spam-Score: -1.3 (-) X-Debbugs-Envelope-To: submit X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -2.3 (--) Hi, Some Org tests are failing when testing with the latest Emacs 29 master. To reproduce, get the latest Org from git and run make test. The common feature of all the failing tests is usage of overlays-in and expecting certain order of overlays in its return value. The order is changed compared to Emacs 28. I consider this an Emacs bug. In GNU Emacs 29.0.50 (build 1, x86_64-pc-linux-gnu, GTK+ Version 3.24.34, cairo version 1.16.0) of 2022-11-06 built on localhost Repository revision: 6e5ec085510ccf52ac6cb07c3a1a2778324a1d89 Repository branch: master Windowing system distributor 'The X.Org Foundation', version 11.0.12101004 System Description: Gentoo Linux -- Ihor Radchenko // yantar92, Org mode contributor, Learn more about Org mode at . Support Org development at , or support my work at From debbugs-submit-bounces@debbugs.gnu.org Sun Nov 06 01:26:29 2022 Received: (at 59067) by debbugs.gnu.org; 6 Nov 2022 06:26:29 +0000 Received: from localhost ([127.0.0.1]:58563 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1orZ6z-0007y2-1Y for submit@debbugs.gnu.org; Sun, 06 Nov 2022 01:26:29 -0500 Received: from eggs.gnu.org ([209.51.188.92]:48648) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1orZ6v-0007xm-W8 for 59067@debbugs.gnu.org; Sun, 06 Nov 2022 01:26:27 -0500 Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1orZ6p-0000T7-Ru; Sun, 06 Nov 2022 01:26:19 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=References:Subject:In-Reply-To:To:From:Date: mime-version; bh=MTm0+eAokcfPSfGQTMJXyAjUcqL6hW1Y2E70EfKQsx4=; b=kRO1SeAkgklk NBILPwkS13OzhJ6ONVtM38co3TrMSnuYxckx9MW9HRWhmeJzUMBdBEQYNk7gV9fN6L9A1sD9xCpJ2 FxoU8mKTM9KCuyKA1tQW2zNJIlJ6l8FWaENDTX/VJwbuqTPkeRQwrA9C1NFfz+zsY6l3vRme/O3E3 e0wT/MocsqGcUnDnJeh7I50UhkNFme4IbkfdCPCtfmfu2iS3LPJ9lTug0P+ZOCU2qTvA7qn76u3Aa 0CvULfCcGIJmo2j9bfD59H/T0TnwOCb801PDQTQSpWn1Z/xhyVRNkzvnXouG7p26P+l6SZ5vqKSrT jJFAe+6Mu3u0JafZe0jSIw==; Received: from [87.69.77.57] (helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1orZ6o-00062M-T7; Sun, 06 Nov 2022 01:26:19 -0500 Date: Sun, 06 Nov 2022 08:26:01 +0200 Message-Id: <838rko38g6.fsf@gnu.org> From: Eli Zaretskii To: Ihor Radchenko In-Reply-To: <871qqgn44l.fsf@localhost> (message from Ihor Radchenko on Sun, 06 Nov 2022 03:39:06 +0000) Subject: Re: bug#59067: 29.0.50; Exexpected overlay order in `overlays-in' return value References: <871qqgn44l.fsf@localhost> X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 59067 Cc: 59067@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) > From: Ihor Radchenko > Date: Sun, 06 Nov 2022 03:39:06 +0000 > > Some Org tests are failing when testing with the latest Emacs 29 master. > > To reproduce, get the latest Org from git and run make test. > > The common feature of all the failing tests is usage of overlays-in and > expecting certain order of overlays in its return value. The order is > changed compared to Emacs 28. > > I consider this an Emacs bug. I'm not sure we want to keep the old order (which AFAIU was the side effect of the implementation), nor become committed to a specific order. Sorting overlays is a slowdown, and not every application cares about the order. The ones that do care can sort the overlays in the order they want. Or maybe I'm missing something: can you explain why the order matters in a couple of specific examples from Org? From debbugs-submit-bounces@debbugs.gnu.org Sun Nov 06 02:04:32 2022 Received: (at 59067) by debbugs.gnu.org; 6 Nov 2022 07:04:32 +0000 Received: from localhost ([127.0.0.1]:58582 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1orZhn-0000SB-S5 for submit@debbugs.gnu.org; Sun, 06 Nov 2022 02:04:32 -0500 Received: from mout01.posteo.de ([185.67.36.65]:49069) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1orZhi-0000Ru-DD for 59067@debbugs.gnu.org; Sun, 06 Nov 2022 02:04:30 -0500 Received: from submission (posteo.de [185.67.36.169]) by mout01.posteo.de (Postfix) with ESMTPS id 908D8240026 for <59067@debbugs.gnu.org>; Sun, 6 Nov 2022 08:04:18 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=posteo.net; s=2017; t=1667718260; bh=q36iIljOFkmXweZZ/dd3zd1rr+qP0G7JP3dCZIY32Rc=; h=From:To:Cc:Subject:Date:From; b=MJ0PmuUhWSFydrpJFziKClD4D8CoUEWfxWqhZPPQCaCdn6NqbGhtbiu1ZB0nRXzRf W+bXvbKTjPYhg1LHFBq1SryK6v+z+9Tx4FUfbS0I/T+1X8PtaAzgzxq5LSFMPjenHP R/AM7jABXivHWNYdwRBM0LisVnMr4JiL1dVFF3LVsHu+FgYWlF5bhU1G8nGT8jPDFX JX+qz4ivC097NDZQqa1W38dX3liw2W4trP7A2T/cZx4fqRiUXHAcDkYT7Z+rOA+i4g 4UDt58HQH16Rr107AmYnnXTNIpwWyY+ALzGPX6nrZNnUovijy/MXfOXbdBf+hBUL+V vU5nzCKdL7Jfw== Received: from customer (localhost [127.0.0.1]) by submission (posteo.de) with ESMTPSA id 4N4lhw5q4Vz9rxR; Sun, 6 Nov 2022 08:04:15 +0100 (CET) From: Ihor Radchenko To: Eli Zaretskii Subject: Re: bug#59067: 29.0.50; Exexpected overlay order in `overlays-in' return value In-Reply-To: <838rko38g6.fsf@gnu.org> References: <871qqgn44l.fsf@localhost> <838rko38g6.fsf@gnu.org> Date: Sun, 06 Nov 2022 07:04:54 +0000 Message-ID: <878rkobm21.fsf@localhost> MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 59067 Cc: 59067@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) Eli Zaretskii writes: >> The common feature of all the failing tests is usage of overlays-in and >> expecting certain order of overlays in its return value. The order is >> changed compared to Emacs 28. >> >> I consider this an Emacs bug. > > I'm not sure we want to keep the old order (which AFAIU was the side > effect of the implementation), nor become committed to a specific > order. Sorting overlays is a slowdown, and not every application > cares about the order. The ones that do care can sort the overlays in > the order they want. > > Or maybe I'm missing something: can you explain why the order matters > in a couple of specific examples from Org? You are right. `overlays-in' docstring does not give any promises. It is not really a big deal for Org as well (can as well sort the return value). The only thing that could be useful on Emacs side is explicitly stating in the `overlays-in' docstring that overlay list may be in arbitrary order. -- Ihor Radchenko // yantar92, Org mode contributor, Learn more about Org mode at . Support Org development at , or support my work at From debbugs-submit-bounces@debbugs.gnu.org Sun Nov 06 02:17:06 2022 Received: (at 59067) by debbugs.gnu.org; 6 Nov 2022 07:17:06 +0000 Received: from localhost ([127.0.0.1]:58588 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1orZty-0000k5-Cb for submit@debbugs.gnu.org; Sun, 06 Nov 2022 02:17:06 -0500 Received: from eggs.gnu.org ([209.51.188.92]:43880) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1orZtu-0000jV-5H for 59067@debbugs.gnu.org; Sun, 06 Nov 2022 02:17:04 -0500 Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1orZto-0007Wy-Qh; Sun, 06 Nov 2022 02:16:56 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=References:Subject:In-Reply-To:To:From:Date: mime-version; bh=bcp7MLFtG12VXs1OucCRC7y8uG9HBidf2Yaz3+04AFc=; b=L2bRGwAny9at Ssl+4mtif9naC/UWa4cB0AXrxREz7uBneD8y/EezxZROGouu/c5MjBX/OKv61Ti50CmDXa20W6U1t jUZRGXNUE9NNUCOet54tilBEeUUGQ/HV5W/TlEA4q+CXloTrAzwp9gF9/HvGOz+l0ypL7AND5rIcI PFzKL6lXTppYupVWIysH74sYat4Fp3ke1D4WEwKVtsjPLh5PB806K70MpLtf0Nx8rbVQDWhkKM4R8 wI09gS9deKuiRls4mtxL+8X1qJPgHzAVPi/kNLRrC6TgdIj4G5ugs0trN8nuxPzzsOctLNPwY3fYR 0QHuIE26SUOdLL4gyREGDA==; Received: from [87.69.77.57] (helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1orZto-0003Lx-8S; Sun, 06 Nov 2022 02:16:56 -0500 Date: Sun, 06 Nov 2022 09:16:37 +0200 Message-Id: <835yfs363u.fsf@gnu.org> From: Eli Zaretskii To: Ihor Radchenko In-Reply-To: <878rkobm21.fsf@localhost> (message from Ihor Radchenko on Sun, 06 Nov 2022 07:04:54 +0000) Subject: Re: bug#59067: 29.0.50; Exexpected overlay order in `overlays-in' return value References: <871qqgn44l.fsf@localhost> <838rko38g6.fsf@gnu.org> <878rkobm21.fsf@localhost> X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 59067 Cc: 59067@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) > From: Ihor Radchenko > Cc: 59067@debbugs.gnu.org > Date: Sun, 06 Nov 2022 07:04:54 +0000 > > Eli Zaretskii writes: > > > I'm not sure we want to keep the old order (which AFAIU was the side > > effect of the implementation), nor become committed to a specific > > order. Sorting overlays is a slowdown, and not every application > > cares about the order. The ones that do care can sort the overlays in > > the order they want. > > > > Or maybe I'm missing something: can you explain why the order matters > > in a couple of specific examples from Org? > > You are right. `overlays-in' docstring does not give any promises. > It is not really a big deal for Org as well (can as well sort the return > value). > > The only thing that could be useful on Emacs side is explicitly stating > in the `overlays-in' docstring that overlay list may be in arbitrary > order. I'll wait for a few days for other ideas and opinions, and if nothing pops up, I will amend the documentation (and NEWS, as this is probably NEWS-worthy). Thanks. From debbugs-submit-bounces@debbugs.gnu.org Mon Nov 07 18:48:03 2022 Received: (at 59067) by debbugs.gnu.org; 7 Nov 2022 23:48:03 +0000 Received: from localhost ([127.0.0.1]:35752 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1osBqU-0008I3-Mx for submit@debbugs.gnu.org; Mon, 07 Nov 2022 18:48:02 -0500 Received: from relay8-d.mail.gandi.net ([217.70.183.201]:48713) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1osBqT-0008H5-Jn for 59067@debbugs.gnu.org; Mon, 07 Nov 2022 18:48:02 -0500 Received: (Authenticated sender: matt@rfc20.org) by mail.gandi.net (Postfix) with ESMTPSA id C1FF21BF204; Mon, 7 Nov 2022 23:47:54 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=rfc20.org; s=gm1; t=1667864875; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=W0OSQNpjPaKEJezRjcte3RIoB6Pt91Fv18JDsqW0AjE=; b=juaCCFt65acz8U2JZw7ehR4gL0tu4YmHGe8aq4oIyZYc9RRkgPZiNdzk3iXOzXApgRn01T NRviP5AgG9gZMGEBbxX68mMA0J0R+htDumrbQdIchm9h1xgKu7Vj+FaPBC61fxVehisPIL opT2SsdM+K8NyjRV0wMlVRYnaB5i3KePdETnPoJVH4d0eU8vYoqA1eslznq+aZzp5gbqdX xqYiI29ktwaDIY8t6BN7IhbN3YJ94vF1YtnDGjE2bPE8n73awC2lGvH1feg0EXuKd0GtnG ZnE8TYoLa8b00PNYyHC6a1VDW/ofQg50saoRRc5t3flZgqMMIX53GbF2Xxm5Dg== Received: from matt by naz with local (Exim 4.96) (envelope-from ) id 1osBqJ-000i7K-2m; Mon, 07 Nov 2022 15:47:51 -0800 From: Matt Armstrong To: Eli Zaretskii , Ihor Radchenko Subject: Re: bug#59067: 29.0.50; Exexpected overlay order in `overlays-in' return value In-Reply-To: <835yfs363u.fsf@gnu.org> References: <871qqgn44l.fsf@localhost> <838rko38g6.fsf@gnu.org> <878rkobm21.fsf@localhost> <835yfs363u.fsf@gnu.org> Date: Mon, 07 Nov 2022 15:47:51 -0800 Message-ID: <87tu3amimw.fsf@rfc20.org> MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 59067 Cc: 59067@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.7 (-) Eli Zaretskii writes: > I'll wait for a few days for other ideas and opinions, and if nothing > pops up, I will amend the documentation (and NEWS, as this is probably > NEWS-worthy). I think amending the documentation is the right approach, and agree that it is NEWS-worthy. In Emacs git we have already seen one fix related to this issue: 651bf0a999 (Fix overlays order in Flyspell (bug#58970), 2022-11-03) ...with that example, and this one from Org, we can rationally expect more. The original overlay implementation happened to provide one ordering, but it could change when the overlay "center" moved, so packages that rely on anything specific are on shaky ground. From debbugs-submit-bounces@debbugs.gnu.org Thu Nov 10 05:19:19 2022 Received: (at 59067-done) by debbugs.gnu.org; 10 Nov 2022 10:19:19 +0000 Received: from localhost ([127.0.0.1]:41997 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ot4eV-0007dd-4V for submit@debbugs.gnu.org; Thu, 10 Nov 2022 05:19:19 -0500 Received: from eggs.gnu.org ([209.51.188.92]:33366) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ot4eT-0007dQ-CS for 59067-done@debbugs.gnu.org; Thu, 10 Nov 2022 05:19:17 -0500 Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1ot4eN-0006pr-R5; Thu, 10 Nov 2022 05:19:11 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=References:Subject:In-Reply-To:To:From:Date: mime-version; bh=dk3/ST5BRv1a1EwG3Fgl3m4AED8B8s52fGdksdqyLVA=; b=NmV6qg+XOZLr +eewJK1Ofs/GNvDJ3wEBw+B4mScZRFSz8YzQWF/KUWAaRw4pkVnNmd+QUtpnpzcfSHJjF4OWnebd2 vYu34VUKU1SrsJgKAv6x1g6IOnsquG/EPVurapZPoC0OeyWd2C/1uOJ1clmKZIAjXoVCriHkb2s7G Ef+GqQ5KzbjvJ51S68ynkmaIQqhShRAT5qGcWZnDGbZL3OjyCUUA21bTl9elqX+FbMURB2gCgLDg7 bySahrdq4ORxM5Kf/zL0RIRNYKL6AT4SLsBVba0N5qvEM6E6oJKKk4bQsTivPwdhvrBv3QzjAH9M/ 3DLoWAgB1MN59zuqgFdu7Q==; Received: from [87.69.77.57] (helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1ot4eI-0006ye-R3; Thu, 10 Nov 2022 05:19:11 -0500 Date: Thu, 10 Nov 2022 12:19:07 +0200 Message-Id: <838rkjru1w.fsf@gnu.org> From: Eli Zaretskii To: yantar92@posteo.net In-Reply-To: <835yfs363u.fsf@gnu.org> (message from Eli Zaretskii on Sun, 06 Nov 2022 09:16:37 +0200) Subject: Re: bug#59067: 29.0.50; Exexpected overlay order in `overlays-in' return value References: <871qqgn44l.fsf@localhost> <838rko38g6.fsf@gnu.org> <878rkobm21.fsf@localhost> <835yfs363u.fsf@gnu.org> X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 59067-done Cc: 59067-done@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) > Cc: 59067@debbugs.gnu.org > Date: Sun, 06 Nov 2022 09:16:37 +0200 > From: Eli Zaretskii > > > From: Ihor Radchenko > > Cc: 59067@debbugs.gnu.org > > Date: Sun, 06 Nov 2022 07:04:54 +0000 > > > > You are right. `overlays-in' docstring does not give any promises. > > It is not really a big deal for Org as well (can as well sort the return > > value). > > > > The only thing that could be useful on Emacs side is explicitly stating > > in the `overlays-in' docstring that overlay list may be in arbitrary > > order. > > I'll wait for a few days for other ideas and opinions, and if nothing > pops up, I will amend the documentation (and NEWS, as this is probably > NEWS-worthy). Now done. From debbugs-submit-bounces@debbugs.gnu.org Thu Nov 10 09:04:10 2022 Received: (at 59067) by debbugs.gnu.org; 10 Nov 2022 14:04:10 +0000 Received: from localhost ([127.0.0.1]:42316 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ot8A6-0005V9-60 for submit@debbugs.gnu.org; Thu, 10 Nov 2022 09:04:10 -0500 Received: from mailscanner.iro.umontreal.ca ([132.204.25.50]:54292) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ot8A0-0005Ub-S1 for 59067@debbugs.gnu.org; Thu, 10 Nov 2022 09:04:08 -0500 Received: from pmg2.iro.umontreal.ca (localhost.localdomain [127.0.0.1]) by pmg2.iro.umontreal.ca (Proxmox) with ESMTP id 26B7680796; Thu, 10 Nov 2022 09:03:59 -0500 (EST) Received: from mail01.iro.umontreal.ca (unknown [172.31.2.1]) by pmg2.iro.umontreal.ca (Proxmox) with ESMTP id 3D0AD8056A; Thu, 10 Nov 2022 09:03:57 -0500 (EST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=iro.umontreal.ca; s=mail; t=1668089037; bh=Q/69p3erDmh8eiRf6doR3rI7zt80xJ7oukxRXSdd32Y=; h=From:To:Cc:Subject:In-Reply-To:References:Date:From; b=WxLcdspsIeImFVVKLshL/qdur/iu4YWB3/c5UAyi1C27Y0b235ba9MNOVU72wNMwz nWUmRrgzX3xgdxNgJCp5fhMzHplQm2999eslFLwN+wjwdMXtCFjdWWqzbueSs+HOEK uA6kWB6YmLAXOQFZI1TxSYSokLymCBczd0SvenuVK4MpIYpY18qKi7vVIxsCsiF4lH eMN+9w5+LsEf2UAEbUxCFLsJYKHo14rtXcILINI9OtOiCbE8OhiEGksyGKYExnmrBL 8yOS/Go/y69zvnPF8ZpA2o7df3+aIExYpRme0Xt6zAKPXTpKIDK0fdEUss53bxIHup 1j9GNuw/saVdw== Received: from pastel (unknown [104.247.241.157]) by mail01.iro.umontreal.ca (Postfix) with ESMTPSA id 14892120281; Thu, 10 Nov 2022 09:03:57 -0500 (EST) From: Stefan Monnier To: Ihor Radchenko Subject: Re: bug#59067: 29.0.50; Exexpected overlay order in `overlays-in' return value In-Reply-To: <878rkobm21.fsf@localhost> (Ihor Radchenko's message of "Sun, 06 Nov 2022 07:04:54 +0000") Message-ID: References: <871qqgn44l.fsf@localhost> <838rko38g6.fsf@gnu.org> <878rkobm21.fsf@localhost> Date: Thu, 10 Nov 2022 09:03:55 -0500 User-Agent: Gnus/5.13 (Gnus v5.13) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-SPAM-INFO: Spam detection results: 0 ALL_TRUSTED -1 Passed through trusted hosts only via SMTP AWL -0.121 Adjusted score from AWL reputation of From: address BAYES_00 -1.9 Bayes spam probability is 0 to 1% DKIM_SIGNED 0.1 Message has a DKIM or DK signature, not necessarily valid DKIM_VALID -0.1 Message has at least one valid DKIM or DK signature DKIM_VALID_AU -0.1 Message has a valid DKIM or DK signature from author's domain X-SPAM-LEVEL: X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 59067 Cc: 59067@debbugs.gnu.org, Eli Zaretskii X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) > You are right. `overlays-in' docstring does not give any promises. > It is not really a big deal for Org as well (can as well sort the return > value). Maybe we could provide a `sorted` argument to `overlays-in`, but the problem is that it's not clear what is "the right ordering". Maybe Someone=E2=84=A2 should browse through the various calls to `overlays= -in` out there to try and see which orderings could be useful. Stefan From debbugs-submit-bounces@debbugs.gnu.org Thu Nov 10 15:37:13 2022 Received: (at 59067) by debbugs.gnu.org; 10 Nov 2022 20:37:13 +0000 Received: from localhost ([127.0.0.1]:44493 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1otEIT-00039T-9g for submit@debbugs.gnu.org; Thu, 10 Nov 2022 15:37:13 -0500 Received: from mail-wr1-f52.google.com ([209.85.221.52]:36393) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1otEIP-00039F-Uk for 59067@debbugs.gnu.org; Thu, 10 Nov 2022 15:37:12 -0500 Received: by mail-wr1-f52.google.com with SMTP id j15so3936653wrq.3 for <59067@debbugs.gnu.org>; Thu, 10 Nov 2022 12:37:09 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:user-agent:mime-version:date:message-id :sender:from:to:cc:subject:date:message-id:reply-to; bh=VMDnpPUizi+vHZj2gDpJy7k7jeKYiCWKFJSWLqd45Po=; b=buybw6ro3Mo1TSVt9hJUdg9YZyIZRTX/NFpAkFtZAggH6CypEZhjPJv/zRoJW0LSZ4 9Dj/8vsF77WPDteH/E599M21jCiPribqxjWA9nQaX6ALHnBnmiXWGTdZ8kOnGObbc1Qk jHFuHk4nyICQAAx0tzi5Bb8XrIAJd/8bJXT7xVK2uzFw2hhxGpxfoh1HMbB+wG3fV7Od JZxXQ7QnwheYLjPFDikQxmY/uxCSPbRMlhkdo0iLPSqwlciYI6J/1qqhVpv/ctchISIN Aj+wuorzHy878cF26/5k4u1tURWwmb+EC9ADMzJ0xJoyosnfle6Xs0vdpr7aCsFm3xkc fubQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:user-agent:mime-version:date:message-id :sender:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=VMDnpPUizi+vHZj2gDpJy7k7jeKYiCWKFJSWLqd45Po=; b=A0e7A61QG/MPwkwzXIfP+Yh3umykentFNOaydxr0KVO/FJcmNNahFfSUqNSw2gF7OG rkqbUGH00avCfissBfwXgWyBbn3IFp/RARf1j1/I8vgrooFTtozmHi1sVMmAAolRwI+0 A19NLDxKETaHm+RkGm6gA11u4YILO/MarjXOWZUgRzHrpkdunFZgVwSRo7wVeusOYDEe rWTDUpIQKDFPH/BYLLU8gaUI6y9vHAC+WYcs5d5JybFvL/QBeQ3X9ZXNiuKjtSY0LuvV wsShZRhyQ/PqUh3wQ/HJwcGMIatg3l+XIW4jP9HgyOnk0JtayrXhdN7BNtVBrhmOWD08 AYbQ== X-Gm-Message-State: ACrzQf17i9cIaPwY1fzYMmt7iTc6s1StcTDh4grsDD5l02k91i5DpjcU actRqMYEkpSEgXuI/lkwT24= X-Google-Smtp-Source: AMsMyM4dqRRlaXFIVwJx0eS95oAlvjci/hFiR0U6OSw6twHNwO6j3j9YvaaSiadjrFm0SZnXSEcj/w== X-Received: by 2002:a05:6000:22e:b0:236:6e38:4d9b with SMTP id l14-20020a056000022e00b002366e384d9bmr43747643wrz.4.1668112623906; Thu, 10 Nov 2022 12:37:03 -0800 (PST) Received: from [192.168.0.6] ([46.251.119.176]) by smtp.googlemail.com with ESMTPSA id iw2-20020a05600c54c200b003cf77e6091bsm5975906wmb.11.2022.11.10.12.37.02 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Thu, 10 Nov 2022 12:37:03 -0800 (PST) Message-ID: Date: Thu, 10 Nov 2022 22:37:01 +0200 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.2.2 Subject: Re: bug#59067: 29.0.50; Exexpected overlay order in `overlays-in' return value Content-Language: en-US To: Stefan Monnier , Ihor Radchenko References: <871qqgn44l.fsf@localhost> <838rko38g6.fsf@gnu.org> <878rkobm21.fsf@localhost> From: Dmitry Gutov In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit X-Spam-Score: -1.3 (-) X-Debbugs-Envelope-To: 59067 Cc: 59067@debbugs.gnu.org, Eli Zaretskii X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -2.3 (--) On 10.11.2022 16:03, 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). It uses a custom sorting function, though (which also takes priority into account), so it shouldn't be affected by the breakage. 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. From debbugs-submit-bounces@debbugs.gnu.org Thu Nov 10 15:51:18 2022 Received: (at 59067) by debbugs.gnu.org; 10 Nov 2022 20:51:18 +0000 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 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 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) 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== 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) From: Stefan Monnier To: Dmitry Gutov Subject: Re: bug#59067: 29.0.50; Exexpected overlay order in `overlays-in' return value In-Reply-To: (Dmitry Gutov's message of "Thu, 10 Nov 2022 22:37:01 +0200") Message-ID: References: <871qqgn44l.fsf@localhost> <838rko38g6.fsf@gnu.org> <878rkobm21.fsf@localhost> Date: Thu, 10 Nov 2022 15:51:04 -0500 User-Agent: Gnus/5.13 (Gnus v5.13) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-SPAM-INFO: Spam detection results: 0 ALL_TRUSTED -1 Passed through trusted hosts only via SMTP AWL 0.058 Adjusted score from AWL reputation of From: address BAYES_00 -1.9 Bayes spam probability is 0 to 1% DKIM_SIGNED 0.1 Message has a DKIM or DK signature, not necessarily valid DKIM_VALID -0.1 Message has at least one valid DKIM or DK signature DKIM_VALID_AU -0.1 Message has a valid DKIM or DK signature from author's domain X-SPAM-LEVEL: X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 59067 Cc: 59067@debbugs.gnu.org, Ihor Radchenko , Eli Zaretskii X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) >> 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 From debbugs-submit-bounces@debbugs.gnu.org Thu Nov 10 16:01:03 2022 Received: (at 59067) by debbugs.gnu.org; 10 Nov 2022 21:01:03 +0000 Received: from localhost ([127.0.0.1]:44506 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1otEfW-0003kX-NG for submit@debbugs.gnu.org; Thu, 10 Nov 2022 16:01:03 -0500 Received: from mail-wr1-f52.google.com ([209.85.221.52]:40628) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1otEfV-0003jx-2a for 59067@debbugs.gnu.org; Thu, 10 Nov 2022 16:01:02 -0500 Received: by mail-wr1-f52.google.com with SMTP id z14so3976738wrn.7 for <59067@debbugs.gnu.org>; Thu, 10 Nov 2022 13:01:01 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:user-agent:mime-version:date:message-id :sender:from:to:cc:subject:date:message-id:reply-to; bh=nHcR0oH4LSZOjClb5c1vR62nbE1hjo+M6CB2N++VXww=; b=TWu9DP3C19E7g6wE08yNkXvomnN/8ZjBp4I2zVnlI60b/L/NOk5+Rgdqae67YujrUA jt0b4dmLbTQrfH2uNfUE5PAZ8MiFYOOy0XavFRUJnPgrHC1C0OS+KKu5A3MENA6Q8CSy 39GDS+aRKzktjkNeic0kGUAbNPoI+CeHt84VSD9YhyXVSRyVAV+HkBE2F457UDu6TwRe MdWpMjZLTKwi3PvlepXOp40Skty/n7aydXHyxhdlE4EsRknFGSZU2IG5xVUhFHS9IPvB xIVTdggsCGyxQQkYb769qbkTymxnypYjVqtsi+nHGK4I45rWGTM5GZ9JtwmfTj9K58Er 3Qog== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:user-agent:mime-version:date:message-id :sender:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=nHcR0oH4LSZOjClb5c1vR62nbE1hjo+M6CB2N++VXww=; b=FYSDmvnJNnFKvs+H6yCyolrBLnEYCdyIoreeF0d5nA9Q0u0/NN1Z6sbp4G/H7ac9jM Mjo6EOMvPHjN2H01uG+3KmeA6tzQeIdS8oZdOZ+xZb/l1hy/DMhFFpEGHeCcjgg+W41a j3sucJRzV5c5MoV8z64xD+FOlbiUiXV7cyw6l7lT7zOVT5II1/OhvB3+CImnXZkNfTY1 9uy2oRsc5p4zX/vCdMOWJzgxmTH29iwalqh0ABIGTjXnN5dHrKLTLolEt4XqCDK55kiy utIoCwmPM+2vCihfUbES8mfHI9kwGCUugAJbrGYthZoEaFyTmeuvhu2JFfNHbidTmgQT LfMw== X-Gm-Message-State: ANoB5pkahP8IoYIzJrNQurSJnakuAgHiCvmBPMON7m/BA6GOEwba7uhp NKuJusYxzbFe9VB6qAkwOsc= X-Google-Smtp-Source: AA0mqf4VWNZ6tyKAPH0RCiN6uk7NMcj+vPBKLFPk4hy+XAg+kYHdipLoQHD380rEUyIn3Nx98Yx7gQ== X-Received: by 2002:a05:6000:1ac7:b0:23a:c134:d3b8 with SMTP id i7-20020a0560001ac700b0023ac134d3b8mr21277303wry.500.1668114054114; Thu, 10 Nov 2022 13:00:54 -0800 (PST) Received: from [192.168.0.6] ([46.251.119.176]) by smtp.googlemail.com with ESMTPSA id i11-20020a05600c354b00b003b4ff30e566sm240521wmq.3.2022.11.10.13.00.53 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Thu, 10 Nov 2022 13:00:53 -0800 (PST) Message-ID: Date: Thu, 10 Nov 2022 23:00:51 +0200 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.2.2 Subject: Re: bug#59067: 29.0.50; Exexpected overlay order in `overlays-in' return value Content-Language: en-US To: Stefan Monnier References: <871qqgn44l.fsf@localhost> <838rko38g6.fsf@gnu.org> <878rkobm21.fsf@localhost> From: Dmitry Gutov In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit X-Spam-Score: -1.3 (-) X-Debbugs-Envelope-To: 59067 Cc: 59067@debbugs.gnu.org, Ihor Radchenko , Eli Zaretskii X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -2.3 (--) 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. From debbugs-submit-bounces@debbugs.gnu.org Thu Nov 10 16:56:37 2022 Received: (at 59067) by debbugs.gnu.org; 10 Nov 2022 21:56:37 +0000 Received: from localhost ([127.0.0.1]:44560 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1otFXJ-00051h-2q for submit@debbugs.gnu.org; Thu, 10 Nov 2022 16:56:37 -0500 Received: from mailscanner.iro.umontreal.ca ([132.204.25.50]:38713) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1otFXD-00051Q-Tt for 59067@debbugs.gnu.org; Thu, 10 Nov 2022 16:56:35 -0500 Received: from pmg3.iro.umontreal.ca (localhost [127.0.0.1]) by pmg3.iro.umontreal.ca (Proxmox) with ESMTP id 3322644099E; Thu, 10 Nov 2022 16:56:26 -0500 (EST) Received: from mail01.iro.umontreal.ca (unknown [172.31.2.1]) by pmg3.iro.umontreal.ca (Proxmox) with ESMTP id 5868544086A; Thu, 10 Nov 2022 16:56:17 -0500 (EST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=iro.umontreal.ca; s=mail; t=1668117377; bh=/2PS0kuQ/avbKHgB5cw0S7i0rxuVUTTay1HAji4fUCo=; h=From:To:Cc:Subject:In-Reply-To:References:Date:From; b=RahmnvlhfO71/GkLrSjgnTzS6/lsyE0HL7fyVIGgz5DGKknyxUrNg/sgzCUEewTnQ aHqb7j7L18ZZglYb27S3rKGc5szuWD5UUBJoCVZkjrXjNZNrwraT4AV4rPS6NjEfAm CzEeUoXBlM2MI2oixWYMBNAQ/sM23vHetF3KqcZawYSxqECAsb068LjWvvseVnEr+V REAuwTYkOkRR42o7a9XTf4z9g+jQ8Ok4UhbuPHoR4Y9WehTVoJ69ewcgVr50D0M1s8 zA/MzseARxM80Hbxtfwfi/VWfz4cfmLjwmnJ6oUOV7+lfPmOmaLzo29Zu65SSBD3Cp wyTBF5nmpsr8g== Received: from alfajor (unknown [45.44.229.252]) by mail01.iro.umontreal.ca (Postfix) with ESMTPSA id 10154120A4F; Thu, 10 Nov 2022 16:56:17 -0500 (EST) From: Stefan Monnier To: Dmitry Gutov Subject: Re: bug#59067: 29.0.50; Exexpected overlay order in `overlays-in' return value In-Reply-To: (Dmitry Gutov's message of "Thu, 10 Nov 2022 23:00:51 +0200") Message-ID: References: <871qqgn44l.fsf@localhost> <838rko38g6.fsf@gnu.org> <878rkobm21.fsf@localhost> Date: Thu, 10 Nov 2022 16:56:15 -0500 User-Agent: Gnus/5.13 (Gnus v5.13) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-SPAM-INFO: Spam detection results: 0 ALL_TRUSTED -1 Passed through trusted hosts only via SMTP AWL -0.211 Adjusted score from AWL reputation of From: address BAYES_00 -1.9 Bayes spam probability is 0 to 1% DKIM_SIGNED 0.1 Message has a DKIM or DK signature, not necessarily valid DKIM_VALID -0.1 Message has at least one valid DKIM or DK signature DKIM_VALID_AU -0.1 Message has a valid DKIM or DK signature from author's domain X-SPAM-LEVEL: X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 59067 Cc: 59067@debbugs.gnu.org, Ihor Radchenko , Eli Zaretskii X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) >>>> Maybe Someone=E2=84=A2 should browse through the various calls to `ove= rlays-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, a= s 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. 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? In many cases, I have found that the ordering doesn't really matter, as long as it's deterministic. Stefan From debbugs-submit-bounces@debbugs.gnu.org Thu Nov 10 21:13:14 2022 Received: (at 59067) by debbugs.gnu.org; 11 Nov 2022 02:13:14 +0000 Received: from localhost ([127.0.0.1]:44766 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1otJXd-00053L-V2 for submit@debbugs.gnu.org; Thu, 10 Nov 2022 21:13:14 -0500 Received: from mail-wr1-f45.google.com ([209.85.221.45]:46831) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1otJXc-000539-Bu for 59067@debbugs.gnu.org; Thu, 10 Nov 2022 21:13:12 -0500 Received: by mail-wr1-f45.google.com with SMTP id d9so20208wrm.13 for <59067@debbugs.gnu.org>; Thu, 10 Nov 2022 18:13:12 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:user-agent:mime-version:date:message-id :sender:from:to:cc:subject:date:message-id:reply-to; bh=OfCQNIFQtCVKz2nfiUfeJWr1H/wyeskTZF0PjplttX4=; b=fNgddFdilk2dwB8s+cpeyMg1iSGWLp0GiPk50fiTh4BfWmecQiruvDMyqlZuWKao2i xQXZw9JKNFFFKQ62ssTAIW6+9hSLFd3pLW4vosSD+Lg9mJOqeywCak84fY1x8dADiIPa l2eUJsLtZRjOjEVU+B9A+2bjY2hxtX9bZ2xOIMVCKNXnMHocKDxcexr2T/G6aEF/+z9q EOmxNOSKUhT3RL4jH4kQqMNjuZTd12IO/WpUlcRxpCTxq96MmKMlALEcPrIBHjPIDLBi S9fBNPShGN+IcOurw9CKzb+bJoKMSQSuyBfrdwRZGjEfXGeLvHphYTQ5YkEda6nrHhfJ FObQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:user-agent:mime-version:date:message-id :sender:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=OfCQNIFQtCVKz2nfiUfeJWr1H/wyeskTZF0PjplttX4=; b=A5kDqlCKqoYcj/rrQgQEn09W2rcQHUJcDc2HxTA7TRFgv+86L5VoYJmZNiM4mNbhfb jcfZmFHQRcHdakUi+4t9IohIZAV2OutVSW9RB1qZsnEMYwDDEqQ9eh+EaZsqH1qK9QLI sqpWDXMh2njHiyEkcYFVRAA1Zi7yjrbBQ9sHxdb0WYyXgT2OHoyOvB85ISvOqU/1MtoB crcouVmFwwGd8jKOBnVGyMBwYewaV/fc07GupF2ODf60gJjJS7Tlj8REiftmeT1uDhUw BCSsZzfuYehNQHHXYVRr2r845Nk0kn1MPMRrXl3S0eP0ye3gemtdanzSqq0U7qIbfwT/ lBgw== X-Gm-Message-State: ACrzQf3omVBPYSWQ9RUJ8DUgrHJoT+/wrWR45dm4eQq/XL8emkECYYMU OSJ2lDgM1hPmv1xhOjCQ9qM= X-Google-Smtp-Source: AMsMyM5IR0dFGwIob11mYvmzQtKJtccWNJPf2nFVpYk9nXebMbjmo9mo1FVIBzFXw4c2YjVvX0M+/Q== X-Received: by 2002:adf:e603:0:b0:236:80ac:5f4b with SMTP id p3-20020adfe603000000b0023680ac5f4bmr41666315wrm.83.1668132786120; Thu, 10 Nov 2022 18:13:06 -0800 (PST) Received: from [192.168.0.6] ([46.251.119.176]) by smtp.googlemail.com with ESMTPSA id g9-20020a05600c4ec900b003cfd10a33afsm136181wmq.11.2022.11.10.18.13.04 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Thu, 10 Nov 2022 18:13:05 -0800 (PST) Message-ID: <9657304b-e6c2-6e4a-70cc-a24e24aa34ff@yandex.ru> Date: Fri, 11 Nov 2022 04:13:03 +0200 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.2.2 Subject: Re: bug#59067: 29.0.50; Exexpected overlay order in `overlays-in' return value Content-Language: en-US To: Stefan Monnier References: <871qqgn44l.fsf@localhost> <838rko38g6.fsf@gnu.org> <878rkobm21.fsf@localhost> From: Dmitry Gutov In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Score: -1.3 (-) X-Debbugs-Envelope-To: 59067 Cc: 59067@debbugs.gnu.org, Ihor Radchenko , Eli Zaretskii X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -2.3 (--) On 10.11.2022 23:56, Stefan Monnier wrote: > 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. If the return value was in reverse, I think the adjustment would be to call 'reverse', or sort it all over again, rather than calling (car (last overlays)) every time. Another place which might be important is the order in which the 'face' property is applied by Emacs (with 'priority' being equal). From debbugs-submit-bounces@debbugs.gnu.org Thu Nov 10 21:32:23 2022 Received: (at 59067) by debbugs.gnu.org; 11 Nov 2022 02:32:23 +0000 Received: from localhost ([127.0.0.1]:44774 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1otJqA-0005XE-QS for submit@debbugs.gnu.org; Thu, 10 Nov 2022 21:32:23 -0500 Received: from mailscanner.iro.umontreal.ca ([132.204.25.50]:49324) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1otJq7-0005Wx-Tf for 59067@debbugs.gnu.org; Thu, 10 Nov 2022 21:32:20 -0500 Received: from pmg3.iro.umontreal.ca (localhost [127.0.0.1]) by pmg3.iro.umontreal.ca (Proxmox) with ESMTP id 27150440A06; Thu, 10 Nov 2022 21:32:14 -0500 (EST) Received: from mail01.iro.umontreal.ca (unknown [172.31.2.1]) by pmg3.iro.umontreal.ca (Proxmox) with ESMTP id D278D441524; Thu, 10 Nov 2022 21:32:12 -0500 (EST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=iro.umontreal.ca; s=mail; t=1668133932; bh=Tuf8AS5WQzcFuOFVZpAuqEb+yK+nNa9XCPhm8cOO9i4=; h=From:To:Cc:Subject:In-Reply-To:References:Date:From; b=MobDkaLhTfc2YsMIk/WQ0n1SHJCBH6mHx6adEfkZcNWOnQq3AA1NCPa18MxkLPPd3 Ay+04IQWoLh9aFvGScayH8/DYpdmThcfwhOTZ5rhI2Ua0dAB+h3xy3pMQHIZQDttnx mOg9vw6GxyAmzKDviiWgQ5VXqb4rYt6s+Lx68CJjnPTaJVD3B/wR+cy3pc5DaFrhg9 ziElgPFO0J3zawe6Fbws+zaPYDWX8yDEPjc2cqd8urp062AsWfMke4sDB8MZVj7ZV4 pmD8YZ3M2zbrH/QbyuMlnjwOlkbrp4P2e023/NNFGBf51mXsNvnC4ZXCZdLpLw4jo1 s7uJ2bcVCsdDg== Received: from pastel (unknown [104.247.241.157]) by mail01.iro.umontreal.ca (Postfix) with ESMTPSA id 974671202EE; Thu, 10 Nov 2022 21:32:12 -0500 (EST) From: Stefan Monnier To: Dmitry Gutov Subject: Re: bug#59067: 29.0.50; Exexpected overlay order in `overlays-in' return value In-Reply-To: <9657304b-e6c2-6e4a-70cc-a24e24aa34ff@yandex.ru> (Dmitry Gutov's message of "Fri, 11 Nov 2022 04:13:03 +0200") Message-ID: References: <871qqgn44l.fsf@localhost> <838rko38g6.fsf@gnu.org> <878rkobm21.fsf@localhost> <9657304b-e6c2-6e4a-70cc-a24e24aa34ff@yandex.ru> Date: Thu, 10 Nov 2022 21:32:11 -0500 User-Agent: Gnus/5.13 (Gnus v5.13) MIME-Version: 1.0 Content-Type: text/plain X-SPAM-INFO: Spam detection results: 0 ALL_TRUSTED -1 Passed through trusted hosts only via SMTP AWL -0.067 Adjusted score from AWL reputation of From: address BAYES_00 -1.9 Bayes spam probability is 0 to 1% DKIM_SIGNED 0.1 Message has a DKIM or DK signature, not necessarily valid DKIM_VALID -0.1 Message has at least one valid DKIM or DK signature DKIM_VALID_AU -0.1 Message has a valid DKIM or DK signature from author's domain X-SPAM-LEVEL: X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 59067 Cc: 59067@debbugs.gnu.org, Ihor Radchenko , Eli Zaretskii X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) >> 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 From debbugs-submit-bounces@debbugs.gnu.org Fri Nov 11 02:48:31 2022 Received: (at 59067) by debbugs.gnu.org; 11 Nov 2022 07:48:31 +0000 Received: from localhost ([127.0.0.1]:45000 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1otOm7-0007II-2C for submit@debbugs.gnu.org; Fri, 11 Nov 2022 02:48:31 -0500 Received: from eggs.gnu.org ([209.51.188.92]:45276) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1otOm5-0007I5-83 for 59067@debbugs.gnu.org; Fri, 11 Nov 2022 02:48:29 -0500 Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1otOlz-0001UA-9a; Fri, 11 Nov 2022 02:48:23 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=References:Subject:In-Reply-To:To:From:Date: mime-version; bh=DMM8cWrcF1HllstAWPY1XavXWkzum/YgBOa+5EL+z5E=; b=FV84+jE+gEeG paVFtxivomLZeWqOM50zemYsPXCkD0rGaI/hKs82LkkSklpImaGJRn5uXWz7wx4yHUOE786FThsK9 dY39Ln468ryroCJQuvvivaEAWXXiNoR6FhJfG8NYoWOcw0nSTzpr6Cj6xz17yH8lhs+7hDM3XgSCu jCa3ehDhyZsuFq05XipbaywxbkeHlIde0U/StJFu2Y1egXfYND/VbVY286wl7LhMTNQU3+6Z4j2UD r8H/wQPnEvYrMBV8qAcwN/6+juq5ul5U8+eyHvHUOlwhIqf90vCdIKCg9vHECI/YJo4UhYp244DVh oIsDrbWdSxVUrnAIAopXFg==; Received: from [87.69.77.57] (helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1otOlv-0002pW-VF; Fri, 11 Nov 2022 02:48:23 -0500 Date: Fri, 11 Nov 2022 09:48:22 +0200 Message-Id: <83sfiqorsp.fsf@gnu.org> From: Eli Zaretskii To: Dmitry Gutov In-Reply-To: <9657304b-e6c2-6e4a-70cc-a24e24aa34ff@yandex.ru> (message from Dmitry Gutov on Fri, 11 Nov 2022 04:13:03 +0200) Subject: Re: bug#59067: 29.0.50; Exexpected overlay order in `overlays-in' return value References: <871qqgn44l.fsf@localhost> <838rko38g6.fsf@gnu.org> <878rkobm21.fsf@localhost> <9657304b-e6c2-6e4a-70cc-a24e24aa34ff@yandex.ru> X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 59067 Cc: 59067@debbugs.gnu.org, yantar92@posteo.net, monnier@iro.umontreal.ca X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) > Date: Fri, 11 Nov 2022 04:13:03 +0200 > Cc: 59067@debbugs.gnu.org, Ihor Radchenko , > Eli Zaretskii > From: Dmitry Gutov > > Another place which might be important is the order in which the 'face' > property is applied by Emacs (with 'priority' being equal). The display code sorts the overlays before applying them, so this is covered. From unknown Fri Aug 15 03:37:48 2025 Received: (at fakecontrol) by fakecontrolmessage; To: internal_control@debbugs.gnu.org From: Debbugs Internal Request Subject: Internal Control Message-Id: bug archived. Date: Fri, 09 Dec 2022 12:24:06 +0000 User-Agent: Fakemail v42.6.9 # This is a fake control message. # # The action: # bug archived. thanks # This fakemail brought to you by your local debbugs # administrator