Giving priority to candidates in sources other than the first one

6 views
Skip to first unread message

Massimiliano Mirra

unread,
Apr 24, 2015, 8:07:01 AM4/24/15
to emacs...@googlegroups.com
With the code below, if I run `M-x helm-foo' then type "fo", the one entry of helm-source-foo-dummy is selected. I would like the "foo" candidate of the helm-source-foo-sync to be selected instead, without changing the visual order of the sources. Is this possible?


(defvar helm-source-foo-sync
  '((name . "source with candidates")
    (candidates . ("foo" "bar" "baz"))
    (requires-pattern . 2)
    (action . identity)))

(defvar helm-source-foo-dummy
  '((name . "dummy source")
    (requires-pattern . 2)
    (dummy)
    (action . identity)))

(defun helm-foo ()
  (interactive)
  (helm :sources '(helm-source-foo-dummy helm-source-foo-sync)
        :buffer "*helm test*"))

Reply all
Reply to author
Forward
0 new messages