From 2670bbb857bf988b320c972f641bb692fc7cf1d9 Mon Sep 17 00:00:00 2001 From: John Doty Date: Tue, 24 May 2016 13:49:25 -0700 Subject: [PATCH] Better path fix on macos --- .emacs.d/core.el | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/.emacs.d/core.el b/.emacs.d/core.el index 0e88496..6fa1741 100644 --- a/.emacs.d/core.el +++ b/.emacs.d/core.el @@ -87,6 +87,8 @@ 'flymake ; Compiling 'flycheck ; Checking + 'exec-path-from-shell ; Fix path on MacOS + 'go-autocomplete ; Autocomplete for golang 'popup ; Pretty completions? @@ -244,10 +246,9 @@ ;; Cleanup all the whitespaces. (add-hook 'before-save-hook 'whitespace-cleanup) -;; On MacOS we need to specify the path to aspell explicitly because PATH is -;; a broken pile of garbage. -(if (file-executable-p "/usr/local/bin/aspell") - (setq ispell-program-name "/usr/local/bin/aspell")) +;; Fix path loading on MacOS X +(when (memq window-system '(mac ns)) + (exec-path-from-shell-initialize)) ;; ================================================================= ;; Text mode configuration.