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 7JdsNNH1PmDOcAAA0tVLHw (envelope-from ) for ; Wed, 03 Mar 2021 02:34:57 +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 eIOsL9H1PmB2awAAbx9fmQ (envelope-from ) for ; Wed, 03 Mar 2021 02:34:57 +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 E6FF1F5E9 for ; Wed, 3 Mar 2021 03:34:56 +0100 (CET) Received: from localhost ([::1]:56886 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lHHLi-0004uk-IS for larch@yhetil.org; Tue, 02 Mar 2021 21:34:54 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:33066) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lHHLL-0004uU-MT for emacs-orgmode@gnu.org; Tue, 02 Mar 2021 21:34:31 -0500 Received: from mail-lj1-x231.google.com ([2a00:1450:4864:20::231]:40285) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1lHHLJ-0005Dw-DF for emacs-orgmode@gnu.org; Tue, 02 Mar 2021 21:34:31 -0500 Received: by mail-lj1-x231.google.com with SMTP id e2so19474332ljo.7 for ; Tue, 02 Mar 2021 18:34:26 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=oijFBk0Ijb7mwtkDUHam5OeO9n64nTTP3nBqAgGIX/A=; b=jcWIrikFDdCf5tr+wgy1HkcfPNR8OwxkSmCUF6rLms7O6fMI9SdM431/xZtzSaLFC/ WQmEsOgyDeOJUdHPVPOpDte/gSQ3L9eg/uhFm3tg8EJqMSb2GiyYQ0NJIBWJ73jgbVh2 mWorOxDZSudAVwX2golKXZDNfEu65MkfKwu13KnDzqe15Eh53pzRFfwW0YO1BEQzTisD 3SbsAX4UBwM3NImsX2EecKB3cQW6uWvAFo4qNCfVKZgTy2AdVa0vyGB4vZ3xrQT1L8mr K24Q/awIDrbgI3hAP88KEQgGOUyZf4JJ0o0pr7BA7J4PktcWQAywLw/AnjcOax2G1sF9 tROw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=oijFBk0Ijb7mwtkDUHam5OeO9n64nTTP3nBqAgGIX/A=; b=BgpXfql338RR0si6HFhjEo9LK7plwkTbBzY5WGNE1yJJpL+AKgWQ8/HdZJEqRydyvq tkNYuPASeWnS4AYk3gPGyFUvbr/VedUpMna44zFYUgaZnxpr7u7A50U3oIJszDCtesmW 8857rd+LoRb5WJqpxL9T+JKtkjv1SzyxVtnl5Aa4sg12Mehg6OtFfwXHPjGEsI+H3oCi 9DAOLgrxHv2P0AF9ZZkWgR4ZEzQZLapI40DoyawSxDa0VUjiZGUZ8W5v/qeyVJMf+Lh6 mUzypRukzLAeFoLDsnHV4aAjuk0FW3mJp/YoakhGI5WP1GF7d9riEqYb8ansE7IVgdpp u8CA== X-Gm-Message-State: AOAM533HzU7gGCiuCOxika059Fy8ximLp2170P4e7erp5uoe8a1Jk8UP pHfpw6OGsCigMn3IHCvaBOiMSOJrGbMBjpNEKhw= X-Google-Smtp-Source: ABdhPJy8c7ppH1N9oBW0E1b42n0l5sOvI9roFC5WmppOMOCGXM5FRyUyvWJXSOAi8lrDiEyMZBME1sclFwH4VhGVx6E= X-Received: by 2002:a2e:9c1:: with SMTP id 184mr2328961ljj.481.1614738865495; Tue, 02 Mar 2021 18:34:25 -0800 (PST) MIME-Version: 1.0 Received: by 2002:ab3:7842:0:0:0:0:0 with HTTP; Tue, 2 Mar 2021 18:34:25 -0800 (PST) In-Reply-To: References: From: Samuel Wales Date: Tue, 2 Mar 2021 19:34:25 -0700 Message-ID: Subject: Re: org-refile-use-cache and jumps using org-refile or org-goto To: Maxim Nikulin Content-Type: text/plain; charset="UTF-8" Received-SPF: pass client-ip=2a00:1450:4864:20::231; envelope-from=samologist@gmail.com; helo=mail-lj1-x231.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: , Cc: 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=1614738897; 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=oijFBk0Ijb7mwtkDUHam5OeO9n64nTTP3nBqAgGIX/A=; b=jP7fKPPfGqdW4IvtR4RoopA1i91kSaphUNJFth8PsiwEYJEA8NOKfdHu8vB1uxXN/t+C5M 7irKU+ew/rtLy9mDcqSncT9V15E2KqqghHlWnumrqfdmKGV45pu1NRlpCjun5K3sl8hUNw Jh1vkmbHttEjdXXFRXMHvMDOKoeRuhe+2pAedMAvCgghpOzicM+47uOhrnO0h1BtnTXEOI 6/avl8fEwIoNHpC6k60CD5ix4EktL+IzIWt5qyBIscJE7NEE3+6PoFpyHxGfRPw0I7Ns61 UlDR3/2eEVyXndjlqzhw/0p2W/4U0g2Y1iOWKiu4oF4ky+U3fneUHsCfGOcm+w== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1614738897; a=rsa-sha256; cv=none; b=RkXfgFJ1GgPJUeRoLtQMKWRnW4MuXL+ZVF9sKCClSh581O20OopsOBAiyvJpdbwWplb0lz rCAaNtcpiqYxEvQqmWh87kLmzhc5MBxKiSYq9XCn248hMeSXIiVb9eD5010lHJKtjflymQ qm4LJENnHDpKHFPSPxKIQkcserZ2zRITElK1XmFotEU+aiQ6Y/qdoOudwslZDeyJ8frTE7 paqoFB0smiOjfY4RXIl/9WOoRfue6QS3n05jYUBg4a1ezhc7MZFGF2f/U9J/WugB6HLwa5 sW/RWSWER78vKIFy2Qye1ACgWzcrQsahqciYlHXZKU3BKOW8RwA4KrM6/CWbeQ== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=pass header.d=gmail.com header.s=20161025 header.b=jcWIrikF; 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.06 Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=gmail.com header.s=20161025 header.b=jcWIrikF; 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: E6FF1F5E9 X-Spam-Score: -3.06 X-Migadu-Scanner: scn0.migadu.com X-TUID: Jvxy/Jiavn5f idk if thi will help buit a fwe not3es. just in case they are relevant to your case. fwiw i have not heard of interactions between org-goto and the refile mechanism and the cache. i hafve not heard that the latter used a cache but i do not use it. refile with and withoyut the goto prefix should normatively be congruent and both use cache. i used to use the refile cache, then discovered that ido-hacks sped ido so much that i didn't need it. it would cache one fileset and then be potentially not usable for another. sort of like one cache and multiple callers. idk if htat got fixed. probably not used much. until recently in maint, ido and ido hacks with both refile and refile goto [note: org-refile with a goto arg, not org-goto] has worked perfectly. with no cache. now, there is an issue, where with no cache that i know of, the first use, or the first use in a long time, will actually present a huge file list that includes crazy elements and is not constrained by even the verify function. thus if i type faster than it goes, the wrong item gets selected. even if i use the same selectors as normal. so there's some bug or race condition. it is slow at those times. this might not be relevant to your case but seems worth mentioning. i think i have not filed a bug report as i don't know how to repro it at this time. On 3/2/21, Maxim Nikulin wrote: > It seems, something goes a bit wrong. However it is rather confusion > than anything really broken. > > Maybe everybody uses helm, ivy, etc., so nobody is affected. > > Usually I jump from one note to another heading with C-u C-c C-j > (org-goto interface with target completion). I have not setup helm or > other similar package. Completion works, maybe it is not really perfect > (e.g. completion of top-level headings and deeper ones differ a bit). I > have heard that C-u C-c C-w (org-refile) could work in a similar way. I > did not like the latter variant due to mandatory file name in the > beginning of a target. > > I have tried to enable org-refile-use-cache. Now completion options > depends on what method was called earlier: org-refile or org-goto. If > after cache clean up (C-u C-u C-u C-c C-w) first command was C-u C-c C-j > (org-goto) than there is no file name as a prefix for both commands. > However file name is prepended for both C-u C-c C-j and C-u C-c C-w if > at first org-refile was called. > > There is one issue however. Default option option does not work if after > cache clean other command is called, e.g. > - jump using C-u C-c C-j > - clean cache C-u C-u C-u C-c C-w > - try to jump or to refile [C-u] C-c C-w to default offered option > - "user-error: Invalid target location" > > I have just one file in the org-agenda-files list. It is becoming > larger, that is why I decided to try org-refile-use-cache. My > customization is minimal (besides org-default-dir and org-agenda-files): > > (org-refile-targets (quote ((org-agenda-files :maxlevel . 5)))) > (org-outline-path-complete-in-steps nil) > > I have tried to add (nil :maxlevel . 5) to org-refile-targets to check > if options without file name will appear in addition to ones with file > name for org-refile, but it has not happened. It was not clear at first > that it is possible to start query with "/" and file name is added when > TAB is pressed. > > Is it expected that with cache enabled, command that causes cache update > affects appearance of completion options to its sibling (org-refile and > org-goto)? > > > -- The Kafka Pandemic Please learn what misopathy is. https://thekafkapandemic.blogspot.com/2013/10/why-some-diseases-are-wronged.html