Git can no longer open emacs as its editor
        Posted  
        
            by 
                mwilliams
            
        on Super User
        
        See other posts from Super User
        
            or by mwilliams
        
        
        
        Published on 2011-01-13T15:54:54Z
        Indexed on 
            2011/01/13
            16:55 UTC
        
        
        Read the original article
        Hit count: 325
        
I'm running Git version 1.7.3.2 that I built from source, zsh is my shell, and emacs is my editor.
Recently I started seeing the following:
/usr/local/Cellar/git/1.7.3.2/libexec/git-core/git-sh-setup: line 106: emacs: command not found
Could not execute editor
My zshrc looks like the following so I can use the Cocoa build and the console binary provided with it.
EMACS_HOME="/Applications/Emacs.app/Contents/MacOS"                                                                                                                               
function e()  { PATH=$EMACS_HOME/bin:$PATH $EMACS_HOME/Emacs -nw $@ }                                                                                                             
function ec() { PATH=$EMACS_HOME/bin:$PATH emacsclient -t $@ }                                                                                                                    
function es() { e --daemon=$1 && ec -s $1 }                                                                                                                                       
function el() { ps ax|grep Emacs }                                                                                                                                                
function ek() { $EMACS_HOME/bin/emacsclient -e '(kill-emacs)' -s $1 }                                                                                                             
function ecompile() {                                                                                                                                                             
   e -eval "(setq load-path (cons (expand-file-name \".\") load-path))" \                                                                                                         
       -batch -f batch-byte-compile $@                                                                                                                                            
}                                                                                                                                                                                 
alias emacs=e                                                                                                                                                                     
alias emacsclient=ec
And I also have
export EDITOR="emacs"
and have tried adding
export GIT_EDITOR="emacs" 
(and swapping that out with "e")
But whatever I try I can't get git to open emacs whenever I need to do a commit or an interactive rebase, etc etc...
© Super User or respective owner