I am trying to configure git.el. When i do git-status i can see the status buffer with changed i can also add files using 'a' but when i try to commit a file using c writing the commit log and finishing it with C-c C-c gives me
env: git: No such file or directory
error and file is not committed. I am using emacs 23 on OS X. The only customization i added to my .emacs is
(setq exec-path (append exec-path '("/opt/local/bin")) )
because emacs failed to find git executable.
In my .emacs for Mac OS X i have following code:
(when (equal system-type 'darwin)
(setenv "PATH" (concat "/opt/local/bin:/usr/local/bin:" (getenv "PATH")))
(push "/opt/local/bin" exec-path))
It seems, that the problem is, that when you run terminal.app it use your shell initialization file to setup all environment variables, but when you launch Emacs from Dock, then these variables aren't set.
P.S. By the way - there are other packages to work with Git from Emacs - magit, DVC, egg... You can read about them in my article
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With