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: Fri, 11 Nov 2022 04:13:03 +0200 Message-ID: <9657304b-e6c2-6e4a-70cc-a24e24aa34ff@yandex.ru> 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: 7bit Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="12199"; 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 Fri Nov 11 03:14:15 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 1otJYd-00033U-LM for geb-bug-gnu-emacs@m.gmane-mx.org; Fri, 11 Nov 2022 03:14:15 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1otJYT-00083T-K2; Thu, 10 Nov 2022 21:14: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 1otJYR-000832-9c for bug-gnu-emacs@gnu.org; Thu, 10 Nov 2022 21:14:03 -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 1otJYQ-0008Cu-CR for bug-gnu-emacs@gnu.org; Thu, 10 Nov 2022 21:14:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1otJYQ-00054n-2q for bug-gnu-emacs@gnu.org; Thu, 10 Nov 2022 21:14: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: Fri, 11 Nov 2022 02:14:02 +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.166813279419432 (code B ref 59067); Fri, 11 Nov 2022 02:14:02 +0000 Original-Received: (at 59067) by debbugs.gnu.org; 11 Nov 2022 02:13:14 +0000 Original-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 Original-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 Original-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) Original-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) 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:247566 Archived-At: 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).