[elpa] master updated (b8a46cb -> be54382)

2015-09-12 Thread Leo Liu
leoliu pushed a change to branch master.

  from  b8a46cb   Add support to build packages from Emacs repo
   new  069315e   Add shell completion support for the_silver_search
   new  a27a30e   Make ack return the compilation buffer
   new  2fcbd1b   Customise compilation-finish-functions
   new  be54382   Merge ack master from github.com:leoliu/ack-el


Summary of changes:
 packages/ack/ack.el   |   19 +++
 packages/ack/pcmpl-ack.el |   39 +--
 2 files changed, 52 insertions(+), 6 deletions(-)



[elpa] master 069315e 1/4: Add shell completion support for the_silver_search

2015-09-12 Thread Leo Liu
branch: master
commit 069315e8374472ffbbe00115a1850a988da1ae65
Author: Leo Liu 
Commit: Leo Liu 

Add shell completion support for the_silver_search
---
 pcmpl-ack.el |   37 -
 1 files changed, 36 insertions(+), 1 deletions(-)

diff --git a/pcmpl-ack.el b/pcmpl-ack.el
index 3029367..ca906ab 100644
--- a/pcmpl-ack.el
+++ b/pcmpl-ack.el
@@ -1,4 +1,4 @@
-;;; pcmpl-ack.el --- completion for ack-*- lexical-binding: t; -*-
+;;; pcmpl-ack.el --- completion for ack and ag   -*- lexical-binding: t; 
-*-
 
 ;; Copyright (C) 2012-2013  Free Software Foundation, Inc.
 
@@ -27,6 +27,7 @@
 ;;
 ;; Install:
 ;;   (autoload 'pcomplete/ack "pcmpl-ack")
+;;   (autoload 'pcomplete/ag "pcmpl-ack")
 ;;
 ;; Usage:
 ;;   - To complete short options type '-' first
@@ -137,5 +138,39 @@ long options."
 ;;;###autoload
 (defalias 'pcomplete/ack-grep 'pcomplete/ack)
 
+(defvar pcmpl-ack-ag-options nil)
+
+(defun pcmpl-ack-ag-options ()
+  (or pcmpl-ack-ag-options
+  (setq pcmpl-ack-ag-options
+(with-temp-buffer
+  (when (zerop (call-process "ag" nil t nil "--help"))
+(let (short long)
+  (goto-char (point-min))
+  (while (re-search-forward "^ +\\(-[a-zA-Z]\\) " nil t)
+(push (match-string 1) short))
+  (goto-char (point-min))
+  (while (re-search-forward
+  "^ +\\(?:-[a-zA-Z] \\)?\\(--\\(\\[no\\]\\)?[^ 
\t\n]+\\) "
+  nil t)
+(if (match-string 2)
+(progn
+  (replace-match "" nil nil nil 2)
+  (push (match-string 1) long)
+  (replace-match "no" nil nil nil 2)
+  (push (match-string 1) long))
+  (push (match-string 1) long)))
+  (list (cons 'short (nreverse short))
+(cons 'long  (nreverse long)
+
+;;;###autoload
+(defun pcomplete/ag ()
+  "Completion for the `ag' command."
+  (while t
+(if (pcomplete-match "^-" 0)
+(pcomplete-here* (cdr (assq (if (pcomplete-match "^--" 0) 'long 'short)
+(pcmpl-ack-ag-options
+  (pcomplete-here* (pcomplete-dirs-or-entries)
+
 (provide 'pcmpl-ack)
 ;;; pcmpl-ack.el ends here



[elpa] master a27a30e 2/4: Make ack return the compilation buffer

2015-09-12 Thread Leo Liu
branch: master
commit a27a30e858187984f5331487ab71568deda262c3
Author: Leo Liu 
Commit: Leo Liu 

Make ack return the compilation buffer
---
 ack.el |   14 +++---
 1 files changed, 11 insertions(+), 3 deletions(-)

diff --git a/ack.el b/ack.el
index 41b6d22..c7094ba 100644
--- a/ack.el
+++ b/ack.el
@@ -1,9 +1,9 @@
-;;; ack.el --- interface to ack-like tools   -*- lexical-binding: t; -*-
+;;; ack.el --- interface to ack-like tools   -*- lexical-binding: t; 
-*-
 
 ;; Copyright (C) 2012-2013  Free Software Foundation, Inc.
 
 ;; Author: Leo Liu 
-;; Version: 1.3
+;; Version: 1.4
 ;; Keywords: tools, processes, convenience
 ;; Created: 2012-03-24
 ;; URL: https://github.com/leoliu/ack-el
@@ -50,6 +50,13 @@
 ;;the minibuffer
 ;; +  `TAB' completes ack options
 
+;;; Supported tools:
+
+;; + ack
+;; + grep
+;; + the_silver_search
+;; + git/hg/bzr grep
+
 ;;; Bugs: https://github.com/leoliu/ack-el/issues
 
 ;;; Code:
@@ -378,7 +385,8 @@ minibuffer:
 ;; make use of `compilation-arguments'.
 (with-current-buffer (compilation-start command-args 'ack-mode)
   (when ack-buffer-name-function
-(rename-buffer (funcall ack-buffer-name-function "ack"))
+(rename-buffer (funcall ack-buffer-name-function "ack")))
+  (current-buffer
 
 (provide 'ack)
 ;;; ack.el ends here



[elpa] master be54382 4/4: Merge ack master from github.com:leoliu/ack-el

2015-09-12 Thread Leo Liu
branch: master
commit be54382cca73c2a64f3bd2720a2332649541bbd5
Merge: b8a46cb 2fcbd1b
Author: Leo Liu 
Commit: Leo Liu 

Merge ack master from github.com:leoliu/ack-el
---
 packages/ack/ack.el   |   19 +++
 packages/ack/pcmpl-ack.el |   39 +--
 2 files changed, 52 insertions(+), 6 deletions(-)

diff --git a/packages/ack/ack.el b/packages/ack/ack.el
index c1f5328..11c1f93 100644
--- a/packages/ack/ack.el
+++ b/packages/ack/ack.el
@@ -1,9 +1,9 @@
-;;; ack.el --- Interface to ack-like source code search tools   -*- 
lexical-binding: t; -*-
+;;; ack.el --- interface to ack-like tools   -*- lexical-binding: t; 
-*-
 
-;; Copyright (C) 2012-2013  Free Software Foundation, Inc.
+;; Copyright (C) 2012-2015  Free Software Foundation, Inc.
 
 ;; Author: Leo Liu 
-;; Version: 1.3
+;; Version: 1.5
 ;; Keywords: tools, processes, convenience
 ;; Created: 2012-03-24
 ;; URL: https://github.com/leoliu/ack-el
@@ -50,6 +50,13 @@
 ;;the minibuffer
 ;; +  `TAB' completes ack options
 
+;;; Supported tools:
+
+;; + ack
+;; + grep
+;; + the_silver_search
+;; + git/hg/bzr grep
+
 ;;; Bugs: https://github.com/leoliu/ack-el/issues
 
 ;;; Code:
@@ -140,6 +147,9 @@ Used by `ack-guess-project-root'."
 (defvar ack-error "ack match"
   "Stem of message to print when no matches are found.")
 
+(defvar ack-finish-functions nil
+  "Value to use for `compilation-finish-functions' in ack buffers.")
+
 (defun ack-filter ()
   "Handle match highlighting escape sequences inserted by the ack process.
 This function is called from `compilation-filter-hook'."
@@ -378,7 +388,8 @@ minibuffer:
 ;; make use of `compilation-arguments'.
 (with-current-buffer (compilation-start command-args 'ack-mode)
   (when ack-buffer-name-function
-(rename-buffer (funcall ack-buffer-name-function "ack"))
+(rename-buffer (funcall ack-buffer-name-function "ack")))
+  (current-buffer
 
 (provide 'ack)
 ;;; ack.el ends here
diff --git a/packages/ack/pcmpl-ack.el b/packages/ack/pcmpl-ack.el
index 3029367..315eb04 100644
--- a/packages/ack/pcmpl-ack.el
+++ b/packages/ack/pcmpl-ack.el
@@ -1,6 +1,6 @@
-;;; pcmpl-ack.el --- completion for ack-*- lexical-binding: t; -*-
+;;; pcmpl-ack.el --- completion for ack and ag   -*- lexical-binding: t; 
-*-
 
-;; Copyright (C) 2012-2013  Free Software Foundation, Inc.
+;; Copyright (C) 2012-2015  Free Software Foundation, Inc.
 
 ;; Author: Leo Liu 
 ;; Keywords: tools, processes, convenience
@@ -27,6 +27,7 @@
 ;;
 ;; Install:
 ;;   (autoload 'pcomplete/ack "pcmpl-ack")
+;;   (autoload 'pcomplete/ag "pcmpl-ack")
 ;;
 ;; Usage:
 ;;   - To complete short options type '-' first
@@ -137,5 +138,39 @@ long options."
 ;;;###autoload
 (defalias 'pcomplete/ack-grep 'pcomplete/ack)
 
+(defvar pcmpl-ack-ag-options nil)
+
+(defun pcmpl-ack-ag-options ()
+  (or pcmpl-ack-ag-options
+  (setq pcmpl-ack-ag-options
+(with-temp-buffer
+  (when (zerop (call-process "ag" nil t nil "--help"))
+(let (short long)
+  (goto-char (point-min))
+  (while (re-search-forward "^ +\\(-[a-zA-Z]\\) " nil t)
+(push (match-string 1) short))
+  (goto-char (point-min))
+  (while (re-search-forward
+  "^ +\\(?:-[a-zA-Z] \\)?\\(--\\(\\[no\\]\\)?[^ 
\t\n]+\\) "
+  nil t)
+(if (match-string 2)
+(progn
+  (replace-match "" nil nil nil 2)
+  (push (match-string 1) long)
+  (replace-match "no" nil nil nil 2)
+  (push (match-string 1) long))
+  (push (match-string 1) long)))
+  (list (cons 'short (nreverse short))
+(cons 'long  (nreverse long)
+
+;;;###autoload
+(defun pcomplete/ag ()
+  "Completion for the `ag' command."
+  (while t
+(if (pcomplete-match "^-" 0)
+(pcomplete-here* (cdr (assq (if (pcomplete-match "^--" 0) 'long 'short)
+(pcmpl-ack-ag-options
+  (pcomplete-here* (pcomplete-dirs-or-entries)
+
 (provide 'pcmpl-ack)
 ;;; pcmpl-ack.el ends here



[elpa] master 2fcbd1b 3/4: Customise compilation-finish-functions

2015-09-12 Thread Leo Liu
branch: master
commit 2fcbd1b2667fcf860f6196e3c8112e4ddf8dc431
Author: Leo Liu 
Commit: Leo Liu 

Customise compilation-finish-functions
---
 ack.el   |7 +--
 pcmpl-ack.el |2 +-
 2 files changed, 6 insertions(+), 3 deletions(-)

diff --git a/ack.el b/ack.el
index c7094ba..11c1f93 100644
--- a/ack.el
+++ b/ack.el
@@ -1,9 +1,9 @@
 ;;; ack.el --- interface to ack-like tools   -*- lexical-binding: t; 
-*-
 
-;; Copyright (C) 2012-2013  Free Software Foundation, Inc.
+;; Copyright (C) 2012-2015  Free Software Foundation, Inc.
 
 ;; Author: Leo Liu 
-;; Version: 1.4
+;; Version: 1.5
 ;; Keywords: tools, processes, convenience
 ;; Created: 2012-03-24
 ;; URL: https://github.com/leoliu/ack-el
@@ -147,6 +147,9 @@ Used by `ack-guess-project-root'."
 (defvar ack-error "ack match"
   "Stem of message to print when no matches are found.")
 
+(defvar ack-finish-functions nil
+  "Value to use for `compilation-finish-functions' in ack buffers.")
+
 (defun ack-filter ()
   "Handle match highlighting escape sequences inserted by the ack process.
 This function is called from `compilation-filter-hook'."
diff --git a/pcmpl-ack.el b/pcmpl-ack.el
index ca906ab..315eb04 100644
--- a/pcmpl-ack.el
+++ b/pcmpl-ack.el
@@ -1,6 +1,6 @@
 ;;; pcmpl-ack.el --- completion for ack and ag   -*- lexical-binding: t; 
-*-
 
-;; Copyright (C) 2012-2013  Free Software Foundation, Inc.
+;; Copyright (C) 2012-2015  Free Software Foundation, Inc.
 
 ;; Author: Leo Liu 
 ;; Keywords: tools, processes, convenience