emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Maxim Nikulin <manikulin@gmail.com>
To: emacs-orgmode@gnu.org
Subject: org-refile failed due to default option stored by org-goto
Date: Thu, 4 Mar 2021 21:47:51 +0700	[thread overview]
Message-ID: <s1qrup$gu5$1@ciao.gmane.io> (raw)
In-Reply-To: <s1lrqr$nc$1@ciao.gmane.io>

On 03/03/2021 00:15, Maxim Nikulin wrote:
> 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 realized that this issue is rather loosely related to 
org-refile-use-cache and I have seen it in a worse variant with disabled 

file init-refile.el:


  '(org-agenda-files (quote ("~/examples/org/test-notes.org")))
     (("t" "Test" entry
       (file "")
       "* %?\n\n%U\n" :empty-lines 1))))
  '(org-default-notes-file "~/examples/org/capture.org")
  '(org-directory "~/examples/org/")
  '(org-modules (quote (org-refile)))
  '(org-outline-path-complete-in-steps nil)
  '(org-refile-targets (quote ((nil :maxlevel . 5) (org-agenda-files 
:maxlevel . 5))))
  '(org-refile-use-outline-path t)

emacs -Q -L ~/src/emacs/org-mode/lisp/ -L 
~/src/emacs/org-mode/contrib/lisp/ -l ~/examples/org/init-refile.el 

- C-u C-c C-j (org-goto) to some heading in the test-notes.org, e.g. 
"Two" / "Third" / "Theme"
- M-x org-capture RET t to capture some note
- Let's assume that target of previously executed org-goto suits for 
this note
- C-c C-w RET to refile the note from capture.org file to the heading in 
test-notes.org offered as the default option.

Actual result:
- "Invalid target location"
- Captured note is still in the capture.org file but it is not apparent 
since capture frame is closed.

Expected result:
- Default option works for refile even if it is remained from org-goto 

Side note. In some cases it not so easy to close capture frame. If 
org-default-note-file is configured to a file in a non-existing 
directory then C-c C-k asks to create that directory but does not 
discards the note.

  parent reply	other threads:[~2021-03-04 14:52 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
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 ` Maxim Nikulin [this message]
2021-03-04 22:53   ` org-refile failed due to default option stored by org-goto Samuel Wales
2021-03-09 11:57     ` Maxim Nikulin

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:

  List information: https://www.orgmode.org/

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

  git send-email \
    --in-reply-to='s1qrup$gu5$1@ciao.gmane.io' \
    --to=manikulin@gmail.com \
    --cc=emacs-orgmode@gnu.org \
    --subject='Re: org-refile failed due to default option stored by org-goto' \


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

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


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