From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Dmitry Gutov Newsgroups: gmane.emacs.bugs Subject: bug#59067: 29.0.50; Exexpected overlay order in `overlays-in' return value Date: Thu, 10 Nov 2022 23:00:51 +0200 Message-ID: References: <871qqgn44l.fsf@localhost> <838rko38g6.fsf@gnu.org> <878rkobm21.fsf@localhost> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="7935"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.2.2 Cc: 59067@debbugs.gnu.org, Ihor Radchenko , Eli Zaretskii To: Stefan Monnier Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Thu Nov 10 22:03:14 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 1otEhd-0001vd-VY for geb-bug-gnu-emacs@m.gmane-mx.org; Thu, 10 Nov 2022 22:03:13 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1otEgu-0004E2-0g; Thu, 10 Nov 2022 16:02:28 -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 1otEgU-00040y-Nr for bug-gnu-emacs@gnu.org; Thu, 10 Nov 2022 16:02: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 1otEgU-0003Ac-DM for bug-gnu-emacs@gnu.org; Thu, 10 Nov 2022 16:02:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1otEgU-0003lf-0h for bug-gnu-emacs@gnu.org; Thu, 10 Nov 2022 16:02:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Dmitry Gutov Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 10 Nov 2022 21:02: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.166811406314421 (code B ref 59067); Thu, 10 Nov 2022 21:02:01 +0000 Original-Received: (at 59067) by debbugs.gnu.org; 10 Nov 2022 21:01:03 +0000 Original-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 Original-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 Original-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) Original-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) Content-Language: en-US In-Reply-To: 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:247548 Archived-At: 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.