I use OS X 10.8 and I used brew to install a newer version of emacs than the one that comes with OS X.
The new emacs binary is installed in /usr/local/bin (24.2.1), and the old send-with-osx is one in /usr/bin (22.1.1).
I updated the $PATH env variable by adding /usr/local/bin . It works fine in my shell (i.e. typing emacs launches version 24.2.1), but when git opens the editor, the emacs version is 22.1.1.
Should git use $PATH to find the editor I want to use?
Additional Information:
$ type -a emacs emacs is /usr/local/bin/emacs emacs is /usr/bin/emacs emacs is /usr/local/bin/emacs $ env PATH=/usr/local/bin:/usr/local/sbin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin SHELL=/bin/zsh PAGER=most EDITOR=emacs -nw _=/usr/bin/env
Please note that I would prefer not to set the absolute path of my editor directly in my git conf, since I use this conf for multiple systems.
EDIT : Here's a bit of my .zshrc :
# Mac OS X if [ `uname` = "Darwin" ]; then # Brew binaries PATH="/usr/local/bin":"/usr/local/sbin":$PATH else # Everyone else (Linux) # snip fi
So yes, I could add the line export EDITOR='/usr/local/bin emacs -nw' to the first if , but I would like to understand why git not using my PATH variable :)
git editor homebrew path macos
Guillaume algis
source share