GNU ELPA - ack


interface to ack-like tools
ack-1.11.tar, 2022-Sep-26, 40.0 KiB
João Távora <>
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

.. image::
   :alt: GNU ELPA package

This package integrates `ack <>`_ with `Emacs
<>`_.  The resulting ``*ack*`` buffer
is just like vanilla ``*grep*`` but results come from your tool of

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

The program guesses good defaults -- including searching for the thing
at point -- but lets you input ``C-u`` to customize the directory,
commands, switches etc...


Ack is part of `GNU ELPA <>`_ - the official package
archive for Emacs:

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


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


* ack

.. figure::
   :alt: ack.png

* git grep

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

More Usage

- 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)

Emacs 23

Check out the `emacs23
<>`_ branch.


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

Old versions

ack-1.10.tar.lz2020-Jul-069.51 KiB
ack-1.8.tar.lz2019-Mar-179.21 KiB
ack-1.6.tar.lz2019-Mar-168.09 KiB
ack-1.5.tar.lz2015-Sep-137.23 KiB
ack-1.3.tar.lz2013-Aug-226.97 KiB
ack-1.2.tar.lz2013-May-046.58 KiB
ack-1.01.tar.lz2013-Apr-216.53 KiB
ack-1.0.tar.lz2013-Apr-206.47 KiB
ack-0.9.tar.lz2013-Feb-086.13 KiB
ack-0.8.tar.lz2012-Nov-296.42 KiB