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#65051: internal_equal manipulates symbols with position without checking symbols-with-pos-enabled. Date: Fri, 11 Aug 2023 16:19:47 +0300 Message-ID: <6a81c696-4e6a-ac24-6c66-7e2b541ed67a@gutov.dev> References: 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="32867"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.13.0 Cc: 65051@debbugs.gnu.org, Stefan Monnier To: Alan Mackenzie Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Fri Aug 11 15:21:32 2023 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 1qUS54-0008Fh-FL for geb-bug-gnu-emacs@m.gmane-mx.org; Fri, 11 Aug 2023 15:21:31 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qUS4w-0000hE-Oe; Fri, 11 Aug 2023 09:21:22 -0400 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 1qUS4j-0000gE-Er for bug-gnu-emacs@gnu.org; Fri, 11 Aug 2023 09:21:09 -0400 Original-Received: from debbugs.gnu.org ([2001:470:142:5::43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1qUS4c-0005qS-Tw for bug-gnu-emacs@gnu.org; Fri, 11 Aug 2023 09:21:09 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1qUS4c-00078B-Au for bug-gnu-emacs@gnu.org; Fri, 11 Aug 2023 09:21:02 -0400 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 Aug 2023 13:21:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 65051 X-GNU-PR-Package: emacs Original-Received: via spool by 65051-submit@debbugs.gnu.org id=B65051.169176000527329 (code B ref 65051); Fri, 11 Aug 2023 13:21:02 +0000 Original-Received: (at 65051) by debbugs.gnu.org; 11 Aug 2023 13:20:05 +0000 Original-Received: from localhost ([127.0.0.1]:45159 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qUS3g-00076j-Ou for submit@debbugs.gnu.org; Fri, 11 Aug 2023 09:20:05 -0400 Original-Received: from wout4-smtp.messagingengine.com ([64.147.123.20]:58389) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qUS3b-00075z-I0 for 65051@debbugs.gnu.org; Fri, 11 Aug 2023 09:20:02 -0400 Original-Received: from compute1.internal (compute1.nyi.internal [10.202.2.41]) by mailout.west.internal (Postfix) with ESMTP id 8EABE32008FC; Fri, 11 Aug 2023 09:19:52 -0400 (EDT) Original-Received: from mailfrontend1 ([10.202.2.162]) by compute1.internal (MEProxy); Fri, 11 Aug 2023 09:19:52 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gutov.dev; h=cc :cc:content-transfer-encoding:content-type:content-type:date :date:from:from:in-reply-to:in-reply-to:message-id:mime-version :references:reply-to:sender:subject:subject:to:to; s=fm2; t= 1691759992; x=1691846392; bh=CdYYcLlZU5DGyyTDYecqvMRxrhpdsg5E+GI imh3RyVQ=; b=iTPhQ1IFSDOfx+zjiuHzUG7BgEj1K1s6a+5OJIWV46PmUIh3cYB /YqYNs2Pc4JTtB7oOvPdM6q34tbo5jaU6jVXTj0ZdSpHvhiYl98U55vgTPaIAd4s jcRHCQs7h6+MSE6t7QDWbD5XLzB6QWklpuAL59yn8HX+LuXky8ZOwKB3n8TTqO+1 t74B2sKQ/y2wn36C3GxAl1LzVHqcABUwJlz9eSaVPc9aE3GM6UNZU4zNbEJV0HCn gHKXImawuscE77yyZ+SNmH6b7pX0W7irysWlVIieMJ2XQuR86s9oTSbsJjLQiIuo bL0QAz71r2sNdFZVulMkh3WcFvfXaDWTwzA== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-transfer-encoding :content-type:content-type:date:date:feedback-id:feedback-id :from:from:in-reply-to:in-reply-to:message-id:mime-version :references:reply-to:sender:subject:subject:to:to:x-me-proxy :x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s=fm3; t= 1691759992; x=1691846392; bh=CdYYcLlZU5DGyyTDYecqvMRxrhpdsg5E+GI imh3RyVQ=; b=Kz9jp7P9fBopwt3xQnIAT/Tzv40jZntNxmzIxGsVnRqKhsQCCCj zvMPaGYjG/PcML+kIuzYuA0iLAAsHfBGBcc3Zz3bJBig4BNm6Qs9QGiTPivd6Wfs gaT81HDyQOdYjqxP/hla4WmNUOXCePkVioJy5gh5XiEfyClIaFUscP0vWHaV9Rya rY3rcUVXxRpCOYRVwrJBgEy4ejtIQXs1LlV9C4nU9N/f7Q/NMOXcxO9Q0Eh5wQCh oOn8Cdmw8NrqJaDeaRDUrSoQtPaPtYUMLXhY8VC0uyCkVOdH6RaNSZRKpK8/SrK1 uk55cQp+Bdh/6FMVc8mQdrBXmqMkGotZuFw== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedviedrleekgdeivdcutefuodetggdotefrodftvf curfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfghnecu uegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmdenuc fjughrpefkffggfgfuvfevfhfhjggtgfesthejredttdefjeenucfhrhhomhepffhmihht rhihucfiuhhtohhvuceoughmihhtrhihsehguhhtohhvrdguvghvqeenucggtffrrghtth gvrhhnpeeigfetveehveevffehledtueekieeikeeufeegudfgfeeghfdulefgfeevledv veenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepmhgrihhlfhhrohhmpegumh hithhrhiesghhuthhovhdruggvvh X-ME-Proxy: Feedback-ID: i0e71465a:Fastmail Original-Received: by mail.messagingengine.com (Postfix) with ESMTPA; Fri, 11 Aug 2023 09:19:50 -0400 (EDT) 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:267211 Archived-At: Hi again, Alan, On 11/08/2023 15:05, Alan Mackenzie wrote: >>> I think it was possibly a design error to have text >>> properties conceptually as a part of a string/buffer rather than >>> something associated with it, like an overlay. The fact that equal >>> ignores these properties supports this view. > >> We needed a reference to access the properties from. Overlays are >> different because they attach to a buffer. There is nothing else to >> attach to when you have a string value. > > This is arbitrary; overlays _could_ have been made attachable to > strings, in which case text properties need not have been. That would > have prevented all the heart searching when considering equal with > strings. Then we would have some "metadata" that's part of the value, and some that is not part of the value. How would we look those up, though? Through a global registry? equal-including-properties is useful enough, by the way. In the tests, at least. >> Which seems very similar to the situation with symbols, I think. > > There are practical differences. Having symbols with position simply > handled as their bare symbols would slow down Emacs quite a lot. That's > why we have symbols-with-pos-enabled. But you know that. Does the current impl of 'equal' create worse performance as well? That would be a good argument to change it. > Currently, > the working of s-w-p-enabled is inconsistent, and should be fixed, which > is what this bug is about. Inconsistent with what? If we're talking about the relation between EQUAL and EQ, objects that are EQ have to be EQUAL, but those that are EQUAL don't have to be EQ. Anyway, I'd like to offer a question from a different perspective: should two symbols-with-positions where the positions are different but the symbol is the same, be equal between each other? If yes (which is my reading of fns.c:2755), then it makes sense for them to be equal-able to symbols without positions as well.