emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* org-refile: only works on leaves?
@ 2007-12-20 17:09 Wanrong Lin
  2007-12-21 14:41 ` Carsten Dominik
  0 siblings, 1 reply; 8+ messages in thread
From: Wanrong Lin @ 2007-12-20 17:09 UTC (permalink / raw)
  To: emacs-orgmode

Hi,

Another thing I found out when using org-refile is, it seems the filing 
target can only be the leaves of the outline tree. The non-leaf target 
locations will be displayed in the auto-completion buffer, but can not 
be selected.

I have the following settings

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

I am using the latest version (5.17a).

Is there any option that I can set to change this behavior? Thanks for help.

And, MERRY CHRISTMAS to all orgers....

Wanrong

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

* Re: org-refile: only works on leaves?
  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
  0 siblings, 1 reply; 8+ messages in thread
From: Carsten Dominik @ 2007-12-21 14:41 UTC (permalink / raw)
  To: Wanrong Lin; +Cc: emacs-orgmode

Can you please make a more detailed test case and description?
I have trouble to gras what exactly you mean.

- Carsten

On Dec 20, 2007, at 6:09 PM, Wanrong Lin wrote:

> Hi,
>
> Another thing I found out when using org-refile is, it seems the  
> filing target can only be the leaves of the outline tree. The non- 
> leaf target locations will be displayed in the auto-completion  
> buffer, but can not be selected.
>
> I have the following settings
>
> (setq org-refile-targets '((org-agenda-files . (:maxlevel . 2))))
> (setq org-refile-use-outline-path t)
>
> I am using the latest version (5.17a).
>
> Is there any option that I can set to change this behavior? Thanks  
> for help.
>
> And, MERRY CHRISTMAS to all orgers....
>
> Wanrong
>
>
>
> _______________________________________________
> Emacs-orgmode mailing list
> Remember: use `Reply All' to send replies to the list.
> Emacs-orgmode@gnu.org
> http://lists.gnu.org/mailman/listinfo/emacs-orgmode

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

* Re: org-refile: only works on leaves?
  2007-12-21 14:41 ` Carsten Dominik
@ 2007-12-21 19:09   ` Wanrong Lin
  2008-01-03 14:03     ` Carsten Dominik
  0 siblings, 1 reply; 8+ messages in thread
From: Wanrong Lin @ 2007-12-21 19:09 UTC (permalink / raw)
  To: emacs-orgmode


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

Let me know if this is still not clear. Thank you very much for taking a 
look of this.

Wanrong

Carsten Dominik wrote:
> Can you please make a more detailed test case and description?
> I have trouble to gras what exactly you mean.
>
> - Carsten
>
> On Dec 20, 2007, at 6:09 PM, Wanrong Lin wrote:
>
>> Hi,
>>
>> Another thing I found out when using org-refile is, it seems the 
>> filing target can only be the leaves of the outline tree. The 
>> non-leaf target locations will be displayed in the auto-completion 
>> buffer, but can not be selected.
>>
>> I have the following settings
>>
>> (setq org-refile-targets '((org-agenda-files . (:maxlevel . 2))))
>> (setq org-refile-use-outline-path t)
>>
>> I am using the latest version (5.17a).
>>
>> Is there any option that I can set to change this behavior? Thanks 
>> for help.
>>
>> And, MERRY CHRISTMAS to all orgers....
>>
>> Wanrong
>>
>>
>>
>> _______________________________________________
>> Emacs-orgmode mailing list
>> Remember: use `Reply All' to send replies to the list.
>> Emacs-orgmode@gnu.org
>> http://lists.gnu.org/mailman/listinfo/emacs-orgmode
>

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

* Re: org-refile: only works on leaves?
  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
  0 siblings, 2 replies; 8+ messages in thread
From: Carsten Dominik @ 2008-01-03 14:03 UTC (permalink / raw)
  To: Wanrong Lin; +Cc: emacs-orgmode


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

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

* Re: org-refile: only works on leaves?
  2008-01-03 14:03     ` Carsten Dominik
@ 2008-01-03 15:38       ` Wanrong Lin
  2008-01-15 19:29       ` Wanrong Lin
  1 sibling, 0 replies; 8+ messages in thread
From: Wanrong Lin @ 2008-01-03 15:38 UTC (permalink / raw)
  To: emacs-orgmode

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
>

I did not use any completion packages except for whatever default one 
coming with Emacs 22. I will give this some more tests and see what 
could be the cause. Thanks a lot for testing and replying.

Wanrong

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

* Re: org-refile: only works on leaves?
  2008-01-03 14:03     ` Carsten Dominik
  2008-01-03 15:38       ` Wanrong Lin
@ 2008-01-15 19:29       ` Wanrong Lin
  2008-01-16  9:52         ` Carsten Dominik
  1 sibling, 1 reply; 8+ messages in thread
From: Wanrong Lin @ 2008-01-15 19:29 UTC (permalink / raw)
  To: org-mode list

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

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

* Re: org-refile: only works on leaves?
  2008-01-15 19:29       ` Wanrong Lin
@ 2008-01-16  9:52         ` Carsten Dominik
  2008-01-16 15:27           ` Wanrong Lin
  0 siblings, 1 reply; 8+ messages in thread
From: Carsten Dominik @ 2008-01-16  9:52 UTC (permalink / raw)
  To: Wanrong Lin; +Cc: org-mode list


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

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

* Re: org-refile: only works on leaves?
  2008-01-16  9:52         ` Carsten Dominik
@ 2008-01-16 15:27           ` Wanrong Lin
  0 siblings, 0 replies; 8+ messages in thread
From: Wanrong Lin @ 2008-01-16 15:27 UTC (permalink / raw)
  To: org-mode list

Carsten Dominik wrote:
>
> 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

Yes, this may be difficult to implement... (although in org-mode, a lot 
of things I thought were difficult or nearly impossible are actually 
there. I guess my expectation has been elevated. :))

I think typing the file name will be more work (I am lazy :)) than 
pressing the space key, so I prefer the current setting.

Thank you.

Wanrong

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

end of thread, other threads:[~2008-01-16 15:27 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
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
2008-01-16  9:52         ` Carsten Dominik
2008-01-16 15:27           ` Wanrong Lin

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