Manish <mailtomanish.sha...@gmail.com> wrote: > On Wed, Aug 19, 2009 at 7:32 PM, Nick Dokos<nicholas.do...@hp.com> wrote: > > Bernt Hansen <be...@norang.ca> wrote: > > > > ... > >> (shell-command (concat "GITDIR=" dir " && git describe --abbrev=4 > >> HEAD")) > > ... > > > > Disclaimer: I touch Windows once a day to check a mail account and > > possibly surf the web - other than that, I'm pretty much at sea in it > > (and I've never used emacs on Windows, let alone install git on it.) > > Please excuse the elementary questions. > > > > How does shell-command work under Windows? > > No idea. > > > What shell is it using? > > Windows has it's own CMD shell (CMD.exe). > > > Is cygwin a prerequisite for it? > > Prerequisite for CMD? No. CMD is native and comes with Windows. > > > Is cygwin a prerequisite for git? > > Native git on Windows was reported to have issues quite sometime back. I read > somewhere that the situation is much better now. Cygwin git has always worked > for me without any issues. >
Manish, Thanks! IIUC, there are then multiple forks in the decision tree: o running on Windows or on something else? o if on Windows, running native or under cygwin? o what shell am I using? cmd.exe and bash under cygwin accept different syntax - in particular, the GITDIR=foo solution of setting env variables has no hope of working under cmd.exe - is that correct? Sounds complicated. Maybe the best solution for now is to punt on the git information on Windows? (when (not (member system-type '(ms-dos windows-nt cygwin))) ...add git info...) What about system-type == "darwin"? Does Bernt's code work there? Thanks, Nick _______________________________________________ Emacs-orgmode mailing list Remember: use `Reply All' to send replies to the list. Emacs-orgmode@gnu.org http://lists.gnu.org/mailman/listinfo/emacs-orgmode