Sunday, February 13, 2011

Git for Windows and Emacs Part 2

I like to have the text and bin utils available when editing in GNU Emacs on windows.  That will allow me to use ediff, directory compare, and grep without any problems.  I used to install GnuWin32 for this purpose, but I found that the windows version of Gitmysysgit, will provide all the necessary commands.  If I am doing Git commits or other work I still do that outside of emacs in the git shell (see Part 1).

On windows, to use mysysgit with emacs, I start up emacs with a shortcut that runs a bat file.  Here are the contents of one I named 'gitemacs.bat' that sets the path and starts emacs:

C:\WINDOWS\system32\cmd.exe /c ""C:\Program Files\Git\bin\sh.exe" --login -i -t -c runemacs.exe"

KNOWN ISSUE: When I try to run make with a cross compiler from within Emacs with compile-command, I get this an error:
/usr/bin/sh: -c: line 1: syntax error: unexpected end of file

TODO: Improve git command usage from within Emacs possibly by using git.el and git-mswin.el

No comments: