From 082804f6f1d5f51b7d25b97819151ab30073a742 Mon Sep 17 00:00:00 2001 From: Alan Pearce Date: Sat, 6 Feb 2016 17:01:50 +0100 Subject: Emacs: Remove platinum configuration --- tag-emacs/emacs.d/init.org | 51 ---------------------------------------------- 1 file changed, 51 deletions(-) (limited to 'tag-emacs') diff --git a/tag-emacs/emacs.d/init.org b/tag-emacs/emacs.d/init.org index 09ffb12..4888072 100644 --- a/tag-emacs/emacs.d/init.org +++ b/tag-emacs/emacs.d/init.org @@ -335,57 +335,6 @@ modes. :config (setq ag-project-root-function #'projectile-project-root)) #+END_SRC -** The Platinum Searcher - -[[https://github.com/monochromegane/the_platinum_searcher][The Platinum Searcher]] is a code search tool similar to ack and -the_silver_searcher(ag). It supports multi platforms and multi -encodings. - -#+BEGIN_SRC sh :tangle no -brew install pt -#+END_SRC - -#+BEGIN_SRC emacs-lisp - (use-package pt - :pin melpa-stable - :bind* ("C-c p s s" . ap/projectile-pt) - :config (progn - (defun pt (string directory &optional args) - (interactive (list (read-from-minibuffer "Pt search for: " (thing-at-point 'symbol)) - (read-directory-name "Directory: "))) - (let ((default-directory directory)) - (compilation-start - (mapconcat 'identity - (append (list pt-executable) - pt-arguments - args - '("--nogroup" "--nocolor" "--") - (list (shell-quote-argument string) ".")) " ")))) - - (defun ap/projectile-pt (search-term &optional arg) - "Run a pt search with SEARCH-TERM in the project. - - With an optional prefix argument ARG SEARCH-TERM is interpreted as a - regular expression." - (interactive - (list (read-from-minibuffer - (projectile-prepend-project-name (format "Pt %ssearch for: " (if current-prefix-arg "regexp " ""))) - (projectile-symbol-or-selection-at-point)) - current-prefix-arg)) - (if (require 'pt nil 'noerror) - (let ((pt-command (if arg 'pt-regexp 'pt)) - (ignore-list (-map #'shell-quote-argument - (ag/format-ignore - (-union ag-ignore-list - (append - (projectile-ignored-files-rel) (projectile-ignored-directories-rel) - grep-find-ignored-files grep-find-ignored-directories))))) - ;; reset the prefix arg, otherwise it will affect the pt-command - (current-prefix-arg nil)) - (funcall pt-command search-term (projectile-project-root) ignore-list)) - (error "Package 'pt' is not available"))))) -#+END_SRC - ** Projectile Projectile is awesome for working in projects, especially VCS-backed -- cgit 1.4.1