emacs-orgmode
[Top][All Lists]
Advanced

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

Re: [O] refiling with helm


From: Kyle Meyer
Subject: Re: [O] refiling with helm
Date: Sun, 01 Mar 2015 11:17:47 -0500
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.4 (gnu/linux)

"Stefan-W. Hahn" <address@hidden> wrote:
[...]
> sorry, on addition:
>> #+BEGIN_SRC elisp
>
>   (setq org-completion-use-ido nil
>         org-completion-use-iswitchb nil
>         org-refile-use-outline-path nil
>         org-completion-handler nil)
>
>>   (defun helm-refile-completing-read (orig-func prompt collection &optional 
>> predicate require-match
>>                                                 initial-input hist def 
>> inherit-input-method)
>>     "Completing function for org-refile"
>>     (helm-completing-read-default-1
>>      prompt collection predicate require-match
>>      initial-input hist def inherit-input-method
>>      "org-refile" nil t)
>>     )
>>
>>   (advice-add 'org-olpath-completing-read :around 
>> #'helm-refile-completing-read)
>>
>> #+END_SRC

Are you sure the advice is necessary?  If either
org-refile-use-outline-path (as above) or
org-outline-path-complete-in-steps is nil, it doesn't seem that
org-olpath-completing-read will be called.  The relevant part of
org-refile-get-location (master, f8731ea) is

    (cfunc (if (and org-refile-use-outline-path
                    org-outline-path-complete-in-steps)
               'org-olpath-completing-read
             'org-icompleting-read))

Then, if org-completion-use-ido and org-completion-use-iswitchb are nil,
org-icompleting-read will use completing-read, which helm-mode should be
able to override.

So, given the default values, I think the only setup needed to get
generic helm completion is

    (setq org-outline-path-complete-in-steps nil)

    (require 'helm)
    (require 'helm-config)
    (helm-mode 1)

However, I'm not an experienced helm user, so perhaps others are
noticing issues that I'm not.

--
Kyle



reply via email to

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