From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp1 ([2001:41d0:8:6d80::]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) by ms0.migadu.com with LMTPS id iJUSKjMKi2CAagAAgWs5BA (envelope-from ) for ; Thu, 29 Apr 2021 21:34:11 +0200 Received: from aspmx1.migadu.com ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp1 with LMTPS id QGngJTMKi2BWQwAAbx9fmQ (envelope-from ) for ; Thu, 29 Apr 2021 19:34: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 2C5DC1208C for ; Thu, 29 Apr 2021 21:34:11 +0200 (CEST) Received: from localhost ([::1]:34060 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lcCQL-0000VM-SG for larch@yhetil.org; Thu, 29 Apr 2021 15:34:09 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:37436) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lcCQ0-0000VE-Dk for emacs-orgmode@gnu.org; Thu, 29 Apr 2021 15:33:48 -0400 Received: from mail-pj1-x102b.google.com ([2607:f8b0:4864:20::102b]:52849) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1lcCPy-0003D7-KG for emacs-orgmode@gnu.org; Thu, 29 Apr 2021 15:33:48 -0400 Received: by mail-pj1-x102b.google.com with SMTP id lr7so17030682pjb.2 for ; Thu, 29 Apr 2021 12:33:43 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=references:user-agent:from:to:subject:date:in-reply-to:message-id :mime-version; bh=r7Q1oaulqcPH1+UePa6sB+eoQyRm7EfnxfY9r0a/JjA=; b=SGPiQ389LAcujNUzeFf8+x0/LNqVxFA0AOt43kg1Wl87Q7re5B2YUHz4WfXKJJvhov EXG/LoNu6m4nMVklWAEEqaC81NA6Fgpg0e8q5489TIYKLRwPAUSfzeotH7+AFHp4UEh8 RzQbTu7WQVOtbZx1bXbkmA1xmXbA8oExEsIt7bk7hyT20SVLMl2zXguvzL4oh70i8y/F VWf/OgMr7ABC76raOHqcN2TpW0At5bORicT30488c3IePzKPMLuJ2ETv1ShAeTIqz25G ra0tLhY0SZzRRT1K39cuKrAUUUxjh1TfXS8i82vM5u9Z6D5bE4i2gumu3XinJpEOkDPH 68gA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:references:user-agent:from:to:subject:date :in-reply-to:message-id:mime-version; bh=r7Q1oaulqcPH1+UePa6sB+eoQyRm7EfnxfY9r0a/JjA=; b=GhTzQqN0mOrfDLwWdQT/M7oySISyTtG43yMsJAxaI8TMRqF6e8VIKOdt2+NskHvmnL 1BmRDnaCviXsNulga8oEHJXVnrmtHPnWC4XNt+iL3WOzQopNrIa3iC22Fx4MjcNT35OQ anhg3wOUL7P0BSwy8bZ8FEQfyobZW7GPFBQSEROWwtL9DCoHt3AkzyS/5yFUxwkY66qL hR6yPWDCHzzdETGh7fYY1EXFstM1sPB+r5QfbCET0pUACPvkDTJH61iN4vUsE9I4JfBe v0Y6/mCM8Kr81AF8gie1JeUmMQ6Cs9pJAgSxQU2x6E5XP0aTMqOsbCl+Zljv7Pm+wPzI 6TEQ== X-Gm-Message-State: AOAM530qzJf6h0WXy97TAOAo5+NobwZ973obuLRXahuW2LeAGBvFsiaM 0uolxmQyJK9POf7GYWnBiKwwkCACa3Q= X-Google-Smtp-Source: ABdhPJzm1NbASiSIbSbY1CnPLUz+OOvvFaUUpwGH3X/c3HIS9mD3gI7TdR5C+MTKWSgOVNV54S+DRA== X-Received: by 2002:a17:902:cec1:b029:eb:66ee:6da0 with SMTP id d1-20020a170902cec1b02900eb66ee6da0mr1295548plg.84.1619724822140; Thu, 29 Apr 2021 12:33:42 -0700 (PDT) Received: from tim-desktop (203-206-8-119.dyn.iinet.net.au. [203.206.8.119]) by smtp.gmail.com with ESMTPSA id 144sm3486954pfc.101.2021.04.29.12.33.40 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 29 Apr 2021 12:33:41 -0700 (PDT) References: <87v98598un.fsf@localhost> <87mtthxloy.fsf@localhost> User-agent: mu4e 1.5.12; emacs 28.0.50 From: Tim Cross To: emacs-orgmode@gnu.org Subject: Re: [PATCH] Bug: fragile org refile cache Date: Fri, 30 Apr 2021 05:17:18 +1000 In-reply-to: <87mtthxloy.fsf@localhost> Message-ID: <87sg38j371.fsf@gmail.com> MIME-Version: 1.0 Content-Type: text/plain Received-SPF: pass client-ip=2607:f8b0:4864:20::102b; envelope-from=theophilusx@gmail.com; helo=mail-pj1-x102b.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 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: , 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=1619724851; 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:in-reply-to:in-reply-to: references:references:list-id:list-help:list-unsubscribe: list-subscribe:list-post:dkim-signature; bh=r7Q1oaulqcPH1+UePa6sB+eoQyRm7EfnxfY9r0a/JjA=; b=PHeW1C/KUlDqu2FDoUazmVkge+RQ0oC0YNNl6BnDicwvZJj3A60GDF5SZze/PwuxxeUbxi GFK04KrO/733S7tHwsHUbSAc8xQW/ZKAGxMsBUgYNAWDyoKJw+jIhjh8NWmIjppVMFE5SO uEbXscEnldXMdBB8nl4XqA9FrR80D5H5QEzPGdJ/tQIVxYxTVxKvVyNxhEylf+5L9MCYcF biQWy9rOuw7ew11lkaHMKSBhHbya0TgNUSw6gshgOoizfm5+gVdHUzvpwUToFSbv6ggHuu X1EpFbx1izpiQsQqBoAv2tW5Yr523pT7aydAjuyDp7OFZnHTCw1bbZYZxYk6mg== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1619724851; a=rsa-sha256; cv=none; b=WqdIKZY/3+m0lxxqKR+AyQsl2x8e2HN1VhQKoza2Yf6o5GUdm8+H4lV8Tx53CVg87XYkz7 5+wEM2bQdo++IMkVWlhuMslY8xlKVYycOIa6pJnoUssoFt1yFk/kPlnzDvgNr8Lggy9gP1 BciDYnkhgVM8rsGdg/t/e/fN0MZyG1zf6+QDzxhYHln57cD7yu+1tGBDF8FKDfcBzTUVLC +iGalOTJVIEuvoVrWdv9M1qOmQw3nTVrvjD672LFJBqtOwDNmxSZsIqWOvWIohbzaZ11Ng FCWHajyqHYkz2a2ATWT2yh6nDvysEDAjvwm3LjihEd6avMKptc3svZWweUtA+g== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=pass header.d=gmail.com header.s=20161025 header.b=SGPiQ389; 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: -3.16 Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=gmail.com header.s=20161025 header.b=SGPiQ389; 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: 2C5DC1208C X-Spam-Score: -3.16 X-Migadu-Scanner: scn0.migadu.com X-TUID: 8nm8cNb9yWAC Ihor Radchenko writes: > Samuel Wales writes: > >> would it be more useful if it automaticaly generated the cache instead >> of telling you to runt he command to do so? > > I think so. To be frank, I do not understand the reason why it is not > done by default. > >> if a solid, perhaps unified, cache existed, would org-id use it too? > > Sure. Why not? I imagine such cache can store the following info: > > org files in system -> per-file cache -> per-heading cache -> ... > I suspect the reason it is not done automatically is that getting that right for all use cases is very hard to do without adding adverse impact to performance. A cache which is marked as 'dirty' too often results in too frequent cache refresh operations, but at the same time, determining what changes in an org file actually invalidate the cache can be a process intensive operation. Allowing the user to force cache refresh when needed is likely a reasonable compromise. I recall having a lot of trouble getting org-refile to work well for me. I use it a lot, but it was so long ago, I don't recall how I got to my final configuration (I think I may have modified my workflow to work better with what I was able to get working reasonably reliably and efficiently). I now tend to refile to a fairly static set of paths, so all works OK. Sorry I cannot provide anything more substantial. I do understand your frustration, but not sure what the right fix is. I can see having a cache which is automatically refreshed when necessary will be problematic to get working for all use cases. Having the ability to turn automatic refresh on/off and having the ability to manually force a refresh will likely always be required. -- Tim Cross