emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Kyle Meyer <kyle@kyleam.com>
To: "Stefan-W. Hahn" <stefan.hahn@s-hahn.de>
Cc: Xebar Saram <zeltakc@gmail.com>, org mode <emacs-orgmode@gnu.org>
Subject: Re: refiling with helm
Date: Sun, 01 Mar 2015 11:17:47 -0500	[thread overview]
Message-ID: <87385ozo7o.fsf@kmlap.domain.org> (raw)
In-Reply-To: <20150301081840.GE22486@pille.home> (Stefan-W. Hahn's message of "Sun, 1 Mar 2015 09:18:40 +0100")

"Stefan-W. Hahn" <stefan.hahn@s-hahn.de> 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	other threads:[~2015-03-01 16:13 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-02-28  6:19 refiling with helm Xebar Saram
2015-03-01  8:13 ` Stefan-W. Hahn
2015-03-01  8:18   ` Stefan-W. Hahn
2015-03-01 16:17     ` Kyle Meyer [this message]
2015-03-04 14:54       ` Stefan-W. Hahn
2015-03-05  5:50         ` Xebar Saram
2015-03-05 15:13           ` Leo Ufimtsev
2015-03-06  2:17             ` Alexis
2015-03-01  8:53 ` Ian Barton
2015-03-02 17:28 ` Leo Ufimtsev

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

  List information: https://www.orgmode.org/

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

  git send-email \
    --in-reply-to=87385ozo7o.fsf@kmlap.domain.org \
    --to=kyle@kyleam.com \
    --cc=emacs-orgmode@gnu.org \
    --cc=stefan.hahn@s-hahn.de \
    --cc=zeltakc@gmail.com \
    /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 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).