[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Orgmode] org-refile: only works on leaves?

From: Carsten Dominik
Subject: Re: [Orgmode] org-refile: only works on leaves?
Date: Wed, 16 Jan 2008 10:52:46 +0100

On Jan 15, 2008, at 8:29 PM, Wanrong Lin wrote:
Hi, Carsten,

It seems I found the cause of this.

I have the following in my emacs config:

(setq org-refile-targets '((org-agenda-files . (:maxlevel . 2))))
(setq org-refile-use-outline-path t)

When using org-refile, the completion suggestions I got is (using example in my original example)

Level 1 heading (xyz.org)
Level 1 heading / Level 2 heading (xyz.org)

Note there is a space between "Level 1 heading" and "(xyz.org)", so if I type "Level" and press TAB key, the minibuffer will get a completion up to "Level 1 heading" without the space, and I though this is a valid selection but org-mode refuses to take it. What is actually happening is, org-mode needs the " (xyz.org)" too. so if I add a space after "Level 1 heading", and press TAB key again, the minibuffer will get a completion to "Level 1 heading (xyz.org)" and now org-mode thinks this is a valid selection.

My feeling is the above is a little bit counter-intuitive. If there is no multiple files with the same heading "Level 1 heading", I would think "Level 1 heading" should be considered a valid selection from the completion buffer. What do you think?

In principle, I tend to agree but I don't know how to tweak completion
to act like this.  Have you considered to set

(setq org-refile-use-outline-path 'file)

? This would get rid of the problem by moving the file name to the beginning of the
completion string.

- Carsten

reply via email to

[Prev in Thread] Current Thread [Next in Thread]