From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp1 ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms11 with LMTPS id KGQ3N/e6U1/eNQAA0tVLHw (envelope-from ) for ; Sat, 05 Sep 2020 16:21:11 +0000 Received: from aspmx1.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp1 with LMTPS id GGoJM/e6U1+IdQAAbx9fmQ (envelope-from ) for ; Sat, 05 Sep 2020 16:21: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 6A2A89400D3 for ; Sat, 5 Sep 2020 16:21:11 +0000 (UTC) Received: from localhost ([::1]:43344 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kEawA-0003Ce-DH for larch@yhetil.org; Sat, 05 Sep 2020 12:21:10 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:51790) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kEave-0003CW-5a for emacs-orgmode@gnu.org; Sat, 05 Sep 2020 12:20:38 -0400 Received: from coral.adamspiers.org ([85.119.82.20]:34736) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kEavc-0001ix-K5; Sat, 05 Sep 2020 12:20:37 -0400 Received: from localhost (243.103.2.81.in-addr.arpa [81.2.103.243]) by coral.adamspiers.org (Postfix) with ESMTPSA id 885A02E777; Sat, 5 Sep 2020 17:20:35 +0100 (BST) Date: Sat, 5 Sep 2020 17:20:35 +0100 From: Adam Spiers To: Bastien Subject: Re: make org-refile auto-recache when needed? Message-ID: <20200905162035.r5bksasq2yzbec7z@gmail.com> X-OS: GNU/Linux References: <20200715121721.v7f7shcjibfz53bm@gmail.com> <878sdpmy13.fsf@bzg.fr> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii; format=flowed Content-Disposition: inline In-Reply-To: <878sdpmy13.fsf@bzg.fr> Received-SPF: pass client-ip=85.119.82.20; envelope-from=orgmode@adamspiers.org; helo=coral.adamspiers.org X-detected-operating-system: by eggs.gnu.org: First seen = 2020/09/05 12:18:04 X-ACL-Warn: Detected OS = Linux 2.2.x-3.x [generic] X-Spam_score_int: -18 X-Spam_score: -1.9 X-Spam_bar: - X-Spam_report: (-1.9 / 5.0 requ) BAYES_00=-1.9, 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: org-mode mailing list Errors-To: emacs-orgmode-bounces+larch=yhetil.org@gnu.org Sender: "Emacs-orgmode" X-Scanner: scn0 Authentication-Results: aspmx1.migadu.com; dkim=none; dmarc=fail reason="SPF not aligned (relaxed), No valid DKIM" header.from=adamspiers.org (policy=none); 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-Spam-Score: 0.09 X-TUID: BS2H10ZehTjk Hi Bastien, On Fri, Sep 04, 2020 at 04:12:08PM +0200, Bastien wrote: >Adam Spiers writes: >> I note that when org-refile-use-cache is enabled and the cache becomes >> stale, attempting to refile results in this error message (originating >> from `org-refile-check-position'): >> >> Invalid refile position, please clear the cache with `C-0 C-c C-w' before refiling >> >> Is there any reason why it couldn't just automatically rebuild the >> cache when needed? > >If we can rebuild the cache for refile target in a reliable way, sure, >we should do this. I had a quick look and this isn't straightforward, >so help is welcome. I note the idea for after 9.4. Thanks for the reply! I don't see why we need to be able to rebuild it reliably. Can't we just try, then if it succeeds, refile as normal, and if it fails, then output an error saying that the cache rebuild failed and making a helpful suggestion of what to try next? Maybe I'm missing something.