Org-mode mailing list
 help / color / mirror / Atom feed
From: Samuel Wales <samologist@gmail.com>
To: Maxim Nikulin <manikulin@gmail.com>
Cc: emacs-orgmode@gnu.org
Subject: Re: [PATCH] Bug: fragile org refile cache
Date: Wed, 28 Apr 2021 17:50:19 -0700
Message-ID: <CAJcAo8vWAA+41Cf5PAwqd9Xj28eOjtJ7c4-GEQahzTy2Ln=sGQ@mail.gmail.com> (raw)
In-Reply-To: <s6c1cm$174s$1@ciao.gmane.io>

long ago i used to use the refile cache.  i think it is probably not
widely used, or maybe even not at all.

the reason i stopped was behavior that sounds similar to your
description.  such as, it would produce a set of results that did not
match the calling conditions.  i cannot reach the thread you point to,
however.

what i did was use ido-hacks to speed up ido and restrict to :goto:
and :refile: tagged entries for common targets.  this worked for me;
it is fast despite my huge set of olpaths.  it would be great if the
cache were unnecessary.

that might nt work for you, but perhaps this provides confirmation or
ideas for you.


On 4/28/21, Maxim Nikulin <manikulin@gmail.com> wrote:
> Reviewing my attempt to speedup collecting of refile targets
> https://orgmode.org/list/s209r8$16en$1@ciao.gmane.io/
> I have realized that refile cache is unreliable.
>
> With specific customization, cache content and thus refile targets
> depend on the function called first: `org-refile' ([C-u] C-c C-w) or
> `org-goto' (C-u C-c C-w).
>
> I decided to try to provide minimal example and steps to reproduce in
> the form of a test marked as expected failure.
>
> Certainly cache should be enabled
>      (org-refile-use-cache t)
> `org-refile-targets' should have (nil . (:maxlevel . 5)) for the
> affected buffer. The value of the following setting is intentionally set
> to alternative value in comparison to `org-goto' code
>      (org-refile-use-outline-path nil)
> To see the issue interactively, you likely should set
>      (org-outline-path-complete-in-steps nil)
>
> Clean cache (C-u C-u C-u C-c C-w) and try jumping using C-u C-c C-w and
> C-u C-c C-j in various order. Use TAB completion to see targets.
>
> To make difference more apparent, define
> `org-refile-target-verify-function' to filter-out some headings.
>
> My expectation that each command has list of targets formatted
> accordingly to user setting or `org-goto' internal overrides. Actually
> lists of target are the same since they share cache entry.
>
> I suppose, cache keys should include values of all parameters affecting
> filtering and formatting, not only regexp for heading selection.
>
> However I have no idea how to derive some value suitable for cache key
> from `org-refile-target-verify-function'.
>


-- 
The Kafka Pandemic

Please learn what misopathy is.
https://thekafkapandemic.blogspot.com/2013/10/why-some-diseases-are-wronged.html


  reply	other threads:[~2021-04-29  0:51 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-04-28 16:09 Maxim Nikulin
2021-04-29  0:50 ` Samuel Wales [this message]
2021-04-29  1:29   ` Ihor Radchenko
2021-04-29  1:34     ` Samuel Wales
2021-04-29 12:45       ` Maxim Nikulin
2021-04-29 14:12         ` Ihor Radchenko
2021-04-29 15:04           ` Maxim Nikulin
2021-04-29 16:08             ` Ihor Radchenko
2021-04-29 16:51               ` Maxim Nikulin
2021-04-30 16:56               ` Maxim Nikulin
2021-05-01 14:48               ` Maxim Nikulin
2021-05-02  6:59                 ` Ihor Radchenko
2021-05-04 16:55                   ` Maxim Nikulin
2021-05-05  0:53                     ` Ihor Radchenko
2021-04-29 13:30       ` Ihor Radchenko
2021-04-29 19:17         ` Tim Cross
2021-04-29 22:43           ` Samuel Wales
2021-05-02  7:03           ` Ihor Radchenko

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://orgmode.org

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='CAJcAo8vWAA+41Cf5PAwqd9Xj28eOjtJ7c4-GEQahzTy2Ln=sGQ@mail.gmail.com' \
    --to=samologist@gmail.com \
    --cc=emacs-orgmode@gnu.org \
    --cc=manikulin@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link

Org-mode mailing list

This inbox may be cloned and mirrored by anyone:

	git clone --mirror https://orgmode.org/list/0 list/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 list list/ https://orgmode.org/list \
		emacs-orgmode@gnu.org
	public-inbox-index list

Example config snippet for mirrors.
Newsgroups are available over NNTP:
	nntp://news.yhetil.org/yhetil.emacs.orgmode
	nntp://news.gmane.io/gmane.emacs.orgmode


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git