On Fri, Dec 10, 2010 at 6:24 AM, Steve Purcell <st...@sanityinc.com> wrote: >> If you have issues with emacs failing to pick up the right executables, > you can use the following nifty trick to ensure Emacs' $PATH matches the > one you've configured for Bash in Terminal: > > (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 window-system (set-exec-path-from-shell-PATH)) > > > -Steve
This was a huge help for me, but I had to replace the "-i" flag with "--login" in order to fully replicate my path that I see in Terminal. I have a few things set in /etc/paths.d (TeX, X11, and git, specifically), and these get added into the path using Apple's /usr/libexec/path_helper command, but only for login shells. If I use "-i", I'll get path settings from my ~/.bashrc file, but nothing from /etc/paths.d. If I use "--login", I get path settings from ~/.bash_profile and /etc/paths.d. I source ~/.bashrc from ~/.bash_profile, so that gets me everything I need. (PS: I'm running GNU Emacs 23.2 on Snow Leopard 10.6.4) Just FYI. -- You received this message because you are subscribed to the Google Groups "Clojure" group. To post to this group, send email to clojure@googlegroups.com Note that posts from new members are moderated - please be patient with your first post. To unsubscribe from this group, send email to clojure+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/clojure?hl=en