Created
January 14, 2011 07:41
-
-
Save dreid/779324 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(defun add-to-PATH (dir) | |
"Add the specified path element to the Emacs PATH" | |
(interactive "DEnter directory to be added to PATH: ") | |
(if (file-directory-p dir) | |
(setenv "PATH" | |
(concat (expand-file-name dir) | |
path-separator | |
(getenv "PATH"))))) | |
(defun activate-virtualenv (dir) | |
(setenv "VIRTUAL_ENV" dir) | |
(add-to-PATH (concat dir "/bin")) | |
(add-to-list 'exec-path (concat dir "/bin"))) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment