winnow.el
Winnow - verb
- Blow a current of air through (grain) in order to remove the chaff.
1.1. Remove (chaff) from grain.
1.2. Remove (people or things) from a group until only the best ones are left.
1.3. Find or identify (a valuable or useful part of something)
Usage
Winnow the results from compilation-mode buffers by matching or excluding
lines from the results.
This was written to enhance ag.el, by filtering ag-mode results buffers by
iteratively applying match and exclude, winnowing the results.
The following key bindings are enabled:
| Key | Function |
|---|---|
| x | winnow-exclude-lines |
| m | winnow-match-lines |
The builtin highlight-regexp (M-s h r) can be used to show interesting
matches in the set.
Basic workflow is to run an ag search (through say projectile-ag), and then use
winnow-exclude-lines and winnow-match-lines to keep/flush matching lines in
the search results. If it’s too filtered, just recompile.
Install
Using the MELPA package archive,
M-x package-install [RET] winnow [RET]
And then add the following somewhere in your emacs initialization
(add-hook 'ag-mode-hook 'winnow-mode)Broadly it should work anything that derives from compilation-mode so
(add-hook 'compilation-mode-hook 'winnow-mode)will enable it everywhere. That should definitely work on grep-mode, and may
be applicable to other compilation modes. Unfortunately it is not applicable for
rspec-mode as it currently stands.
License
Copyright © 2017 Charles L.G. Comstock
Distributed under the GNU General Public License, version 3
