From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Joseph Turner 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 10:10:58 -0700 Message-ID: <87msxwa8kd.fsf@breatheoutbreathe.in> 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> <87fs3o8uil.fsf@localhost> Reply-To: Joseph Turner Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="20463"; mail-complaints-to="usenet@ciao.gmane.io" Cc: Adam Porter , Eli Zaretskii , 63513-done@debbugs.gnu.org, Stefan Monnier , phillip.lord@russet.org.uk To: Ihor Radchenko Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Fri Sep 08 19:18:14 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 1qef7W-00056W-1L for geb-bug-gnu-emacs@m.gmane-mx.org; Fri, 08 Sep 2023 19:18:14 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qef7J-0004Tc-HO; Fri, 08 Sep 2023 13:18:01 -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 1qef7I-0004TU-86 for bug-gnu-emacs@gnu.org; Fri, 08 Sep 2023 13:18: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 1qef7H-0004mu-WF for bug-gnu-emacs@gnu.org; Fri, 08 Sep 2023 13:18:00 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1qef7K-0005Uc-AY for bug-gnu-emacs@gnu.org; Fri, 08 Sep 2023 13:18:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Joseph Turner Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 08 Sep 2023 17:18:02 +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.169419345621079 (code D ref 63513); Fri, 08 Sep 2023 17:18:02 +0000 Original-Received: (at 63513-done) by debbugs.gnu.org; 8 Sep 2023 17:17:36 +0000 Original-Received: from localhost ([127.0.0.1]:45473 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qef6t-0005Tv-Sw for submit@debbugs.gnu.org; Fri, 08 Sep 2023 13:17:36 -0400 Original-Received: from out-230.mta1.migadu.com ([2001:41d0:203:375::e6]:10413) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qef6p-0005Tf-Lw for 63513-done@debbugs.gnu.org; Fri, 08 Sep 2023 13:17:33 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=breatheoutbreathe.in; s=key1; t=1694193446; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=Hlx0gFIEstxnXX7baduMM/IaMyn+hZkQR20L21IaRGk=; b=nDdL1K1L2IS3pA61RZWKzTa2F3QXQVwbhS2LTbqQrKvbYbWYhDPdVMdysrGcq1qv/WPlNT qOLUaFKIy73OCqXp24mGz67vGkS0yswK504MSUxhzaAAjZiek6/zc7tp3OCYgMvMkprYWq 9+erxpVzLbPuqYwIiuzwIM8oUrKFn3I= X-Report-Abuse: Please report any abuse attempt to abuse@migadu.com and include these headers. In-reply-to: <87fs3o8uil.fsf@localhost> X-Migadu-Flow: FLOW_OUT 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:269803 Archived-At: Ihor Radchenko writes: > Stefan Monnier writes: > >>>>> 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 :-) > > Err... > Then, wouldn't it be better to contribute this function to compat.el and > use it from there? The new behavior of copy-tree has already been added to compat.el: https://github.com/emacs-compat/compat/pull/25 However, that change currently only exists in compat's emacs-30 branch. I did not know if it was acceptable for persist.el to require compat when I wrote these patches. If we agree that it is acceptable, then I'm happy to submit a patch to replace (persist-copy-tree ...) with (compat-call copy-tree ...), but we'll have to wait to apply the patch until after the compat.el emacs-30 branch is merged into master.