all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Wanrong Lin <wanrong.lin@gmail.com>
To: org-mode list <emacs-orgmode@gnu.org>
Subject: Re: org-refile: only works on leaves?
Date: Tue, 15 Jan 2008 14:29:07 -0500	[thread overview]
Message-ID: <478D0983.80902@gmail.com> (raw)
In-Reply-To: <9156AE24-0C13-4E93-8D6F-14624EEECA82@gmail.com>

Carsten Dominik wrote:
>
> On Dec 21, 2007, at 8:09 PM, Wanrong Lin wrote:
>
>>
>> What I meant was:
>>
>> Suppose I have an org file like this:
>>
>> * Level 1 heading
>> *** Level 2 heading
>>
>> With my settings (setq org-refile-targets '((org-agenda-files . 
>> (:maxlevel . 2)))) , when I try to refile an item, I press the TAB 
>> key, the auto-completion buffer will display
>>
>> Level 1 heading
>> Level 1 heading / Level 2 heading
>>
>> If I want to put the refile item under "Level 1 heading", I can not 
>> select "Level 1 heading" ("Level 1 heading" will show in the 
>> mini-buffer, but pressing RET key does not do anything, meaning org 
>> thinks this is an invalid target location).
>
> This works fine for me, I don't know what might be causing this.  
> maybe some
> completion package you are using?
>
> - Carsten
>
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?

Thank you.

Wanrong

  parent reply	other threads:[~2008-01-15 19:29 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-12-20 17:09 org-refile: only works on leaves? Wanrong Lin
2007-12-21 14:41 ` Carsten Dominik
2007-12-21 19:09   ` Wanrong Lin
2008-01-03 14:03     ` Carsten Dominik
2008-01-03 15:38       ` Wanrong Lin
2008-01-15 19:29       ` Wanrong Lin [this message]
2008-01-16  9:52         ` Carsten Dominik
2008-01-16 15:27           ` Wanrong Lin

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

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

  git send-email \
    --in-reply-to=478D0983.80902@gmail.com \
    --to=wanrong.lin@gmail.com \
    --cc=emacs-orgmode@gnu.org \
    /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
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

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

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.