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 21:32:11 -0500 Message-ID: References: <871qqgn44l.fsf@localhost> <838rko38g6.fsf@gnu.org> <878rkobm21.fsf@localhost> <9657304b-e6c2-6e4a-70cc-a24e24aa34ff@yandex.ru> Reply-To: Stefan Monnier Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="20733"; 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 Fri Nov 11 03:33:26 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 1otJrC-0005Em-Ek for geb-bug-gnu-emacs@m.gmane-mx.org; Fri, 11 Nov 2022 03:33:26 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1otJqr-0004Ae-7E; Thu, 10 Nov 2022 21:33:05 -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 1otJqo-0004AN-E4 for bug-gnu-emacs@gnu.org; Thu, 10 Nov 2022 21:33:04 -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 1otJqo-000848-5r for bug-gnu-emacs@gnu.org; Thu, 10 Nov 2022 21:33:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1otJqn-0005YN-Mk for bug-gnu-emacs@gnu.org; Thu, 10 Nov 2022 21:33: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: Fri, 11 Nov 2022 02:33: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.166813394321284 (code B ref 59067); Fri, 11 Nov 2022 02:33:01 +0000 Original-Received: (at 59067) by debbugs.gnu.org; 11 Nov 2022 02:32:23 +0000 Original-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 Original-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 Original-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) Original-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== Original-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) In-Reply-To: <9657304b-e6c2-6e4a-70cc-a24e24aa34ff@yandex.ru> (Dmitry Gutov's message of "Fri, 11 Nov 2022 04:13:03 +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:247567 Archived-At: >> 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