From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp0.migadu.com ([2001:41d0:303:5f26::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms8.migadu.com with LMTPS id NX5hFP/2jWUqEgEAkFu2QA (envelope-from ) for ; Thu, 28 Dec 2023 23:30:23 +0100 Received: from aspmx1.migadu.com ([2001:41d0:303:e224::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp0.migadu.com with LMTPS id iA+JDP/2jWVaMgEAqHPOHw (envelope-from ) for ; Thu, 28 Dec 2023 23:30:23 +0100 X-Envelope-To: larch@yhetil.org Authentication-Results: aspmx1.migadu.com; dkim=fail ("body hash did not verify") header.d=gmail.com header.s=20230601 header.b=YOLbgK0w; spf=pass (aspmx1.migadu.com: domain of "emacs-orgmode-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="emacs-orgmode-bounces+larch=yhetil.org@gnu.org"; dmarc=fail reason="SPF not aligned (relaxed)" header.from=gmail.com (policy=none) ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1703802623; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:mime-version:mime-version: content-type:content-type:list-id:list-help:list-unsubscribe: list-subscribe:list-post:dkim-signature; bh=mGxEJ7AogJh3R3HYdvqB0n0TbqRvaNUkihqo8YBa8TY=; b=sHtdszrTi0mqVvvrbzAOaGfhkNUrpzK9zI5oEvuwvu3tQIsNpTM3KU1TPncjIlNMuPgAgh Oa0M0R1sE9QhvoGt0lDjK8e0QSgJJVIhM51StYquyULRDGyFxJJ4cya4K1aB5v5BuOa6GC paxszSef4LKW5fYHX1DbVQJTXdVtzTHMKQhPIfHxffD+m86SeibhGRJ+0dSp5svvt5JkGL 27Ecf8gZtoivENpnwKdbgMiCbDJLywjmppScOcRyC0Q+Ly8h9xNBDMv5zXUC/Sl9O26elJ xCEyaDBTgXQTrgLrovo3z2XlO7ByjyjV/+zPrAMxlHgmRLK87YgkaAhLiwboqQ== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1703802623; a=rsa-sha256; cv=none; b=AzHc42CSQZaIU6tpq8NE2uL38LWrwkaTC0XjD1qvW6Gx5zUvz7wf4f7HihuLWFqJL1xka6 WcmCuOsTC8X3zkswFOHnJ7v8BbTpEEnYfnm4h42ZFKgat1MiAbTg+45Io77vNvCpXZFY0w jg8mHhtq0D5QVdvLgF52Gnsj0zbQEMgwSh4z8oTI0JPX/yyxN5Xat/ybiJFpejxHt/w0VI VyDBLe4XYayqsa1mXVXL9pWYE6SNVAiUJb4iKxdcKjuFVKFWApjU2vMntE5W2Yj1IlDxSD mn50y9pHplukUiBCqZ3DqrkU5MCD/V9HDera7jKngrIGH1H51/4bKj3aAK9Tnw== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=fail ("body hash did not verify") header.d=gmail.com header.s=20230601 header.b=YOLbgK0w; spf=pass (aspmx1.migadu.com: domain of "emacs-orgmode-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="emacs-orgmode-bounces+larch=yhetil.org@gnu.org"; dmarc=fail reason="SPF not aligned (relaxed)" header.from=gmail.com (policy=none) Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id C848E34254 for ; Thu, 28 Dec 2023 23:30:22 +0100 (CET) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1rIysM-0004bP-EG; Thu, 28 Dec 2023 17:29:14 -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 1rIysK-0004b8-UN for emacs-orgmode@gnu.org; Thu, 28 Dec 2023 17:29:12 -0500 Received: from mail-qk1-x736.google.com ([2607:f8b0:4864:20::736]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1rIysJ-0002AP-2E for emacs-orgmode@gnu.org; Thu, 28 Dec 2023 17:29:12 -0500 Received: by mail-qk1-x736.google.com with SMTP id af79cd13be357-7818487b1d3so28853485a.2 for ; Thu, 28 Dec 2023 14:29:10 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1703802549; x=1704407349; darn=gnu.org; h=subject:to:content-language:user-agent:mime-version:date:message-id :from:from:to:cc:subject:date:message-id:reply-to; bh=ulhCiuOpRozRm15NjvDYLEHFbzbZB4UNrRpaxAQavWw=; b=YOLbgK0wMKXUkGqA8LIPr6amZQ28+qPoaPPTPlYg8cVJBc8SAOccTNf7DZVSfsgXUG FAh7/2dauRZ12zxqBzy3/9VrfOwNgq+cZNzky7mXyYyqRpqNvg+wiX4FG10n+yXa1Suj bz0gKDpQff/hHEdwjy+dqLF0gcJRhHW/PfHnM5iDMa7NnfOjEfFWz9WkQxeMkzmtGsBL 0/x8oyUOM9JOSlZueuAuFHjuDC31qZUnx1zkNeyNbkIqTyOUas0nqtOb6GeR4YknWTj3 7urmzX6SWr4aXMTdZCZF3fFAWRIK/cwj9NtyV9b+8M3NlSE3bwldcPgr/nEWAfo2hs6R Z8gg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1703802549; x=1704407349; h=subject:to:content-language:user-agent:mime-version:date:message-id :from:x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=ulhCiuOpRozRm15NjvDYLEHFbzbZB4UNrRpaxAQavWw=; b=EHxQUSBdA/ARC3TmaWVpVuKKAQ82PLbnr7PbK9fSE4dJ9c+Izzzt9YfCCoBDvJupII Ah7LvDD2wzxUrfkgjzJJ1k+zm75lBTJ1ZvShO++FVa7RuCKRzUNT+wAxgsX8f8Hp4AN9 xSu8r7hLoWAOodAEh9GXYbcSNksv96atWdHrDH3RX5eeyL++eO9qKXySzjF+p6eWrvyb U26F6yf+468xaYH1smoP8xxUJoCbauoMM4Cj2ubZcDxbXNHsViPIXQi1dyW6WMXY5ozE +hzpdMpn+CQK5VZErAyZ6g4tqt589/Jpe4onKFvqpzteFrlGJlWHNPY+xsrb2Jqxl5Fw vDuQ== X-Gm-Message-State: AOJu0Ywd9HDnuyJ57UTZQl0r7fq4UHHL5MP2equIJuFEfBkaoRfwFgor GPoBDZNNVgfDEA8dqXUJB+fQazlu7JQ= X-Google-Smtp-Source: AGHT+IHV8Z4rPSzK82LtF2tAUjfEJIIRd/h13c0JAoiArStYXPRubxod5zyUU7TGvPnVWATHB9snPg== X-Received: by 2002:a05:620a:a46:b0:781:5820:24a8 with SMTP id j6-20020a05620a0a4600b00781582024a8mr5526426qka.38.1703802549001; Thu, 28 Dec 2023 14:29:09 -0800 (PST) Received: from tzzpccd.dnsalias.net ([32.220.200.235]) by smtp.gmail.com with ESMTPSA id az38-20020a05620a172600b007815d11eab5sm1739591qkb.26.2023.12.28.14.29.08 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 28 Dec 2023 14:29:08 -0800 (PST) From: Justin X-Google-Original-From: Justin Received: from [192.168.66.10] (unknown [192.168.66.1]) by tzzpccd.dnsalias.net (Postfix) with ESMTPSA id CE57113463C3 for ; Thu, 28 Dec 2023 17:29:07 -0500 (EST) Content-Type: multipart/mixed; boundary="------------9CHoOs8JX2u82XtMkzqsw0A4" Message-ID: Date: Thu, 28 Dec 2023 17:29:07 -0500 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Content-Language: en-US To: emacs-orgmode@gnu.org Subject: [PATCH] assoc-delete-all missing from 26.1 Received-SPF: pass client-ip=2607:f8b0:4864:20::736; envelope-from=justinvallon@gmail.com; helo=mail-qk1-x736.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 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, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: emacs-orgmode@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+larch=yhetil.org@gnu.org Sender: emacs-orgmode-bounces+larch=yhetil.org@gnu.org X-Migadu-Flow: FLOW_IN X-Migadu-Country: US X-Migadu-Spam-Score: -4.05 X-Spam-Score: -4.05 X-Migadu-Queue-Id: C848E34254 X-Migadu-Scanner: mx12.migadu.com X-TUID: Z19ZEBxpUYQR This is a multi-part message in MIME format. --------------9CHoOs8JX2u82XtMkzqsw0A4 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit * lisp/org-compat: add org-assoc-delete-all from compat/compat-27.el * lisp/org-persist: use org-assoc-delete-all ---  lisp/org-compat.el  | 18 ++++++++++++++++++  lisp/org-persist.el |  2 +-  2 files changed, 19 insertions(+), 1 deletion(-) diff --git a/lisp/org-compat.el b/lisp/org-compat.el index 8b1f16355..6fcea1837 100644 --- a/lisp/org-compat.el +++ b/lisp/org-compat.el @@ -348,6 +348,24 @@ Execute BODY, and unwind connection-local variables."      `(with-connection-local-profiles (connection-local-get-profiles nil)         ,@body))) +;; assoc-delete-all missing from 26.1 +(if (fboundp 'assoc-delete-all) +    (defalias 'org-assoc-delete-all 'assoc-delete-all) +  ;; from compat/compat-27.el +  (defun org-assoc-delete-all (key alist &optional test) +    "Delete all matching key from alist, default test equal" +    (unless test (setq test #'equal)) +    (while (and (consp (car alist)) +        (funcall test (caar alist) key)) +      (setq alist (cdr alist))) +    (let ((tail alist) tail-cdr) +      (while (setq tail-cdr (cdr tail)) +    (if (and (consp (car tail-cdr)) +         (funcall test (caar tail-cdr) key)) +            (setcdr tail (cdr tail-cdr)) +          (setq tail tail-cdr)))) +    alist)) +    ;;; Emacs < 26.1 compatibility diff --git a/lisp/org-persist.el b/lisp/org-persist.el index 82c31144a..229957fb0 100644 --- a/lisp/org-persist.el +++ b/lisp/org-persist.el @@ -1216,7 +1216,7 @@ Remove expired sessions timestamps."  Remove current sessions from `org-persist-gc-lock-file'."    (let* ((file (org-file-name-concat org-persist-directory org-persist-gc-lock-file))           (alist (when (file-exists-p file) (org-persist--read-elisp-file file)))) -    (setq alist (assoc-delete-all before-init-time alist)) +    (setq alist (org-assoc-delete-all before-init-time alist))      (org-persist--write-elisp-file file alist)      ;; Only GC orphan files when there are no active sessions.      (not alist))) base-commit: 80ce6152ba915b7c53d239f2b030f7afb8e70e8e -- 2.20.1 --------------9CHoOs8JX2u82XtMkzqsw0A4 Content-Type: text/x-patch; charset=UTF-8; name="0001-assoc-delete-all-missing-from-26.1.patch" Content-Disposition: attachment; filename="0001-assoc-delete-all-missing-from-26.1.patch" Content-Transfer-Encoding: base64 RnJvbSA0OGM4NGU4NzYwMThhOWYyZjdjODE4YzJiOWZhMTc5ZTQ3YWM0NWI5IE1vbiBTZXAg MTcgMDA6MDA6MDAgMjAwMQpGcm9tOiBKdXN0aW4gVmFsbG9uIDxKdXN0aW5WYWxsb25AZ21h aWwuY29tPgpEYXRlOiBUaHUsIDI4IERlYyAyMDIzIDE3OjE2OjQ1IC0wNTAwClN1YmplY3Q6 IFtQQVRDSF0gYXNzb2MtZGVsZXRlLWFsbCBtaXNzaW5nIGZyb20gMjYuMQoKKiBsaXNwL29y Zy1jb21wYXQ6IGFkZCBvcmctYXNzb2MtZGVsZXRlLWFsbCBmcm9tIGNvbXBhdC9jb21wYXQ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