From mboxrd@z Thu Jan 1 00:00:00 1970 From: Wanrong Lin Subject: Re: org-refile: only works on leaves? Date: Wed, 16 Jan 2008 10:27:39 -0500 Message-ID: <478E226B.5010905@gmail.com> References: <476AA1C0.5010707@gmail.com> <20A7DCD7-0A5B-4176-B906-64B338C31013@gmail.com> <476C0F50.405@gmail.com> <9156AE24-0C13-4E93-8D6F-14624EEECA82@gmail.com> <478D0983.80902@gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Return-path: Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1JFABJ-0006wl-KX for emacs-orgmode@gnu.org; Wed, 16 Jan 2008 10:27:57 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1JFABI-0006vB-U9 for emacs-orgmode@gnu.org; Wed, 16 Jan 2008 10:27:57 -0500 Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1JFABI-0006uv-Nd for emacs-orgmode@gnu.org; Wed, 16 Jan 2008 10:27:56 -0500 Received: from wr-out-0506.google.com ([64.233.184.226]) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1JFABI-0005oG-JN for emacs-orgmode@gnu.org; Wed, 16 Jan 2008 10:27:56 -0500 Received: by wr-out-0506.google.com with SMTP id 37so30574wra.12 for ; Wed, 16 Jan 2008 07:27:55 -0800 (PST) In-Reply-To: List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org 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