]> code.delx.au - gnu-emacs-elpa/commitdiff
* ack: Release v1.0
authorLeo Liu <sdl.web@gmail.com>
Sat, 20 Apr 2013 03:43:51 +0000 (11:43 +0800)
committerLeo Liu <sdl.web@gmail.com>
Sat, 20 Apr 2013 03:43:51 +0000 (11:43 +0800)
packages/ack/ack-pkg.el
packages/ack/ack.el
packages/ack/pcmpl-ack.el

index f870e01517026419652684684d3f50dea3f81011..55baa723c8d330120b3e5172c510dd421bc19e67 100644 (file)
@@ -1 +1 @@
-(define-package "ack" "0.9" "Interface to ack, a source code search tool")
+(define-package "ack" "1.0" "Interface to ack, a source code search tool")
index e6cab60af2bd78faf06f7148ef04e22281b12308..f7d8fa272712fa9603365853142efe2601ccf8b6 100644 (file)
@@ -1,9 +1,9 @@
-;;; ack.el --- Emacs interface to ack           -*- lexical-binding: t; -*-
+;;; ack.el --- interface to ack            -*- lexical-binding: t; -*-
 
-;; Copyright (C) 20122013  Free Software Foundation, Inc.
+;; Copyright (C) 2012-2013  Free Software Foundation, Inc.
 
 ;; Author: Leo Liu <sdl.web@gmail.com>
-;; Version: 0.9
+;; Version: 1.0
 ;; Keywords: tools, processes, convenience
 ;; Created: 2012-03-24
 ;; URL: https://github.com/leoliu/ack-el
 
 ;;; Commentary:
 
-;; ack is a tool like grep, designed for programmers with large trees
-;; of heterogeneous source code - http://betterthangrep.com/.
+;; This package provides an interface to ack http://betterthangrep.com
+;; -- a tool like grep, designed for programmers with large trees of
+;; heterogeneous source code. It builds on standard packages
+;; `compile.el' and `ansi-color.el' and let you seamlessly run `ack'
+;; with its large set of options.
+
+;;; 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.
+;;
+;; Note: use `ack-default-directory-function' for customised
+;; behaviour.
+;;
+;; When in the minibuffer the following key bindings may be useful:
+;;
+;; +  `M-I' inserts a template for case-insensitive file name search
+;; +  `M-G' inserts a template for `git grep', `hg grep' or `bzr grep'
+;; +  `M-Y' inserts the symbol at point from the window before entering
+;;    the minibuffer
+;; +  `TAB' completes ack options
+
+;;; Bugs: https://github.com/leoliu/ack-el/issues
 
 ;;; Code:
 
@@ -217,17 +240,19 @@ This gets tacked on the end of the generated expressions.")
                         (match-string 1 file)
                       file))))))
 
-(defun ack-mode-display-match ()
-  "Display in another window the match in current line."
-  (interactive)
-  (setq compilation-current-error (point))
-  (next-error-no-select 0))
-
 (define-compilation-mode ack-mode "Ack"
   "A compilation mode tailored for ack."
   (setq-local compilation-disable-input t)
   (setq-local compilation-error-face 'compilation-info)
-  (add-hook 'compilation-filter-hook 'ack-filter nil t)
+  (add-hook 'compilation-filter-hook 'ack-filter nil t))
+
+;;; `compilation-display-error' is introduced in 24.4
+(unless (fboundp 'compilation-display-error)
+  (defun ack-mode-display-match ()
+    "Display in another window the match in current line."
+    (interactive)
+    (setq compilation-current-error (point))
+    (next-error-no-select 0))
   (define-key ack-mode-map "\C-o" #'ack-mode-display-match))
 
 (defun ack-skel-file ()
index 942a5528414315650b524778af713947c0e068f0..3584e8381c2242acd2904cd2384290b6660f768a 100644 (file)
@@ -1,6 +1,6 @@
-;;; pcmpl-ack.el --- completion for ack tool    -*- lexical-binding: t; -*-
+;;; pcmpl-ack.el --- completion for ack    -*- lexical-binding: t; -*-
 
-;; Copyright (C) 20122013  Free Software Foundation, Inc.
+;; Copyright (C) 2012-2013  Free Software Foundation, Inc.
 
 ;; Author: Leo Liu <sdl.web@gmail.com>
 ;; Keywords: tools, processes, convenience