emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* org-refile-use-cache and jumps using org-refile or org-goto
@ 2021-03-02 17:15 Maxim Nikulin
  2021-03-03  2:34 ` Samuel Wales
  2021-03-04 14:47 ` org-refile failed due to default option stored by org-goto Maxim Nikulin
  0 siblings, 2 replies; 10+ messages in thread
From: Maxim Nikulin @ 2021-03-02 17:15 UTC (permalink / raw)
  To: emacs-orgmode

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



^ permalink raw reply	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2021-04-25 15:24 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2021-03-02 17:15 org-refile-use-cache and jumps using org-refile or org-goto Maxim Nikulin
2021-03-03  2:34 ` Samuel Wales
2021-03-04 13:51   ` Maxim Nikulin
2021-03-04 21:03     ` Samuel Wales
2021-03-06 16:15       ` [PATCH] optimize org-refile-get-targets Maxim Nikulin
2021-04-25 12:25         ` Bastien
2021-04-25 15:24           ` Maxim Nikulin
2021-03-04 14:47 ` org-refile failed due to default option stored by org-goto Maxim Nikulin
2021-03-04 22:53   ` Samuel Wales
2021-03-09 11:57     ` Maxim Nikulin

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).