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#63513: [PATCH] Make persist-defvar work with records and hash tables Date: Fri, 08 Sep 2023 12:36:35 -0400 Message-ID: References: <87wn1axgh6.fsf@breatheoutbreathe.in> <83jzx925lv.fsf@gnu.org> <87a5xubwoo.fsf@breatheoutbreathe.in> <87v8csku60.fsf@breatheoutbreathe.in> <83cyyz94c6.fsf@gnu.org> <87a5u2ydzg.fsf@breatheoutbreathe.in> <83msy25g0s.fsf@gnu.org> <624CBB7F-1442-400D-8D4D-1B26EBE9DACB@breatheoutbreathe.in> <877cp5bmig.fsf@breatheoutbreathe.in> <871qvz4kdw.fsf@localhost> <8734zoaolv.fsf@localhost> 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="11108"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Cc: Adam Porter , Eli Zaretskii , phillip.lord@russet.org.uk, 63513-done@debbugs.gnu.org, Joseph Turner To: Ihor Radchenko Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Fri Sep 08 18:37: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 1qeeTu-0002eL-1v for geb-bug-gnu-emacs@m.gmane-mx.org; Fri, 08 Sep 2023 18:37:18 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qeeTe-0004by-8V; Fri, 08 Sep 2023 12:37:02 -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 1qeeTc-0004bZ-7o for bug-gnu-emacs@gnu.org; Fri, 08 Sep 2023 12:37:00 -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 1qeeTb-0002Iv-Vi for bug-gnu-emacs@gnu.org; Fri, 08 Sep 2023 12:36:59 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1qeeTe-0001ae-0H for bug-gnu-emacs@gnu.org; Fri, 08 Sep 2023 12:37:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Stefan Monnier Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 08 Sep 2023 16:37:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 63513 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch Original-Received: via spool by 63513-done@debbugs.gnu.org id=D63513.16941910086079 (code D ref 63513); Fri, 08 Sep 2023 16:37:01 +0000 Original-Received: (at 63513-done) by debbugs.gnu.org; 8 Sep 2023 16:36:48 +0000 Original-Received: from localhost ([127.0.0.1]:45352 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qeeTQ-0001Zz-Iq for submit@debbugs.gnu.org; Fri, 08 Sep 2023 12:36:48 -0400 Original-Received: from mailscanner.iro.umontreal.ca ([132.204.25.50]:21198) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qeeTO-0001Zl-44 for 63513-done@debbugs.gnu.org; Fri, 08 Sep 2023 12:36:47 -0400 Original-Received: from pmg2.iro.umontreal.ca (localhost.localdomain [127.0.0.1]) by pmg2.iro.umontreal.ca (Proxmox) with ESMTP id 1982780861; Fri, 8 Sep 2023 12:36:38 -0400 (EDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=iro.umontreal.ca; s=mail; t=1694190996; bh=v1OcwmwBpoBvTswgqGSoFTHUQaP9EiO1wshch6JUOCU=; h=From:To:Cc:Subject:In-Reply-To:References:Date:From; b=IgEq2cw5X2G2Lh4ZRf9jtlkArWc+N2bo1E0VN+I5I51RuuvG7MKnCzr8VMMCZZOFO SBqdRX87X7hiThXDBfunLFvcCY6IvlvwvfP6o+AmdlXyN41z4C6rWZt5dCsD9i2J40 hSVNEkTdUxJYr56x5wkU29Vm/hgNEKnXK/PLjU2BD72J1RfYxSwc0ATMl5IAMZsBRx TAeFLmw0T7YCHhH7ZuiPn1ikBCw/hpS7DZKIuVsEk+qaKjQxVfI/clwmc9W4IIu7Is O0CgH/OWvUOgz3fUamYmPdRdcPJnamzm912LdK35dA8tp4qtM2nOiRz270Fj2HHQPx w3HDOwqnuSGXg== Original-Received: from mail01.iro.umontreal.ca (unknown [172.31.2.1]) by pmg2.iro.umontreal.ca (Proxmox) with ESMTP id 90DB38014C; Fri, 8 Sep 2023 12:36:36 -0400 (EDT) Original-Received: from alfajor (unknown [23.233.149.155]) by mail01.iro.umontreal.ca (Postfix) with ESMTPSA id 39F3A120264; Fri, 8 Sep 2023 12:36:36 -0400 (EDT) In-Reply-To: <8734zoaolv.fsf@localhost> (Ihor Radchenko's message of "Fri, 08 Sep 2023 11:30:52 +0000") 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:269793 Archived-At: >>> Here you go! >> Thanks, pushed! > May it be possible to promote `persist-hash-equal' and > `persist-copy-tree' to common subr.el functions? > The topic of comparing hash tables has been previously discussed in > https://yhetil.org/emacs-devel/871qvz4kdw.fsf@localhost/ Hmm... AFAICT `persist-copy-tree` is a copy of our current `copy-tree`, so there's nothing to do there :-) As for `persist-hash-equal` (which is actually called `persist-equal`, AFAICT), I think if we want to move it out of `persist.el` we need to improve it so it also looks inside hash-tables that occur within vectors, conses, etc... Maybe, like Sam Steingold suggested, we should simply consider the current treatment of `equal` on hash-tables to be a bug. Stefan