From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp0 ([2001:41d0:2:4a6f::]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) by ms0.migadu.com with LMTPS id sDgoHDMLimBM9wAAgWs5BA (envelope-from ) for ; Thu, 29 Apr 2021 03:26:11 +0200 Received: from aspmx1.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp0 with LMTPS id oJnWFzMLimCtQgAA1q6Kng (envelope-from ) for ; Thu, 29 Apr 2021 01:26:11 +0000 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 8C3E3137FE for ; Thu, 29 Apr 2021 03:26:10 +0200 (CEST) Received: from localhost ([::1]:47412 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lbvRQ-0007IB-1A for larch@yhetil.org; Wed, 28 Apr 2021 21:26:08 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:59774) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lbvQP-0007GO-Tr for emacs-orgmode@gnu.org; Wed, 28 Apr 2021 21:25:06 -0400 Received: from mail-ej1-x635.google.com ([2a00:1450:4864:20::635]:47058) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1lbvQI-0001oB-1V for emacs-orgmode@gnu.org; Wed, 28 Apr 2021 21:25:05 -0400 Received: by mail-ej1-x635.google.com with SMTP id u21so97409082ejo.13 for ; Wed, 28 Apr 2021 18:24:57 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:subject:in-reply-to:references:cc:date:message-id :mime-version; bh=1A8pazQq9LDoZwFg2pE7dzhx/jj6S1vVqLDO8mKY5cI=; b=Qg0xYvTNRB/5sS3San36VJqdjozoovwmf/r+2u9x14WVByA+9pcUekhRm1vkAq5C6v Eg7FBl23jMJFQ2qOu+CFUuamxHL3UQ5wSx1HZ4svFvogPrRoHfY4N2iill6RhVo0wxdA zJYhAinZbQ0KRWYZqfuOa/R6vbohd1PdZe+Fq8HcZcsVXqzi7pC1oCs3rrYDUhXbuu5n 0gBqAEsddAygiwQNC0j+sTC9mAIJAj1+4sMLlgPfjpzdDtSNaObioVpApq3SPUNPykME 1vV8htBfIEUL4ryKLNUueDi1dFmxrNu22FLxU2kIa22jdxEdjInCS0RWkgI5ai+x60yV KINA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:subject:in-reply-to:references:cc:date :message-id:mime-version; bh=1A8pazQq9LDoZwFg2pE7dzhx/jj6S1vVqLDO8mKY5cI=; b=ByX3bLPOYvBIAB3Xl1Fxds4ZksdZODhZgdMvwKcDA3sMRKfJGFQ6/7V8teNaTW2uG7 hwPv5xtBp58/XpXCqWy99u/t5Wv5ksDTyDas8ZiXeVNR57niWHrm/piTeZvn1LbCDkVK 31nGYoXi0D6ihNHSEz4OmSkEHCk62qqHCMoSFYdLN8vEku2yIFJOWF5KXdhPG5tL4BBG zro6Q77M7m1kxFEkVXmFiHtcjlmEzkF4OqP2k+CCPkuJP4pjNvHDrE5L5bW9Zwj0UuDR 0TNTMVl4X4mz7iKwR6rvW7k7VFmOLelSsh9IWFZ0cGV+1z9WIPqCB1oFefJbmTuTmsMy MX8w== X-Gm-Message-State: AOAM530HPr00fr7qFgXfVvL7K4bY9x5BPylCNqBALyslr00gRSaMXT4j mROZcMGJpES5cfIcvakE/tg= X-Google-Smtp-Source: ABdhPJw3JV+DEeIY15383FpddbGCSb/w0JHiJjTMJygZUmKsx6KM+X63h5CivZ5DR1yDNDngOMz60w== X-Received: by 2002:a17:906:1c83:: with SMTP id g3mr32549525ejh.93.1619659496279; Wed, 28 Apr 2021 18:24:56 -0700 (PDT) Received: from localhost ([158.255.2.9]) by smtp.gmail.com with ESMTPSA id x20sm1117491edd.58.2021.04.28.18.24.55 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 28 Apr 2021 18:24:55 -0700 (PDT) From: Ihor Radchenko To: Samuel Wales Subject: Re: [PATCH] Bug: fragile org refile cache In-Reply-To: References: Date: Thu, 29 Apr 2021 09:29:20 +0800 Message-ID: <87v98598un.fsf@localhost> MIME-Version: 1.0 Content-Type: text/plain Received-SPF: pass client-ip=2a00:1450:4864:20::635; envelope-from=yantar92@gmail.com; helo=mail-ej1-x635.google.com X-Spam_score_int: -17 X-Spam_score: -1.8 X-Spam_bar: - X-Spam_report: (-1.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, FREEMAIL_ENVFROM_END_DIGIT=0.25, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=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.23 Precedence: list List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Maxim Nikulin , emacs-orgmode@gnu.org Errors-To: emacs-orgmode-bounces+larch=yhetil.org@gnu.org Sender: "Emacs-orgmode" X-Migadu-Flow: FLOW_IN ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1619659571; 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:in-reply-to:in-reply-to: references:references:list-id:list-help:list-unsubscribe: list-subscribe:list-post:dkim-signature; bh=1A8pazQq9LDoZwFg2pE7dzhx/jj6S1vVqLDO8mKY5cI=; b=CuK2fLj7pwMFf7WAO1885sETPBS1hpxx5y6yr6HUgNbVcERwPzLI8fIGCgZVj2XAqIKsIm QKbXC1VpU2JAkw7FpMTWnh/f4DrSSXFSslJV5WqCkRWy6VE3eBC2IeZL0UlD+lolMtsZhg 4kUfONDXXl99BhGlvEUWBDIM5+bTIfX+I5kbdJdLMlZjAje+ieYj6VBJseU0KCRhfMuHLP RkZnUvau5/aaGYY3xS8pGCU89+/0i8rFoBcJY5BKy4KVQlJ7nmaI984yjYy7WF5tQ4kkFu afHupknHy03fvUH8CdLoVnKVZvfW5tiOD8R11sdnXyi2ALw/YJJ0tXGvtezzpQ== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1619659571; a=rsa-sha256; cv=none; b=mm5Z+skE6SjsEkMRLdMGfJWwkt6J3n3zRj6cwZW0MbjaArhBoYkSJBYAItE9iPh3sXa08b Suy92Rs8QRMS3tC+U+UE9yK6DbcU39zz4pOKmPkqQ8tVBU3OfUVoEfnn5Yr00w0VM6YQcG YQMl6Lb1IjmbFwyppaVxAYSYgku3ahldY3xUQxOQalPsJOIF9860+AytrW09GL4DLyZYrN uY6c518bOt0sNx3jiI5/JwA6UbkQM/DBRlWamwT+nR1FGcIkH4SmGIGF/20gc1rHWTuOqA 5dY9QbGnLMxOGOxsgjBuFEGwjvSzp1MjquwiL86J2d+dPFvvYjR0pnAa2K4yxQ== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=pass header.d=gmail.com header.s=20161025 header.b=Qg0xYvTN; dmarc=pass (policy=none) header.from=gmail.com; spf=pass (aspmx1.migadu.com: domain of emacs-orgmode-bounces@gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=emacs-orgmode-bounces@gnu.org X-Migadu-Spam-Score: -2.65 Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=gmail.com header.s=20161025 header.b=Qg0xYvTN; dmarc=pass (policy=none) header.from=gmail.com; spf=pass (aspmx1.migadu.com: domain of emacs-orgmode-bounces@gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=emacs-orgmode-bounces@gnu.org X-Migadu-Queue-Id: 8C3E3137FE X-Spam-Score: -2.65 X-Migadu-Scanner: scn0.migadu.com X-TUID: O1I9AyVDyk9x Samuel Wales writes: > long ago i used to use the refile cache. i think it is probably not > widely used, or maybe even not at all. At least, I do use it. A lot. I rely on it. I do not observe the breakage as described in the first message, mostly because I use refile cache exclusively for org-refile. Yet, I often see "Please regenerate the refile cache with C-0 C-c C-w" when I do a lot of batch refiling. A faster, more reliable, caching would be certainly welcome. In general, various parts of Org mode code base implement different types of caches in parallel. I am aware at least about org-element, org-scan-tags, org-agenda, org-refile, and org-goto. Probably Org mode could benefit from unified caching mechanism? A good implementation coming to my mind is org-ql [1]. It implements tag caches, outline path caches, and can even be used to cache results of an arbitrary function with point at heading. Basically, all (except org-element) types of caches Org mode uses now are already implemented in org-ql in unified way. WDYT? [1] https://github.com/alphapapa/org-ql Best, Ihor