]> code.delx.au - gnu-emacs-elpa/commit
Add counsel-grep
authorOleh Krehel <ohwoeowho@gmail.com>
Wed, 25 Nov 2015 14:24:58 +0000 (15:24 +0100)
committerOleh Krehel <ohwoeowho@gmail.com>
Wed, 25 Nov 2015 14:24:58 +0000 (15:24 +0100)
commit8abed590c9904fbdf7d6fbac3b7aed87627ed5c1
tree63bb8b9cdb83cf59a75550db4311da6babf851c9
parent99d214d8052c221ad914d270bdcc172ed7fffc76
Add counsel-grep

* ivy.el (ivy--reset-state): Don't push preselect onto collection for
  :dynamic-collection.
(ivy-recompute-index-swiper-async): New defun. It's useful for
re-anchoring on collections produced async processes. The major
difference from `ivy-recompute-index-swiper' is using `equal' instead of `eq'.

* counsel.el (counsel--async-sentinel): Add index recomputing logic.
When `ivy--old-cands' are null, recompute the index according to
:preselect, otherwise try `ivy--recompute-index'.
(counsel-grep): New command. Very similar to `swiper', except calls an
external process for each key update. Should be much faster for very
large files, both for startup and for matching. For smaller files, it's
less convenient.
(counsel-grep-function): New defun.
(counsel-grep-action): New defun.

Fixes #299
counsel.el
ivy.el