From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp2 ([2001:41d0:2:bcc0::]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) by ms0.migadu.com with LMTPS id WSEhD8iqimAf1gAAgWs5BA (envelope-from ) for ; Thu, 29 Apr 2021 14:47:04 +0200 Received: from aspmx1.migadu.com ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp2 with LMTPS id MJ7SCciqimBYHwAAB5/wlQ (envelope-from ) for ; Thu, 29 Apr 2021 12:47:04 +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 34BF81F7A8 for ; Thu, 29 Apr 2021 14:47:03 +0200 (CEST) Received: from localhost ([::1]:46894 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lc64M-0004iC-C2 for larch@yhetil.org; Thu, 29 Apr 2021 08:47:02 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:49192) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lc63M-0004gN-P3 for emacs-orgmode@gnu.org; Thu, 29 Apr 2021 08:46:01 -0400 Received: from ciao.gmane.io ([116.202.254.214]:39072) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lc63L-00046Y-7s for emacs-orgmode@gnu.org; Thu, 29 Apr 2021 08:46:00 -0400 Received: from list by ciao.gmane.io with local (Exim 4.92) (envelope-from ) id 1lc63H-0001M5-DT for emacs-orgmode@gnu.org; Thu, 29 Apr 2021 14:45:55 +0200 X-Injected-Via-Gmane: http://gmane.org/ To: emacs-orgmode@gnu.org From: Maxim Nikulin Subject: Re: [PATCH] Bug: fragile org refile cache Date: Thu, 29 Apr 2021 19:45:50 +0700 Message-ID: References: <87v98598un.fsf@localhost> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.7.1 In-Reply-To: Content-Language: en-US Received-SPF: pass client-ip=116.202.254.214; envelope-from=geo-emacs-orgmode@m.gmane-mx.org; helo=ciao.gmane.io X-Spam_score_int: 28 X-Spam_score: 2.8 X-Spam_bar: ++ X-Spam_report: (2.8 / 5.0 requ) BAYES_00=-1.9, DKIM_ADSP_CUSTOM_MED=0.001, FORGED_GMAIL_RCVD=1, FORGED_MUA_MOZILLA=2.309, FREEMAIL_FORGED_FROMDOMAIN=0.249, FREEMAIL_FROM=0.001, HEADER_FROM_DIFFERENT_DOMAINS=0.25, NICE_REPLY_A=-0.001, NML_ADSP_CUSTOM_MED=0.9, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=no 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=1619700423; 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: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:list-id:list-help: list-unsubscribe:list-subscribe:list-post; bh=6ZCHoHrOzquEqIfDLIbxtkTUyLeuB//5GvOZMHTz400=; b=laf6FRaTC7oP9Rb+IjaKRfbs4Xxl8do+bVJAZMJrx+rdXMtWMjc0Qx9+ssGQTQiBHD/lh0 J55kTp/OGQZddOxPhJfojMHhkeYa4paHF5TKw7jq9rwYEa7Y3l6r/XmNvCJUr11bBkh/uP NW4UrT7ILKc3mr9buomMq8c52vwzyC9OB1uQc2Yz49cAFIY6Pd/nSRmlQL8FONuhKpnI0C HAOdQrE4H1QwDAo5uQyn05ISGuh8U95Mi92O0oA6ydOwalRi8UQglSgO4dL2k00G2IeLFI n2xMZfsw7gD78M5Ccu44HmKyx7QU0Owzcm6DD81D3UffrINEYnIJwNAlMwk69A== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1619700423; a=rsa-sha256; cv=none; b=e0RpDEhq7zxS0A6ZmyXLNa+0C+yzJ6KIJj27DVh9TOQKPqXItfvqeaIEhaVJFzW8iWC6l5 1c2xqJla12su8pnGH8vj5Qoi6pP5FFbmJ8S6V20d+iEcCuMYfR3yKI77T5FUsux2x9Rq7f vrYm99gy/xjy3rwYZTjrglcWqUI2or+LeErerL1YNHPp4cgd6cXfUiYHy6zjaSA6A4LDPx 12er1gYzDCw4xgHoHCBgXHpQr7ZKhSzQgu1mZcOdJno3HJM7HNSyqujOE+m1WSIaUyWZ/y ofhMuVrVGLeRqpJN3OLF3ajj9hZgWSwtovxL2/Wivy8VmzevOD5zki52RMmwxQ== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=none; dmarc=fail reason="SPF not aligned (relaxed), No valid DKIM" header.from=gmail.com (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-Migadu-Spam-Score: -1.86 Authentication-Results: aspmx1.migadu.com; dkim=none; dmarc=fail reason="SPF not aligned (relaxed), No valid DKIM" header.from=gmail.com (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-Migadu-Queue-Id: 34BF81F7A8 X-Spam-Score: -1.86 X-Migadu-Scanner: scn0.migadu.com X-TUID: yEn905RRaLIx On 29/04/2021 08:29, Ihor Radchenko wrote: > I do not observe the breakage as described in the first message, > mostly because I use refile cache exclusively for org-refile. Maybe I could avoid org-goto as well. Actual reason to use it was that it does not ask for file name as the first step in the case of (org-refile-use-outline-path 'file). It took enough time to me to realize how to jump/refile to non-leaf heading without such settings. > A faster, more reliable, caching would > be certainly welcome. Just an idea. Is it possible to implement some specific text property for heading lines, namely cleaned out heading text (no cookies, tags, hidden parts of links), that is updated after each editing (likely something like font locks)? It could significantly speed up scanning buffer for goto/refile targets. Unfortunately it would not help for files that have not opened yet. > I am aware at least about org-element, > org-scan-tags, org-agenda, org-refile, and org-goto. To be clear, org-refile and org-goto share the same cache and it is the source of the problem. > A good > implementation coming to my mind is org-ql [1]. I have not looked into the code yet, so I am not ready to discuss it. At least Adam should agree to submit patches to org and Bastien and Nicolas should agree to support it. On 29/04/2021 08:34, Samuel Wales wrote: > > would it be more useful if it automaticaly generated the cache instead > of telling you to runt he command to do so? I am surprised as well that cache is not just regenerated when org-refile detects that it is stale. Can it be that under certain circumstances it just causes delay and, even with updated cache, user action fails anyway? On 29/04/2021 07:50, Samuel Wales wrote: > i cannot reach the thread you point to, however. Actually namely your response inspired me to look closer at the implementation of collection of refile targets. Is there a particular form of Message-Id that is convenient for you? The date of initial message is 2021-03-02 (in UTC).