From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp2.migadu.com ([2001:41d0:403:58f0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms1.migadu.com with LMTPS id yPicH93rLmaq3AAAe85BDQ:P1 (envelope-from ) for ; Mon, 29 Apr 2024 02:37:49 +0200 Received: from aspmx1.migadu.com ([2001:41d0:403:58f0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp2.migadu.com with LMTPS id yPicH93rLmaq3AAAe85BDQ (envelope-from ) for ; Mon, 29 Apr 2024 02:37:49 +0200 X-Envelope-To: larch@yhetil.org Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=outlook.com header.s=selector1 header.b=D6XqTnAc; arc=pass ("microsoft.com:s=arcselector9901:i=1"); dmarc=pass (policy=none) header.from=outlook.com; 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" ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1714351069; h=from:from:sender:sender: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:list-id:list-help: list-unsubscribe:list-subscribe:list-post:dkim-signature; bh=XqieEj+qemm6ujeRkwiUlvp6lpTlARNRkFwm1zydl34=; b=VGNr8RAWmC4lKbBSwIO+oKx7JEc5G6Nukgr+V2VLuRKWyNhfp5naZISiM+UEsAnnu40DE/ +/OwWNqDCh7Kjl09baiocSbFoapUXOPheLfvZcCJ0jq5v67gwbca6CcUlcZ+X8ykyYqHHq 4jNlVeHkK/sZyNQYIkJb3yHvT2fM+gEAJoClyVWKZgQtKCqANAopBhjFuA2DOe1TMOfYxZ W3DidNNLiNtjXQEWzzFXf2tfhtWR8GietzfLfBrrX/BYaUnIpjH2OQgSg3s2AptIWV8e5t W8kqdBnrNWSkRcQxUc2WYPzRRqM8CClvEPH+h1ExieWICUjiz4SV9vJCDnZhnw== ARC-Seal: i=2; s=key1; d=yhetil.org; t=1714351069; a=rsa-sha256; cv=pass; b=YCxjvWWNTNhM/i6q09pu+HWM3xmLDHfj/EpUwqvrSQxc/uiGbZ7qc3+VWcBMqjncUo7ghL i/B50n6u3IM1TgPZZCs5p0fr/4HqP0MejptXQ6GETXLacHf+WqpsUqlZnzweFV83xqK2Dd vVZwDFsvNXjgkpCEZhT3P1boSmWxn2QdquyCsN7RqJ+yd93xXul/qdRf1ggVEaIe8JefxX kXCFLUOlOFvhs6iaH0nblh5bGV6gii83kTUcw0pF147zmP/1GPo4qVbEBg8R/UDb9RBGUL Y+f3MC6Bh8Vd7wbd7UR7SqVadhjEveqaPxM0oVRT7V3bVq1jLCn0V3N8BwdlUQ== ARC-Authentication-Results: i=2; aspmx1.migadu.com; dkim=pass header.d=outlook.com header.s=selector1 header.b=D6XqTnAc; arc=pass ("microsoft.com:s=arcselector9901:i=1"); dmarc=pass (policy=none) header.from=outlook.com; 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" 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 08CBB72C84 for ; Mon, 29 Apr 2024 02:37:48 +0200 (CEST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1s1F0r-0000YT-5T; Sun, 28 Apr 2024 20:36:57 -0400 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 1s1F0p-0000YJ-KL for emacs-orgmode@gnu.org; Sun, 28 Apr 2024 20:36:55 -0400 Received: from mail-bn8nam04olkn2096.outbound.protection.outlook.com ([40.92.47.96] helo=NAM04-BN8-obe.outbound.protection.outlook.com) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1s1F0n-0002cS-PI for emacs-orgmode@gnu.org; Sun, 28 Apr 2024 20:36:55 -0400 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=CuPHbn/VnPhCD6hGuC/ipsXgfdlxq0fVxAJn1azioMRaeZbOI6/J2ecPtukgUy7ejpi24Ut/ydFNu/wU66WewX9PnP1vHfD4/lu9g0fUXsX6Co9mt+eb+vvH/Zf98TC+5Yezr2Y9m7x+pC3XH9TLQGwr75wUUbCxpZtHngiZbZf3RxXJftAR33Wrkdi0VYEcQ1D9lYGvYhat6KIaB5t2vKND7mMfMJjXHsQus7emuxSmubECHU7r1WzZK3o1ut/RHkFWyRDg/gppffx4MvNBtzWZpY2POtacokDiipLKSAkmOqx1/BTN2czM/VhwYWNqXg0KwTzRUoAOFupXEEdi3A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=XqieEj+qemm6ujeRkwiUlvp6lpTlARNRkFwm1zydl34=; b=N2uTerxDLlrnunOUk4KqnD64jZR5jzefHe/zqoH5UoSPO21uMyGKO4LotAr8TkaYBAguSKyfy7iNHE1/gM/kthQQWkr3nVvMZrxnGQSYeutvNokJxxqPY6nYgIfVLVgZB91665YrvAysGEhuTlt1QKHaMwAc0LhFDp2ofe0dAwgCtv/vLa9YQxEZ2OIw5c98bOLlSKf0xk+0VcCy+Tkhb6dqFP9wcIAXsI/cRQBEvKvPDogll2bGufBR07Day6ngiNQeAGQcWk7JdmxBKO4nIY0tPUtoLcswAk1dZKmwZ1kY31PKlsKmBFj6X0YaV6tRodQMedA8Fskpi+1Okvh/iw== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=none; dmarc=none; dkim=none; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=outlook.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=XqieEj+qemm6ujeRkwiUlvp6lpTlARNRkFwm1zydl34=; b=D6XqTnAcwSdl3KfZXquZPnfN2FwJ+YuYQ6LmivQvmhPsLn0VDWYDusOmUOJxg5QpsrlbO2BsbreU4ymRbbwfT3nhfZweSOdn5TjJyZvl7qBOCRHiIUPOPiTcKca0MYC9dhT14yjkIWa8oBrtDAlluS2Jx6CuQMSiH1pL7a9CZ5tb+PkDtNL54fs3pQ264gbt3K6n02xebxJEf/iLHYnrzmcaD9My/AX2aEza9Q992HgH5gLp1+dKzSSKtHaJ3NrCcobVGVsaeouWoIhv8aJQRI7rRmVSDliki+sTbznPyBCvTlGFmYwr873LNonGNdYXtrjCK582dBtmoJfirFEUQw== Received: from CH3PR84MB3424.NAMPRD84.PROD.OUTLOOK.COM (2603:10b6:610:1c4::17) by SJ2PR84MB3782.NAMPRD84.PROD.OUTLOOK.COM (2603:10b6:a03:58c::16) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7519.34; Mon, 29 Apr 2024 00:36:49 +0000 Received: from CH3PR84MB3424.NAMPRD84.PROD.OUTLOOK.COM ([fe80::178d:1518:8a49:2a45]) by CH3PR84MB3424.NAMPRD84.PROD.OUTLOOK.COM ([fe80::178d:1518:8a49:2a45%6]) with mapi id 15.20.7519.031; Mon, 29 Apr 2024 00:36:49 +0000 From: Morgan Smith To: emacs-orgmode@gnu.org Cc: Morgan Smith Subject: [PATCH] lisp/org.el: Obsolete `org-cached-entry-get' in favor of `org-entry-get' Date: Sun, 28 Apr 2024 20:28:36 -0400 Message-ID: X-Mailer: git-send-email 2.41.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain X-TMN: [Zh0qR1fCeb60XTKaP0hDIFQu2JJPufsi] X-ClientProxiedBy: YT1PR01CA0098.CANPRD01.PROD.OUTLOOK.COM (2603:10b6:b01:2c::7) To CH3PR84MB3424.NAMPRD84.PROD.OUTLOOK.COM (2603:10b6:610:1c4::17) X-Microsoft-Original-Message-ID: <20240429002835.7302-2-Morgan.J.Smith@outlook.com> MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: CH3PR84MB3424:EE_|SJ2PR84MB3782:EE_ X-MS-Office365-Filtering-Correlation-Id: e7f6bd1a-977f-48cc-7ec0-08dc67e4753e X-Microsoft-Antispam: BCL:0; ARA:14566002|461199019|440099019|3412199016|1710799017; X-Microsoft-Antispam-Message-Info: /6ennsVSjNTjjTvKtYZ9wJGso97VFG5+EzJ3xkT/ekIVpdWml4idB4vOf5WJ8bOP1ZnDnIsfjJSNGPSLYck5tLpKnQwNLb8PWSOEP3KG6vFKenz5A+DyFShmbW+qZda6mAc44ZkVMdc+TwphL6tTYGr0y8aXl4oBnZ5mmBNQu8WOpkJ492W1u2IBsfIcD5i9zXbw8BQ920LCC3gUbWbisdxleQ6y+9ptblLGFfSGTSYmwKI7gMSBRrHQZiJe0JyEnfkBMgLHEW6OUWoW4szE4LKpWrl+tF+ZhgqLp8ugHX+fPV8H9rzKl2VYM/W+NsrxiY9sxOfof+zyFp7OMowGP1V9LG/EcrKnNUNHy2yxLL5NjyQEZVUtDSLsOjTwNgKgpu9pmTh5vkaWH2Cu5/22RVlG9SleV9NnMOlw8nn7Ek5mo6g/GzP59zzXwifW6HsZhFomkOyEhQQiaSKi783lUcZA7ELgbakUCla8Ky2EYkw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Q5ic/CmC/MnRaScH7idcz7xiW?= =?us-ascii?Q?PGXPLNq/JC7ctY4+wnchmskd+pKSSo8gpoftrSAPoWi0qz2EB1YaONBfSUV7?= =?us-ascii?Q?gbouE0gJbVTphcksJg45Olx/VEmdoIwyrKSoOKyVHWCzyKXO56DK0FWMFGnh?= =?us-ascii?Q?0peJrp+GYtzEzpwFDAoip9+qbCtyHrRFkk1KYhjzQelTv+dZfdDWMNwLS5GP?= =?us-ascii?Q?TfyNWZ1x2KP+OcFQ4NY6LUDF+PZ74b/2GuMVTvjN16M6aq+SijSETksk9X/4?= =?us-ascii?Q?SlezXmvuTrAsCZETjHdghkw4qbniGMN0VHEn62vUqDrnlepVwh1cuGVLYTgW?= =?us-ascii?Q?0AOTtJ73CeEqmAfr/PDfHs1vnrwMYFGueIjrJYuhxD9JhtMkCp5zbneifcpH?= =?us-ascii?Q?FzCL2K7j3IA6Stn+/JPBFj/vJtqh7RpFvOcCTZ/MSK+0JSMZMWDBbXKV9e2h?= =?us-ascii?Q?x3M0wN3uxYVmRurxY+dza45ldBz8vNVxTTKsFiQu0M5lH92tAwQlCEaoXL+k?= =?us-ascii?Q?jx+s48JHx1h8MCxh7qiPGi0uOmlc2lpx9TJAJWYyOS2fa6XC6YBBeV5RmcjB?= =?us-ascii?Q?R8GZKgCIeorvsX8nYnDT?= X-OriginatorOrg: outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: e7f6bd1a-977f-48cc-7ec0-08dc67e4753e X-MS-Exchange-CrossTenant-AuthSource: CH3PR84MB3424.NAMPRD84.PROD.OUTLOOK.COM X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 29 Apr 2024 00:36:49.8591 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 84df9e7f-e9f6-40af-b435-aaaaaaaaaaaa X-MS-Exchange-CrossTenant-RMS-PersistedConsumerOrg: 00000000-0000-0000-0000-000000000000 X-MS-Exchange-Transport-CrossTenantHeadersStamped: SJ2PR84MB3782 Received-SPF: pass client-ip=40.92.47.96; envelope-from=Morgan.J.Smith@outlook.com; helo=NAM04-BN8-obe.outbound.protection.outlook.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_MSPIKE_H2=-0.001, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001 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: -6.31 X-Spam-Score: -6.31 X-Migadu-Queue-Id: 08CBB72C84 X-Migadu-Scanner: mx11.migadu.com X-TUID: r3Q7Q1pGtnCK * lisp/org.el (org-cached-entry-get): Rewrite in terms `org-entry-get'. Obsolete in favor of `org-entry-get'. (org-make-tags-matcher): Replace uses of `org-cached-entry-get' with `org-entry-get'. --- Hello! All tests pass. I don't think we can justify the existence of this function but let me know if I'm wrong. The caching mechanism used here is likely to cause hard to diagnose issues. All of the logic here already exists in `org-entry-get'. This function is mentioned in very few commits unlike its more popular sibling. Thanks, Morgan lisp/org.el | 21 +++++---------------- 1 file changed, 5 insertions(+), 16 deletions(-) diff --git a/lisp/org.el b/lisp/org.el index c91029c7f..80ffeeccf 100644 --- a/lisp/org.el +++ b/lisp/org.el @@ -11480,21 +11480,10 @@ are also TODO tasks." (defalias 'org-tags-sparse-tree 'org-match-sparse-tree) -(defvar org-cached-props nil) (defun org-cached-entry-get (pom property) - (if (or (eq t org-use-property-inheritance) - (and (stringp org-use-property-inheritance) - (let ((case-fold-search t)) - (string-match-p org-use-property-inheritance property))) - (and (listp org-use-property-inheritance) - (member-ignore-case property org-use-property-inheritance))) - ;; Caching is not possible, check it directly. - (org-entry-get pom property 'inherit) - ;; Get all properties, so we can do complicated checks easily. - (cdr (assoc-string property - (or org-cached-props - (setq org-cached-props (org-entry-properties pom))) - t)))) + (org-entry-get pom property 'selective)) + +(make-obsolete 'org-cached-entry-get "use `org-entry-get' instead." "9.7") (defun org-global-tags-completion-table (&optional files) "Return the list of all tags in all agenda buffer/files. @@ -11670,7 +11659,7 @@ See also `org-scan-tags'." ("CATEGORY" '(org-get-category (point))) ("TODO" 'todo) - (p `(org-cached-entry-get nil ,p)))) + (p `(org-entry-get (point) ,p 'selective)))) ;; Determine operand (aka. property ;; value). (pv (match-string 8 term)) @@ -11707,7 +11696,7 @@ See also `org-scan-tags'." (setq term rest))) (push `(and ,@tagsmatcher) orlist) (setq tagsmatcher nil)) - (setq tagsmatcher `(progn (setq org-cached-props nil) (or ,@orlist))))) + (setq tagsmatcher `(or ,@orlist)))) ;; Make the TODO matcher. (when (org-string-nw-p todomatch) -- 2.41.0