 ;; Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
 ;; Boston, MA 02110-1301, USA.
 
-(require 's)
-(require 'dash)
-
 (defcustom ag-arguments
   (list "--nocolor" "--literal" "--smart-case" "--nogroup" "--column")
   "Default arguments passed to ag."

  "Wrap in single quotes, and quote existing single quotes to make shell safe."
  (concat "'" (ack-and-a-half-string-replace "'" "'\\''" string) "'"))

(defun ag (string directory)
  "Run ag searching for the literal STRING given in DIRECTORY."
  (interactive "sSearch string: \nDDirectory: ")
  (compilation-start (s-join " "
                             (-concat '("ag") ag-arguments (list (ag/shell-quote string))))
                     'ag-mode))

;;
;; Author: Wilfred Hughes <me@wilfred.me.uk>
;; Created: 11 January 2012
;; Version: 0.2

;;; Commentary

;; This file is heavily based on the excellent ack-and-a-half.el.

;;; Todo

;; 1. Add ag-project
;; 2. Add ag-project-at-point
;; 3. Add ag-regexp
;; 4. Add highlighting to *Ag* buffer

;;; License:

