Skip to content

Instantly share code, notes, and snippets.

@spacebat
Created January 27, 2013 01:30
Show Gist options
  • Save spacebat/4645723 to your computer and use it in GitHub Desktop.
Save spacebat/4645723 to your computer and use it in GitHub Desktop.
Ignore version numbers in ELPA package directories. Also gists are not displaying as the language that I indicate :(
(defun package-dirs (package-name)
"Ignore version numbers in ELPA package directories"
(let ((regex (concat "^" package-name "-.*")))
(mapcar (lambda (x) (concat package-user-dir "/" x))
(remove-if-not (lambda (x) (string-match regex x))
(directory-files package-user-dir)))))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment