Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
possible new feature: append candidates periodically #340
So what I was thinking is what if you could configure
This question is inspired by how helm-ag works. Somehow helm-ag shows matches immediately, but keeps collecting remaining ones in the background.
Thanks @abo-abo I haven't played with it too much, but it's not as smooth as I would have hoped on my computer.
My first thought for an alternative was something like this.
(defvar counsel--async-lines 0) (defvar counsel--async-line-threshold 1000) (defun counsel--async-filter (process str) "Receive from PROCESS the output STR." (when (< counsel--async-lines counsel--async-line-threshold) (with-current-buffer (process-buffer process) (insert str) (setq counsel--async-lines (count-matches "\n" (point-min) (point-max))) (when (< counsel--async-lines counsel--async-line-threshold) (goto-char (point-min)) (setq ivy--all-candidates (split-string (buffer-string) "\n" t)))) (let ((ivy--prompt (format "%d++ ag:" counsel--async-lines))) (ivy--insert-minibuffer (ivy--format ivy--all-candidates)))))
I know I need to do the paperwork now.