Skip to content

Instantly share code, notes, and snippets.

@localredhead
Forked from diasjorge/custom_functions.el
Created May 31, 2012 05:47
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save localredhead/2841363 to your computer and use it in GitHub Desktop.
Save localredhead/2841363 to your computer and use it in GitHub Desktop.
(defun ruby-generate-tags()
(interactive)
(let ((root (ffip-project-root)))
(let ((my-tags-file (concat root "TAGS")))
(message "Regenerating TAGS file: %s" my-tags-file)
(if (file-exists-p my-tags-file)
(delete-file my-tags-file))
(shell-command
(format "find %s -iname '*.rb' | grep -v db | xargs ctags -a -e -f %s"
root my-tags-file))
(if (get-file-buffer my-tags-file)
(kill-buffer (get-file-buffer my-tags-file)))
(visit-tags-table my-tags-file))))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment