From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Ihor Radchenko Newsgroups: gmane.emacs.bugs Subject: bug#63513: [PATCH] Make persist-defvar work with records and hash tables Date: Sat, 09 Sep 2023 10:01:34 +0000 Message-ID: <87il8j7ji9.fsf@localhost> 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> <87msxwa8kd.fsf@breatheoutbreathe.in> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="10848"; mail-complaints-to="usenet@ciao.gmane.io" Cc: 63513-done@debbugs.gnu.org, Daniel Mendler , Stefan Monnier , Adam Porter , Eli Zaretskii , phillip.lord@russet.org.uk To: Joseph Turner Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Sat Sep 09 12:01: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 1qeumF-0002ga-Ug for geb-bug-gnu-emacs@m.gmane-mx.org; Sat, 09 Sep 2023 12:01:20 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qeuly-0002rT-8H; Sat, 09 Sep 2023 06:01: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 1qeulw-0002r5-81 for bug-gnu-emacs@gnu.org; Sat, 09 Sep 2023 06:01: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 1qeulv-0007Oq-JS for bug-gnu-emacs@gnu.org; Sat, 09 Sep 2023 06:00:59 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1qeuly-0002IG-3C for bug-gnu-emacs@gnu.org; Sat, 09 Sep 2023 06:01:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Ihor Radchenko Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 09 Sep 2023 10:01: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.16942536478778 (code D ref 63513); Sat, 09 Sep 2023 10:01:02 +0000 Original-Received: (at 63513-done) by debbugs.gnu.org; 9 Sep 2023 10:00:47 +0000 Original-Received: from localhost ([127.0.0.1]:46167 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qeulj-0002HW-1J for submit@debbugs.gnu.org; Sat, 09 Sep 2023 06:00:47 -0400 Original-Received: from mout02.posteo.de ([185.67.36.66]:46821) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qeulf-0002HH-FG for 63513-done@debbugs.gnu.org; Sat, 09 Sep 2023 06:00:45 -0400 Original-Received: from submission (posteo.de [185.67.36.169]) by mout02.posteo.de (Postfix) with ESMTPS id 9DD64240104 for <63513-done@debbugs.gnu.org>; Sat, 9 Sep 2023 12:00:34 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=posteo.net; s=2017; t=1694253634; bh=YSE3T6FlWNatdnEmS/qv1Jv5Q7IqQlUuSlfyknUd+OA=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version:From; b=KV9NIgISiPi3Dsv4wPAsJpc+oAMPdB4IcZbjJNJ4SVTdbujW6En8JOMM6JBwKG36f Vs1+yRWa+TCu7MpTLQMSlPtBdTVyNGdYvKZ2S58PFxznTg+dN85EuorAKxVZ27H3mj ozPJGBVlLB1QI1KpuqtC3ET9sfAUrLdAYWCVjzvzjvbeyTzL0te10VA2eLzz6Mmb3d 5oh25382puKjFVr7wvyAWsy4LLXZD73ldSO7RHTj/WTz4mU9I3q1RSuMddSgDdSOpR snT0Nz+zu15yCXlVDVcCl0j2wnBC62TlYFNauMLNDYCb4NcAqSxFa0tqJYAbJIJbs7 luFXtNreJa0mw== Original-Received: from customer (localhost [127.0.0.1]) by submission (posteo.de) with ESMTPSA id 4RjT4d0xfpz6tsf; Sat, 9 Sep 2023 12:00:32 +0200 (CEST) In-Reply-To: <87msxwa8kd.fsf@breatheoutbreathe.in> 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:269844 Archived-At: Joseph Turner writes: >> 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 see. > 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. AFAIU, the recommended way to implement compat function definitions that are not yet added to compat.el is using `compat-defun' + `compat-call'. Then, one can simply drop `compat-defun' after the function is finally release with compat.el without touching the rest of the code. CCing Daniel. -- Ihor Radchenko // yantar92, Org mode contributor, Learn more about Org mode at . Support Org development at , or support my work at