From: Maxim Nikulin <firstname.lastname@example.org> To: email@example.com Subject: Re: org-refile failed due to default option stored by org-goto Date: Tue, 9 Mar 2021 18:57:09 +0700 [thread overview] Message-ID: <firstname.lastname@example.org> (raw) In-Reply-To: <CAJcAo8s6WkW-QhQRAkPB7bgx5bz_7KBKtnG7zqwmTbOHUWKXVw@mail.gmail.com> On 05/03/2021 05:53, Samuel Wales wrote: > diff --git a/lisp/org-refile.el b/lisp/org-refile.el > index 1e6872b46..8f98e9cf9 100644 > --- a/lisp/org-refile.el > +++ b/lisp/org-refile.el > @@ -617,7 +617,9 @@ this function appends the default value from > (tbl (mapcar > (lambda (x) > (if (and (not (member org-refile-use-outline-path > - '(file full-file-path))) > + ;; === alpha remove the parens > from ido completion of olpaths > + '(nil full-file-path))) > + ;; '(file full-file-path))) > (not (equal filename (nth 1 x)))) > (cons (concat (car x) extra " (" > (file-name-nondirectory (nth 1 x)) ")") The patch changes appearance of "(file.org)" at the end of each completion option. I do not know value of your org-refile-use-outline-path setting so I am unsure if your are trying to avoid it or vice versa to force it. I do not think that the patch is relevant to sharing of default option between org-goto and org-refile. I think, buffer (or file) name should be stored separately from outline path within the buffer in org-refile history and merged accordingly to current settings just before completing-read. org-refile-cache likely requires a similar approach. Personally I was confused by behavior of (org-refile-use-outline-path t). Completion options appears as "A (file.org)", "A/B (file.org)", and I could not figure out how to refile directly to "A" headings. I suspect that org-refile-allow-creating-parent-nodes does not work with "t" at all. Recently I have realized that after typing of "A/B" TAB completes option to "A/B (file.org)" and I was trying RET after "A". It is necessary to add space "A " to refile to a non-leaf node. That was the reason why I set (org-refile-use-outline-path 'file). Completion options appears as "file.org/A/B". I have to press TAB at first to get "file.org/" but then after "file.org/A" RET works fine.
prev parent reply other threads:[~2021-03-09 12:40 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 ` 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 [this message]
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://www.orgmode.org/ * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --email@example.com' \ --firstname.lastname@example.org \ --email@example.com \ --subject='Re: org-refile failed due to default option stored by org-goto' \ /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
Code repositories for project(s) associated with this 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).