From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Alan Mackenzie Newsgroups: gmane.emacs.bugs Subject: bug#65051: internal_equal manipulates symbols with position without checking symbols-with-pos-enabled. Date: Mon, 7 Aug 2023 09:20:25 +0000 Message-ID: References: Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="26772"; mail-complaints-to="usenet@ciao.gmane.io" Cc: 65051@debbugs.gnu.org To: Stefan Monnier Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Mon Aug 07 11:21:20 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 1qSwQS-0006r2-Mu for geb-bug-gnu-emacs@m.gmane-mx.org; Mon, 07 Aug 2023 11:21:20 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qSwQD-0006Xl-CG; Mon, 07 Aug 2023 05:21:05 -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 1qSwQB-0006WG-5Z for bug-gnu-emacs@gnu.org; Mon, 07 Aug 2023 05:21:03 -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 1qSwQA-0005XY-Hg for bug-gnu-emacs@gnu.org; Mon, 07 Aug 2023 05:21:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1qSwQA-0007v9-5e for bug-gnu-emacs@gnu.org; Mon, 07 Aug 2023 05:21:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Alan Mackenzie Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Mon, 07 Aug 2023 09: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.169140004030412 (code B ref 65051); Mon, 07 Aug 2023 09:21:02 +0000 Original-Received: (at 65051) by debbugs.gnu.org; 7 Aug 2023 09:20:40 +0000 Original-Received: from localhost ([127.0.0.1]:60578 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qSwPn-0007uS-TU for submit@debbugs.gnu.org; Mon, 07 Aug 2023 05:20:40 -0400 Original-Received: from mx3.muc.de ([193.149.48.5]:60287) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qSwPh-0007u7-Py for 65051@debbugs.gnu.org; Mon, 07 Aug 2023 05:20:38 -0400 Original-Received: (qmail 46468 invoked by uid 3782); 7 Aug 2023 11:20:26 +0200 Original-Received: from acm.muc.de (pd953adbb.dip0.t-ipconnect.de [217.83.173.187]) (using STARTTLS) by colin.muc.de (tmda-ofmipd) with ESMTP; Mon, 07 Aug 2023 11:20:26 +0200 Original-Received: (qmail 3265 invoked by uid 1000); 7 Aug 2023 09:20:25 -0000 Content-Disposition: inline In-Reply-To: X-Submission-Agent: TMDA/1.3.x (Ph3nix) X-Primary-Address: acm@muc.de 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:266875 Archived-At: Hello, Stefan. On Sun, Aug 06, 2023 at 23:30:15 -0400, Stefan Monnier wrote: > > at the top level of the function. Thus > > (equal 'foo #) > > will return non-nil, regardless of the setting of > > `symbols-with-pos-enabled`. It should return non-nil only when that > > flag variable is non-nil. This is a bug. > Could you explain why you think it's a bug? When symbols-with-pos-enabled is non-nil, the two arguments to that equal call are equal. That is the point of s-w-p-e. When s-w-p-e is nil, and the "magic" is thus switched off, the two lisp objects have different type (the first is a symbol, the second is a pseudovector), thus cannot be equal. I think the amendments I've proposed for the elisp manual page "Symbols with Position" are now clearer about this sort of thing. > Stefan -- Alan Mackenzie (Nuremberg, Germany).