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)?