GNU ELPA - ack


interface to ack-like tools
ack-1.10.tar, 2020-Jul-06, 40.0 KiB
João Távora <>
Home page
Browse ELPA's repository
CGit or Gitweb

To install this package, run in Emacs:

M-x package-install RET ack RET

Full description

 The Simple Emacs Interface to `Ack <>`_-like Tools
This package integrates `ack <>`_ and its large
set of options with `emacs <>`_.  The
resulting ``*ack*`` buffer is just like vanilla ``*grep*`` buffer but
the results come from your tool of choice.

Ack-like tools such as `the silver searcher (ag)
<>`_, `ripgrep (rg)
<>`_ are well supported, as are
``git grep``, ``hg grep``.

The program guesses good defaults, but lets you give ``C-u`` to
customize directory to search in, as well as the give special commands
and switches.

Just ``M-x ack`` or do something like ``(global-set-key (kbd "C-c
C-g") 'ack)``.

It is part of `GNU ELPA <>`_ - the official package
archive for `emacs <>`_. Patches,
feature requests and bug reports are welcome.

Colors are handled using the standard library ``ansi-color.el``


``M-x package-install RET ack RET``


* ack

.. figure::
   :alt: ack.png

* git grep

.. figure::
   :alt: ack-git-grep.png


- Type ``M-x ack`` and provide a pattern to search.
- Type ``C-u M-x ack`` to search from current project root.
- Type ``C-u C-u M-x ack`` to interactively choose a directory to search.

While reading ack command and args from the minibuffer, the following
key bindings may be useful:

- ``M-I`` => insert a template for case-insensitive file name search
- ``M-G`` => insert a template for ``git grep``, ``hg grep`` or ``bzr grep``
- ``M-Y`` => grab the symbol at point from the window before entering
  the minibuffer
- ``TAB`` => completion for ack options

If you use the above keybindings very often, stick the corresponding
command names in ``ack-minibuffer-setup-hook``. The following snippet
makes ``M-x ack`` insert a ``git|hg|bzr grep`` template if searching
from a project root. Then it will try to insert the symbol at point.

.. code-block:: lisp

  (add-hook 'ack-minibuffer-setup-hook 'ack-skel-vc-grep t)
  (add-hook 'ack-minibuffer-setup-hook 'ack-yank-symbol-at-point t)


Check out the `emacs23
<>`_ branch.


Phillip Lord. The original author and previous mantainer is Leo Liu.

Old versions

ack-1.8.tar2019-Mar-1740.0 KiB
ack-1.6.tar2019-Mar-1640.0 KiB
ack-1.5.tar2015-Sep-1330.0 KiB
ack-1.3.tar2013-Aug-2230.0 KiB
ack-1.2.tar2013-May-0430.0 KiB
ack-1.01.tar2013-Apr-2130.0 KiB
ack-1.0.tar2013-Apr-2030.0 KiB
ack-0.9.tar2013-Feb-0830.0 KiB
ack-0.8.tar2012-Nov-2930.0 KiB