From unknown Mon Sep 08 03:01:36 2025 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-Mailer: MIME-tools 5.509 (Entity 5.509) Content-Type: text/plain; charset=utf-8 From: bug#75188 <75188@debbugs.gnu.org> To: bug#75188 <75188@debbugs.gnu.org> Subject: Status: persist.el should recursively copy hash tables Reply-To: bug#75188 <75188@debbugs.gnu.org> Date: Mon, 08 Sep 2025 10:01:36 +0000 retitle 75188 persist.el should recursively copy hash tables reassign 75188 emacs submitter 75188 Joseph Turner severity 75188 normal tag 75188 patch thanks From debbugs-submit-bounces@debbugs.gnu.org Mon Dec 30 04:05:59 2024 Received: (at submit) by debbugs.gnu.org; 30 Dec 2024 09:05:59 +0000 Received: from localhost ([127.0.0.1]:57286 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tSBio-00058Z-Tp for submit@debbugs.gnu.org; Mon, 30 Dec 2024 04:05:59 -0500 Received: from lists.gnu.org ([209.51.188.17]:46572) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tSBim-00058R-L0 for submit@debbugs.gnu.org; Mon, 30 Dec 2024 04:05:57 -0500 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 1tSBil-0006HM-6H for bug-gnu-emacs@gnu.org; Mon, 30 Dec 2024 04:05:55 -0500 Received: from out-170.mta1.migadu.com ([95.215.58.170]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1tSBid-0006ZS-Ho for bug-gnu-emacs@gnu.org; Mon, 30 Dec 2024 04:05:53 -0500 X-Report-Abuse: Please report any abuse attempt to abuse@migadu.com and include these headers. DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=breatheoutbreathe.in; s=key1; t=1735549540; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type; bh=ibYSrThdKKkAyY/WdeU9vIR/UBxXqIy4KzC2voBYptk=; b=M/wlQR6EHmTL7YT+Oo7r3sMEAdOdjKUU6NsdQ/WxnLVMBq4TMsIv1g12Tj+gmVz+R+IVNF OfhO9fCyHOLnNbF3c8h04y0DmFHLJGs+L6b4R+szvwhZcHrcalIlZoCJDgM03RYdtZx/+Y FGyFgCI86nYi+iP17jJvVxWD9ZvdqHM= From: Joseph Turner To: bug-gnu-emacs@gnu.org Subject: persist.el should recursively copy hash tables X-Debbugs-Cc: Adam Porter Date: Mon, 30 Dec 2024 01:05:30 -0800 Message-ID: <87wmfhk0bp.fsf@breatheoutbreathe.in> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" X-Migadu-Flow: FLOW_OUT Received-SPF: pass client-ip=95.215.58.170; envelope-from=joseph@breatheoutbreathe.in; helo=out-170.mta1.migadu.com X-Spam_score_int: -27 X-Spam_score: -2.8 X-Spam_bar: -- X-Spam_report: (-2.8 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_LOW=-0.7, RCVD_IN_VALIDITY_RPBL_BLOCKED=0.001, RCVD_IN_VALIDITY_SAFE_BLOCKED=0.001, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-Spam-Score: -1.4 (-) X-Debbugs-Envelope-To: submit X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -2.4 (--) --=-=-= Content-Type: text/plain Hello! This patch demonstrates a bug in persist.el, which may be the cause of https://github.com/alphapapa/activities.el/issues/109 and a similar bug in hyperdrive.el which causes the `persist' variable file to be deleted. We have not yet found a way to reproduce the bug in either activities.el or hyperdrive.el, so this `persist' bug may be unrelated. --=-=-= Content-Type: text/x-diff Content-Disposition: inline; filename=0001-Test-that-persist-copy-recursively-copies-hash-table.patch >From c28644c957d9fabf883990ff145cec19ed12ff10 Mon Sep 17 00:00:00 2001 From: Joseph Turner Date: Mon, 30 Dec 2024 00:40:33 -0800 Subject: [PATCH] Test that persist-copy recursively copies hash tables --- test/persist-tests.el | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/test/persist-tests.el b/test/persist-tests.el index 6bf2ed3708..adf37a5bf0 100644 --- a/test/persist-tests.el +++ b/test/persist-tests.el @@ -151,3 +151,14 @@ (ert-deftest test-persist-reset () (should-not (eq persist--test-reset-variable initial-value)) (should-not (eq initial-value (persist-default 'persist--test-reset-variable)))))) + +(ert-deftest test-persist-copy-hash-table () + "`persist-copy' should copy hash keys and values." + (let* ((hash (make-hash-table)) + (rec (record 'a)) + (_ (puthash 'foo rec hash)) + (copy-hash (persist-copy hash))) + (setf (aref (gethash 'foo copy-hash) 0) 'b) + (should-not (persist-equal hash copy-hash)) + (should-not (eq (gethash 'foo hash) + (gethash 'foo copy-hash))))) -- 2.46.0 --=-=-= Content-Type: text/plain IIUC, the solution requires rewriting `persist-copy-tree' (which is copied from Emacs 30's `copy-tree') so that it handles hash tables. If you all agree, I can do this in `persist.el`. However, would it make sense for `copy-tree' to handle hash tables? Forgive me if this has been discussed and settled before. I did find this thread about comparing hash tables with `equal': https://yhetil.org/emacs-devel/871qvz4kdw.fsf@localhost/ Thank you! Joseph --=-=-=-- From debbugs-submit-bounces@debbugs.gnu.org Tue Dec 31 17:12:44 2024 Received: (at 75188) by debbugs.gnu.org; 31 Dec 2024 22:12:44 +0000 Received: from localhost ([127.0.0.1]:37000 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tSkTk-0003bg-CA for submit@debbugs.gnu.org; Tue, 31 Dec 2024 17:12:44 -0500 Received: from out-176.mta0.migadu.com ([91.218.175.176]:30788) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tSkTh-0003bT-Nk for 75188@debbugs.gnu.org; Tue, 31 Dec 2024 17:12:42 -0500 X-Report-Abuse: Please report any abuse attempt to abuse@migadu.com and include these headers. DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=breatheoutbreathe.in; s=key1; t=1735683125; 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=6qdyhzZhWAcGJs7JXmSDxaDA6O+a30kjBpILMFn7Bl8=; b=BXv8p34mKSQvLiFkLKxKD6NoEcs2umVbfYXQmMhneppuu5hjuMTh9SLI8v4LnH4TqFFUkZ FasqOptzEZtYaJOirXwKUFR5SqSlloSG170roiOLRHo2bulO1agPaXXCev2mqgrBt3W1ej Wsk1DqhyqkMGThm81vX9wcYYjCW5ST8= From: Joseph Turner To: 75188@debbugs.gnu.org Subject: Re: bug#75188: persist.el should recursively copy hash tables In-Reply-To: <87wmfhk0bp.fsf@breatheoutbreathe.in> (Joseph Turner via's message of "Mon, 30 Dec 2024 01:05:30 -0800") References: <87wmfhk0bp.fsf@breatheoutbreathe.in> Date: Tue, 31 Dec 2024 14:12:00 -0800 Message-ID: <87y0zv7b9r.fsf@breatheoutbreathe.in> MIME-Version: 1.0 Content-Type: text/plain X-Migadu-Flow: FLOW_OUT X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 75188 Cc: Ihor Radchenko , Daniel Mendler , Stefan Monnier , Adam Porter , Eli Zaretskii , phillip.lord@russet.org.uk X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.7 (-) > Hello! > > This patch demonstrates a bug in persist.el [...] This issue also relates to the bug#63513, in which the suggestion was made to replace persist-copy-tree with (compat-call copy-tree) now that Compat 30 is available: https://yhetil.org/emacs-bugs/80479897-500e-fe60-6586-0a44ccb5993b@daniel-mendler.de/ From debbugs-submit-bounces@debbugs.gnu.org Wed Jan 01 20:22:32 2025 Received: (at control) by debbugs.gnu.org; 2 Jan 2025 01:22:32 +0000 Received: from localhost ([127.0.0.1]:41079 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tT9uy-0000Ct-3K for submit@debbugs.gnu.org; Wed, 01 Jan 2025 20:22:32 -0500 Received: from mail-ed1-x535.google.com ([2a00:1450:4864:20::535]:52288) by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.84_2) (envelope-from ) id 1tT9uw-0000Cd-Qm for control@debbugs.gnu.org; Wed, 01 Jan 2025 20:22:31 -0500 Received: by mail-ed1-x535.google.com with SMTP id 4fb4d7f45d1cf-5d0d32cd31aso15665723a12.0 for ; Wed, 01 Jan 2025 17:22:30 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1735780945; x=1736385745; darn=debbugs.gnu.org; h=to:subject:message-id:date:mime-version:from:from:to:cc:subject :date:message-id:reply-to; bh=lbb+0FW52PugJB9DsOvdZw57mK65P/cyM1dP39VooiM=; b=kIbbKxIBjeNMDzd4CNKh5ZPfTs//heuwaWInk+dFikqzS0T3AQh5JHaQo8QMDHHg1X UTnjawIGk0JoGQv1fxvJF6KbaXFGJ5C/TeqP6swqLiMB6ziRFOB4Uey2x2u/V0wJo0U1 xU8BdALH3IFz5f/5hn4m0TsLhGAkb5Rt/O0DZbOgUdg/EaHH7r6Ju7aarHFhMNItvLJw RrY+nh57Zijbvz29GL3Qd4XomL2nN+keLOja83Tfxzj8MM2homtTjx5NQR9RXbOKX11o osFtoGWvo1GpuAPx775I4SGhsUwMcVYp1TOfhQbiMV2CRhrjTBh1qUs3IrZhgvLpflVs J4Uw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1735780945; x=1736385745; h=to:subject:message-id:date:mime-version:from:x-gm-message-state :from:to:cc:subject:date:message-id:reply-to; bh=lbb+0FW52PugJB9DsOvdZw57mK65P/cyM1dP39VooiM=; b=Aduo8YqZka3qMtdYkU1nFVEvZ0XDq/K9vmEGJSM2QA+QpUtgBnaPopcvlOvi/g15/y N+PAsb5y0ItI1T1w2lcyI2waNMHR9z4MreSq3xonvGIGiNekqd5V3A0cXlKkvUNXC0y6 iyuzJfg6wCVdJRIyTMBn3T4EifozVaWlFrWe1BG8pQg8/p3yzQE/z6Ng5FhtWg5GEdC/ mUu6RyxKFM4b+Y7PQZPV6DKvSiX3a0UHcoI7fhUKerNaMMAXGnFOF06PTDInyG+sqk9c rUfzntUqadSdCKfR8mCG74Vl4e1kdnH6Wx7YW9pnCloVYx+PhKNhqkLvBKr7cmffKzrE R/Tg== X-Gm-Message-State: AOJu0YzXFOlpsiw6u0WjMheQuQNMOeXI7fWoGXxf5eIDxO/jFh5uiwge XAADQKTCe2JLo38Q3Mams/yzt0sQtVlTiN6IPtlrI2dVry7O6BDsXve5lCOFCswAaibkxIN8qPz MYoR0DgLQsXhA/J4nb5rSDfQkmzFF3oH4 X-Gm-Gg: ASbGncuq66Cf9BIKZO0PF+iBux2YPEtco/1HENOpVTV9ZO/DyHpkTYooKqN/Iq5wtDE Zni2kUwJvElllOdx0l0h8Q3SqCIEGl/ysDUv5uaIR X-Google-Smtp-Source: AGHT+IEYFJ8VLhvLQP73dng0zxVNOrtbQS2qsJS+khAofWplS0sLn8aFu3EtLbDAlDdDWz5AeMo4j8kn+jHoWcVakd4= X-Received: by 2002:a05:6402:348d:b0:5d4:55e:f99e with SMTP id 4fb4d7f45d1cf-5d81ddc09abmr107405787a12.18.1735780944605; Wed, 01 Jan 2025 17:22:24 -0800 (PST) Received: from 753933720722 named unknown by gmailapi.google.com with HTTPREST; Wed, 1 Jan 2025 19:22:24 -0600 From: Stefan Kangas MIME-Version: 1.0 Date: Wed, 1 Jan 2025 19:22:24 -0600 Message-ID: Subject: control message for bug #75188 To: control@debbugs.gnu.org Content-Type: text/plain; charset="UTF-8" X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: control X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) tags 75188 + patch quit From debbugs-submit-bounces@debbugs.gnu.org Sat Jan 18 04:12:20 2025 Received: (at 75188) by debbugs.gnu.org; 18 Jan 2025 09:12:20 +0000 Received: from localhost ([127.0.0.1]:40126 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tZ4sN-0000dK-Qz for submit@debbugs.gnu.org; Sat, 18 Jan 2025 04:12:20 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:56822) by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1tZ4sL-0000d7-As for 75188@debbugs.gnu.org; Sat, 18 Jan 2025 04:12:18 -0500 Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1tZ4sE-0001WD-Uh; Sat, 18 Jan 2025 04:12:10 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=References:Subject:In-Reply-To:To:From:Date: mime-version; bh=LFFwQyjuI3Nee+iH1qYAnv/OqTQn2EnQbITazwEZ+S0=; b=MoC/WibHZhKn 5lutUFbtmC1dPYBhjC121oqrkOy2KEvAfUgh4qoRaXYR0t2Peig0NCLzyLC7DkruNx0IuWfDodDJA vg8VcUKDrsnnjSpBmIKRBEikCD8XjQhDg+ZfczJJuIG7tX2iB6MAxhLTe72k7s/8GsUN91qqS/qSM Pl42CJRzj31U2rDPWV7yvhVPXbFwiDpRzRqRGEAUC2ppw5ClTYxu7VyA4S5heFPwTnqLOGmw77stw NCCZbzKBlOncleeJBMXn4VXcEHN10ndvt8ITRgJgaPTa6eiooJj1aGCHksNg6e58hcI+z0yCgNYj/ 5QHEKvnkm/+GbpAAr2LYwg==; Date: Sat, 18 Jan 2025 11:11:48 +0200 Message-Id: <86a5bocwq3.fsf@gnu.org> From: Eli Zaretskii To: Joseph Turner In-Reply-To: <87y0zv7b9r.fsf@breatheoutbreathe.in> (message from Joseph Turner on Tue, 31 Dec 2024 14:12:00 -0800) Subject: Re: bug#75188: persist.el should recursively copy hash tables References: <87wmfhk0bp.fsf@breatheoutbreathe.in> <87y0zv7b9r.fsf@breatheoutbreathe.in> X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 75188 Cc: yantar92@posteo.net, mail@daniel-mendler.de, monnier@iro.umontreal.ca, 75188@debbugs.gnu.org, adam@alphapapa.net, phillip.lord@russet.org.uk X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) > From: Joseph Turner > Cc: Daniel Mendler , > Ihor Radchenko , > Stefan Monnier , > Adam Porter , Eli Zaretskii , > phillip.lord@russet.org.uk > Date: Tue, 31 Dec 2024 14:12:00 -0800 > > > Hello! > > > > This patch demonstrates a bug in persist.el > > [...] > > This issue also relates to the bug#63513, in which the suggestion was > made to replace persist-copy-tree with (compat-call copy-tree) now that > Compat 30 is available: > > https://yhetil.org/emacs-bugs/80479897-500e-fe60-6586-0a44ccb5993b@daniel-mendler.de/ Thanks, would you like to submit a patch along those lines? From debbugs-submit-bounces@debbugs.gnu.org Mon Jan 27 21:09:16 2025 Received: (at 75188) by debbugs.gnu.org; 28 Jan 2025 02:09:16 +0000 Received: from localhost ([127.0.0.1]:35017 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tcb2S-000845-85 for submit@debbugs.gnu.org; Mon, 27 Jan 2025 21:09:16 -0500 Received: from out-189.mta1.migadu.com ([95.215.58.189]:26874) by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1tcb2N-00083g-Ca for 75188@debbugs.gnu.org; Mon, 27 Jan 2025 21:09:14 -0500 X-Report-Abuse: Please report any abuse attempt to abuse@migadu.com and include these headers. DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=breatheoutbreathe.in; s=key1; t=1738030143; 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=DLdU1hR45OLRD5i99QGVj2HVoyegbhsjcfbQkyvalgs=; b=lCwoOzM6aP04OopwCOBlDnTPCLJxRHJm2FzTuqHt3gUN0FRRWVe2VhwonAJBZl/eYgZDE4 rQ/1k1rsNVKA0S+cWunBw5Rlw9zxKU0WpDb4pRvgi+AsUyfF9eoz7Npu4UOMQ7OBgh3j6b djoc9Qtdm3+7//ghukzsGsTk8Rr0b9s= From: Joseph Turner To: Eli Zaretskii Subject: Re: bug#75188: persist.el should recursively copy hash tables In-Reply-To: <86a5bocwq3.fsf@gnu.org> (Eli Zaretskii's message of "Sat, 18 Jan 2025 11:11:48 +0200") References: <87wmfhk0bp.fsf@breatheoutbreathe.in> <87y0zv7b9r.fsf@breatheoutbreathe.in> <86a5bocwq3.fsf@gnu.org> Date: Mon, 27 Jan 2025 18:08:57 -0800 Message-ID: <877c6fsn9i.fsf@breatheoutbreathe.in> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" X-Migadu-Flow: FLOW_OUT X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 75188 Cc: yantar92@posteo.net, mail@daniel-mendler.de, monnier@iro.umontreal.ca, 75188@debbugs.gnu.org, adam@alphapapa.net, phillip.lord@russet.org.uk X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.7 (-) --=-=-= Content-Type: text/plain Eli Zaretskii writes: >> From: Joseph Turner >> Cc: Daniel Mendler , >> Ihor Radchenko , >> Stefan Monnier , >> Adam Porter , Eli Zaretskii , >> phillip.lord@russet.org.uk >> Date: Tue, 31 Dec 2024 14:12:00 -0800 >> >> > Hello! >> > >> > This patch demonstrates a bug in persist.el >> >> [...] >> >> This issue also relates to the bug#63513, in which the suggestion was >> made to replace persist-copy-tree with (compat-call copy-tree) now that >> Compat 30 is available: >> >> https://yhetil.org/emacs-bugs/80479897-500e-fe60-6586-0a44ccb5993b@daniel-mendler.de/ > > Thanks, would you like to submit a patch along those lines? Please see patch: --=-=-= Content-Type: text/x-diff Content-Disposition: inline; filename=0001-Depend-on-compat.el-for-new-copy-tree-behavior.patch >From 8c3d276a977010d4b903d9de7344b6fad8de8eab Mon Sep 17 00:00:00 2001 From: Joseph Turner Date: Mon, 27 Jan 2025 18:05:10 -0800 Subject: [PATCH] Depend on compat.el for new copy-tree behavior --- persist.el | 34 ++++------------------------------ 1 file changed, 4 insertions(+), 30 deletions(-) diff --git a/persist.el b/persist.el index 49b3e9b51f..3260df0964 100644 --- a/persist.el +++ b/persist.el @@ -5,7 +5,7 @@ ;; Author: Phillip Lord ;; Maintainer: Joseph Turner ;; Package-Type: multi -;; Package-Requires: ((emacs "26.1")) +;; Package-Requires: ((emacs "26.1") (compat "30.0.2.0")) ;; Version: 0.6.1 ;; The contents of this file are subject to the GPL License, Version 3.0. @@ -43,6 +43,8 @@ ;;; Code: +(require 'compat) + (defvar persist--directory-location (locate-user-emacs-file "persist") "The location of persist directory.") @@ -211,39 +213,11 @@ (defun persist-equal (a b) t)) (equal a b))) -(defun persist-copy-tree (tree &optional vectors-and-records) - "Make a copy of TREE. -If TREE is a cons cell, this recursively copies both its car and its cdr. -Contrast to `copy-sequence', which copies only along the cdrs. -With the second argument VECTORS-AND-RECORDS non-nil, this -traverses and copies vectors and records as well as conses." - (declare (side-effect-free error-free)) - (if (consp tree) - (let (result) - (while (consp tree) - (let ((newcar (car tree))) - (if (or (consp (car tree)) - (and vectors-and-records - (or (vectorp (car tree)) (recordp (car tree))))) - (setq newcar (persist-copy-tree (car tree) vectors-and-records))) - (push newcar result)) - (setq tree (cdr tree))) - (nconc (nreverse result) - (if (and vectors-and-records (or (vectorp tree) (recordp tree))) - (persist-copy-tree tree vectors-and-records) - tree))) - (if (and vectors-and-records (or (vectorp tree) (recordp tree))) - (let ((i (length (setq tree (copy-sequence tree))))) - (while (>= (setq i (1- i)) 0) - (aset tree i (persist-copy-tree (aref tree i) vectors-and-records))) - tree) - tree))) - (defun persist-copy (obj) "Return copy of OBJ." (if (hash-table-p obj) (copy-hash-table obj) - (persist-copy-tree obj t))) + (compat-call copy-tree obj t))) (provide 'persist) ;;; persist.el ends here -- 2.46.0 --=-=-=-- From debbugs-submit-bounces@debbugs.gnu.org Sat Feb 01 05:30:20 2025 Received: (at 75188) by debbugs.gnu.org; 1 Feb 2025 10:30:20 +0000 Received: from localhost ([127.0.0.1]:56500 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1teAlX-0006qy-Pk for submit@debbugs.gnu.org; Sat, 01 Feb 2025 05:30:20 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:48706) by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1teAlU-0006qf-Ml for 75188@debbugs.gnu.org; Sat, 01 Feb 2025 05:30:18 -0500 Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1teAlM-0003nb-3t; Sat, 01 Feb 2025 05:30:08 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=References:Subject:In-Reply-To:To:From:Date: mime-version; bh=hIRXlgrJGI2cbmBqz/NyLNzNm/XuINhHMngBWCR8OuI=; b=Xfh74fDzAbVL JG5fGZ2lOlFGXGItO4H7Kqq4gRzTpAKrwyNcOXTDvf2DmI6pql20mNv8J5hhUovgYjWsONMAEHlEH 0z1ryy9sSvePbIdGY6KeIHxPzLA9SOhIoNNq9Kfk4i8RPXrkv6Z/45QkvuRz6wv3DicXcnEmnSpEh 3zYifIdE4BsVUYJdEah2gjZ4f4Ah6LA4Ri8rqdZjS8Vnqmv6PzTFpD4b60NY5SMoVSVSc7yNPEDIM h96L+ZYj3UWGdor/XqtoNtrDofAr4Drag73enntPLcB2Rcgev+hO+jc30NH1pNzDgCMXUwxgijW6l I8Cxk7v1G7gFJ3CWdJyQXA==; Date: Sat, 01 Feb 2025 12:30:04 +0200 Message-Id: <86frkygdoz.fsf@gnu.org> From: Eli Zaretskii To: Joseph Turner In-Reply-To: <877c6fsn9i.fsf@breatheoutbreathe.in> (message from Joseph Turner on Mon, 27 Jan 2025 18:08:57 -0800) Subject: Re: bug#75188: persist.el should recursively copy hash tables References: <87wmfhk0bp.fsf@breatheoutbreathe.in> <87y0zv7b9r.fsf@breatheoutbreathe.in> <86a5bocwq3.fsf@gnu.org> <877c6fsn9i.fsf@breatheoutbreathe.in> X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 75188 Cc: yantar92@posteo.net, mail@daniel-mendler.de, monnier@iro.umontreal.ca, 75188@debbugs.gnu.org, adam@alphapapa.net, phillip.lord@russet.org.uk X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) > From: Joseph Turner > Cc: 75188@debbugs.gnu.org, mail@daniel-mendler.de, yantar92@posteo.net, > monnier@iro.umontreal.ca, adam@alphapapa.net, > phillip.lord@russet.org.uk > Date: Mon, 27 Jan 2025 18:08:57 -0800 > > Eli Zaretskii writes: > > >> From: Joseph Turner > >> Cc: Daniel Mendler , > >> Ihor Radchenko , > >> Stefan Monnier , > >> Adam Porter , Eli Zaretskii , > >> phillip.lord@russet.org.uk > >> Date: Tue, 31 Dec 2024 14:12:00 -0800 > >> > >> > Hello! > >> > > >> > This patch demonstrates a bug in persist.el > >> > >> [...] > >> > >> This issue also relates to the bug#63513, in which the suggestion was > >> made to replace persist-copy-tree with (compat-call copy-tree) now that > >> Compat 30 is available: > >> > >> https://yhetil.org/emacs-bugs/80479897-500e-fe60-6586-0a44ccb5993b@daniel-mendler.de/ > > > > Thanks, would you like to submit a patch along those lines? > > Please see patch: LGTM. Phillip, would you please install? From debbugs-submit-bounces@debbugs.gnu.org Thu Feb 13 04:54:27 2025 Received: (at 75188-done) by debbugs.gnu.org; 13 Feb 2025 09:54:27 +0000 Received: from localhost ([127.0.0.1]:40579 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tiVvJ-0006yQ-Cp for submit@debbugs.gnu.org; Thu, 13 Feb 2025 04:54:27 -0500 Received: from mail-ej1-x62b.google.com ([2a00:1450:4864:20::62b]:51443) by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.84_2) (envelope-from ) id 1tiVvG-0006y0-Gd for 75188-done@debbugs.gnu.org; Thu, 13 Feb 2025 04:54:20 -0500 Received: by mail-ej1-x62b.google.com with SMTP id a640c23a62f3a-ab7fa1bc957so138147166b.2 for <75188-done@debbugs.gnu.org>; Thu, 13 Feb 2025 01:54:18 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1739440452; x=1740045252; darn=debbugs.gnu.org; h=cc:to:subject:message-id:date:mime-version:references:in-reply-to :from:from:to:cc:subject:date:message-id:reply-to; bh=IIHVK01YbgaG+x0AlxWXFwVbItKz+OCj+PUTRRihPlU=; b=RU2j0eZrWyBRzPg4V2noHX5aoR2sqKlZuLYAZw17K99YBWAtP9/TpQuF49guF009KB cZMqmfRFT5cTs+eBBsflq8Lde/CLlgged2PPDplJO70b5RrIJsOmALRWnccP5NQ2WTsU Npyp5tJmekx9Qkh0xoN+9hw2+a+9TKG61V+XqQK8q7dpsE1NRsV0gZtnYZsB93RZmdZz cWt+X/ZDv3KTQFU6dep9fOpTf+acBNyzy+jbFGSe25yHhbRb9wln2V4I2as1eu91TYS8 LBGTVle9bsTThbTmfUya27LG8zCXgYXbjkjRZKB2BR4zsiD5IRHVdjVASzWkUG4//WGV VzFw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1739440452; x=1740045252; h=cc:to:subject:message-id:date:mime-version:references:in-reply-to :from:x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=IIHVK01YbgaG+x0AlxWXFwVbItKz+OCj+PUTRRihPlU=; b=I72a9BOFZrdTrmw8sx2/emJOD2UR+PaBx11Pn0t2HDPWmz9yPvxM6FHLd2GDbfzzQk 5oOHWoNWG1ZFgVji0hFCwSlkUla3Q7vzCcV92fF4JA3YNY5+RNPdyq/WsitZoTGae9Tz wL8h3nWI7sxvGB9DuWGxLkCidsZ9iC8SSdxNkIX2or8EkZ+qrrnOOhMeVWLp4OzH3a+N +0x3YyT0mj82d40z/Ii/nk5PCaMrjpbaN0hwy6N+SP38a3vKQr1rjkeA+6YvjOi6+5Fm 9BX3nt6G3fi8p8tS9Np5eJBL0d8EeI2w/AFzMmYywqy109a9ZrHNW4yUqgny2cYgad8T gQsQ== X-Forwarded-Encrypted: i=1; AJvYcCU7y77r9gDa8lYqpzMdQ2NqkT//XAQa3VK9XPRSd6fkWQjyQvrMbny7DNV8ko8vhB1klRydh2xckLUk@debbugs.gnu.org X-Gm-Message-State: AOJu0YxJpW2Bh2Hi72Tkgg9Yb6je1t3iq2FJzgF3YelWxGXVkOPIqAZj IwQF8TyyaWLLbj5y6tc2ewHvQ85z1G++F/oc12dNasca8qQ+WTTyjjIDGa650bZfJdKxiY0KiIl QFF/niv5lxes7RfV5uaPci5D/97o= X-Gm-Gg: ASbGncvYvmTOdCPVei275WjsDR+QwALSUmA1fHdvr4mEC0oRKWORDlHInt/Znp9gyQY uCKRKI5Jy1XelrNGslIwM+hPQ4XxCJmNS31B+qytZEy/hflWdE5d2c2IfipbFQQezVj1GvJsxzu A= X-Google-Smtp-Source: AGHT+IFPV9nxUOAvJJ5fp3z+EI0mmRLGi/DwSFc7lxUR1kaThgSGTp+f5UNyp+0ijf6f4VesR182lI4DyPsjd9nBr30= X-Received: by 2002:a17:907:da3:b0:ab7:cc43:c52a with SMTP id a640c23a62f3a-aba501ab6aemr224415566b.52.1739440452088; Thu, 13 Feb 2025 01:54:12 -0800 (PST) Received: from 753933720722 named unknown by gmailapi.google.com with HTTPREST; Thu, 13 Feb 2025 01:54:11 -0800 From: Stefan Kangas In-Reply-To: <86frkygdoz.fsf@gnu.org> References: <87wmfhk0bp.fsf@breatheoutbreathe.in> <87y0zv7b9r.fsf@breatheoutbreathe.in> <86a5bocwq3.fsf@gnu.org> <877c6fsn9i.fsf@breatheoutbreathe.in> <86frkygdoz.fsf@gnu.org> MIME-Version: 1.0 Date: Thu, 13 Feb 2025 01:54:11 -0800 X-Gm-Features: AWEUYZmYPYtRjUIkELdzdIMyr6n7eVWGmFXdskfdr7uHMKhEkYH0Nq4GEJlz-4M Message-ID: Subject: Re: bug#75188: persist.el should recursively copy hash tables To: Eli Zaretskii Content-Type: text/plain; charset="UTF-8" X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 75188-done Cc: yantar92@posteo.net, mail@daniel-mendler.de, Joseph Turner , monnier@iro.umontreal.ca, adam@alphapapa.net, 75188-done@debbugs.gnu.org, phillip.lord@russet.org.uk X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) Eli Zaretskii writes: >> From: Joseph Turner >> Cc: 75188@debbugs.gnu.org, mail@daniel-mendler.de, yantar92@posteo.net, >> monnier@iro.umontreal.ca, adam@alphapapa.net, >> phillip.lord@russet.org.uk >> Date: Mon, 27 Jan 2025 18:08:57 -0800 >> >> Eli Zaretskii writes: >> >> >> From: Joseph Turner >> >> Cc: Daniel Mendler , >> >> Ihor Radchenko , >> >> Stefan Monnier , >> >> Adam Porter , Eli Zaretskii , >> >> phillip.lord@russet.org.uk >> >> Date: Tue, 31 Dec 2024 14:12:00 -0800 >> >> >> >> > Hello! >> >> > >> >> > This patch demonstrates a bug in persist.el >> >> >> >> [...] >> >> >> >> This issue also relates to the bug#63513, in which the suggestion was >> >> made to replace persist-copy-tree with (compat-call copy-tree) now that >> >> Compat 30 is available: >> >> >> >> https://yhetil.org/emacs-bugs/80479897-500e-fe60-6586-0a44ccb5993b@daniel-mendler.de/ >> > >> > Thanks, would you like to submit a patch along those lines? >> >> Please see patch: > > LGTM. Phillip, would you please install? I'm not Phillip, but I installed the patch now. Closing. From debbugs-submit-bounces@debbugs.gnu.org Thu Feb 13 10:41:22 2025 Received: (at 75188-done) by debbugs.gnu.org; 13 Feb 2025 15:41:22 +0000 Received: from localhost ([127.0.0.1]:44967 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tibL6-0000vk-RA for submit@debbugs.gnu.org; Thu, 13 Feb 2025 10:41:22 -0500 Received: from out-182.mta1.migadu.com ([2001:41d0:203:375::b6]:48455) by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1tibL4-0000vS-4y for 75188-done@debbugs.gnu.org; Thu, 13 Feb 2025 10:41:19 -0500 Date: Thu, 13 Feb 2025 07:40:53 -0800 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=breatheoutbreathe.in; s=key1; t=1739461271; 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: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=odl6REoJRACg2DPgYdGxBvU2soLab4JEL5d45rS8JJE=; b=ZANLslcEEozsFFqzlXsZf43GV0okPxxEEI7WphluhuDEATkpOUBSoF53XCIY50Velyovl/ 1RDOBosvuAfX87jn1QdTDLf1cYrQKv1eedUWx3oMYGJ40kz9t1bemqx3iRG7RUWUh6/mxk th+ZUoog1+8weQtoaEhkmIAezyExuxg= X-Report-Abuse: Please report any abuse attempt to abuse@migadu.com and include these headers. From: Joseph Turner To: Stefan Kangas , Eli Zaretskii Subject: Re: bug#75188: persist.el should recursively copy hash tables In-Reply-To: References: <87wmfhk0bp.fsf@breatheoutbreathe.in> <87y0zv7b9r.fsf@breatheoutbreathe.in> <86a5bocwq3.fsf@gnu.org> <877c6fsn9i.fsf@breatheoutbreathe.in> <86frkygdoz.fsf@gnu.org> Message-ID: MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Migadu-Flow: FLOW_OUT X-Spam-Score: -0.0 (/) X-Debbugs-Envelope-To: 75188-done Cc: yantar92@posteo.net, mail@daniel-mendler.de, monnier@iro.umontreal.ca, adam@alphapapa.net, 75188-done@debbugs.gnu.org, phillip.lord@russet.org.uk X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) On February 13, 2025 1:54:11 AM PST, Stefan Kangas wrote: >I'm not Phillip, but I installed the patch now=2E Closing=2E Thank you! From unknown Mon Sep 08 03:01:36 2025 Received: (at fakecontrol) by fakecontrolmessage; To: internal_control@debbugs.gnu.org From: Debbugs Internal Request Subject: Internal Control Message-Id: bug archived. Date: Fri, 14 Mar 2025 11:24:17 +0000 User-Agent: Fakemail v42.6.9 # This is a fake control message. # # The action: # bug archived. thanks # This fakemail brought to you by your local debbugs # administrator