Please sign in to comment.
Allow to compose static collections with `counsel--async-command'
* ivy.el (ivy--sources-list): New defvar. (ivy-set-sources): New defun that sets `ivy--sources-list' (ivy--extra-candidates): New defvar. (ivy-read): Use `ivy--sources-list' to set `ivy--extra-candidates' - a list that composes itself with `ivy--all-candidates'. (ivy--set-candidates): New defun. Example - stack `recentf' on top of `counsel-locate': (defun small-test () (cl-subseq recentf-list 0 10)) (ivy-set-sources 'counsel-locate '((small-test) (original-source))) Here, (original-source) represents the async candidates of `counsel-locate'. All extra sources are static - each function is called once to generate a list of strings, which will be filtered later. The order matters, so you can have e.g.: (ivy-set-sources 'counsel-locate '((original-source) (small-test))) Fixes #373
- Loading branch information...