From 1226f40c51fd43bb6f90b57a280628eb55f627f2 Mon Sep 17 00:00:00 2001 From: Mitch Tishmack Date: Fri, 27 Feb 2015 15:14:59 -0600 Subject: [PATCH] Drop my own shell hack thing for a package. --- emacs/.emacs.d/emacs.org | 31 +++++++++++-------------------- 1 file changed, 11 insertions(+), 20 deletions(-) diff --git a/emacs/.emacs.d/emacs.org b/emacs/.emacs.d/emacs.org index 3bb6a4a..e425d3b 100644 --- a/emacs/.emacs.d/emacs.org +++ b/emacs/.emacs.d/emacs.org @@ -107,26 +107,6 @@ Make it easier to determine what os we're running on. "Am I running under linux?") #+END_SRC -***** Mac OS X Gui emacs PATH setup - -This is here because if gui emacs gets started say from Finder, one can -end up with missing certain things that aren't in the default PATH. - -The strategy is fire off a $SHELL and have it echo the PATH it has and -then parse that to setup emacs exec-path. - -For now we restrict this only to OSX. It may be more generally useful -however. - -#+BEGIN_SRC emacs-lisp -(defun set-exec-path-from-shell-PATH () - (let ((path-from-shell - (shell-command-to-string "$SHELL -i -c 'echo $PATH'"))) - (setenv "PATH" path-from-shell) - (setq exec-path (split-string path-from-shell path-separator)))) - -(if on-osx (set-exec-path-from-shell-PATH)) -#+END_SRC *** disable pointless startup stuff Like the startup screen and the echo hooey. @@ -494,6 +474,17 @@ Ah Fonts. Let me specify them for gui emacs. All the packages I use. +*** exec-path-from-shell + +Turns out that someone wrote this exact thing already. Yay get to drop my own crap. + +#+BEGIN_SRC emacs-lisp + (use-package exec-path-from-shell + :ensure t + :init (if on-osx (exec-path-from-shell-initialize)) + ) +#+END_SRC + *** expand-region #+BEGIN_SRC emacs-lisp