Skip to content

Instantly share code, notes, and snippets.

@zellyn
Created June 10, 2010 14:34

Revisions

  1. zellyn created this gist Jun 10, 2010.
    8 changes: 8 additions & 0 deletions init.el
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,8 @@
    (let* ((env-output (shell-command-to-string "source .bashrc ; source .emacs.d/emacsenv.sh"))
    (lines (split-string env-output "[\r\n]+" t))
    (regex "^\\([^ ]+\\) \\(.*\\)$")
    (pairs (mapcar (lambda (line)
    (if (string-match regex line)
    (list (match-string 1 line) (match-string 2 line))))
    lines)))
    (mapc (lambda (pair) (apply 'setenv pair)) pairs))