From ac6e152a33f0b586b005487a655fad859329e7d1 Mon Sep 17 00:00:00 2001 From: Franck Cuny Date: Tue, 1 Aug 2023 16:55:48 -0700 Subject: set the path earlier For some reasons `magit` is picking an incorrect version of `git` otherwise. Change-Id: Icc34a42428a8c32cc37a75d58e0d238383c87083 --- init.org | 24 +++++++++++++----------- 1 file changed, 13 insertions(+), 11 deletions(-) (limited to 'init.org') diff --git a/init.org b/init.org index c440a9a..928d4b4 100644 --- a/init.org +++ b/init.org @@ -1282,10 +1282,23 @@ Enable eglot and tree-sitter when working with python. (setq mac-allow-anti-aliasing t))) #+end_src +** path setup +This needs to be done before we configure =magit=. If done later, on MacOS, and I'm running =nix=, for some reasons emacs try to pick =git= from =/usr/bin/git= instead of =/Users/fcuny/.nix-profile/bin/git=. + +#+begin_src emacs-lisp +(use-package exec-path-from-shell + :ensure t + :demand t + :if (memq window-system '(mac ns)) + :config + (exec-path-from-shell-initialize)) +#+end_src + ** magit #+begin_src emacs-lisp (use-package magit + :defer t :ensure t :bind (("C-x g" . magit-status) ("C-x G" . magit-status-with-prefix)) @@ -1800,17 +1813,6 @@ This is to make =org-mode= document looks a bit nicer. (shell-command-on-region start end "pandoc -f markdown -t org" t t))) #+end_src -** path setup - -#+begin_src emacs-lisp -(use-package exec-path-from-shell - :ensure t - :demand t - :if (memq window-system '(mac ns)) - :config - (exec-path-from-shell-initialize)) -#+end_src - ** project #+begin_src emacs-lisp (use-package project -- cgit v1.2.3