Skip to content

Instantly share code, notes, and snippets.

@joshwnj
Created January 10, 2014 02:05
Show Gist options
  • Save joshwnj/8345788 to your computer and use it in GitHub Desktop.
Save joshwnj/8345788 to your computer and use it in GitHub Desktop.
;; Very quick hack to use `grasp` for searching js tokens in emacs.
;; Uses (compile) so when you get search results you can quickly step through them with (next-error) and (previous-error)
;; to install:
;; $ npm install -g grasp strip-ansi
(defun grasp-current-buffer (arg)
(interactive "MGrasp: ")
(compile (concat "grasp -H '" arg "' " (buffer-file-name) " | strip-ansi")))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment