From mboxrd@z Thu Jan 1 00:00:00 1970 From: Nick Dokos Subject: Re: [PATCH 0/2] Teach org-version to include git version information Date: Wed, 19 Aug 2009 10:29:40 -0400 Message-ID: <10437.1250692180@gamaville.dokosmarshall.org> References: <1250616163-11733-1-git-send-email-bernt@norang.ca> <87tz04yrk0.fsf@gollum.intra.norang.ca> <87prasypiv.fsf@gollum.intra.norang.ca> <87iqgkyoic.fsf@gollum.intra.norang.ca> <87eir8ylni.fsf@gollum.intra.norang.ca> <10259.1250690543@gamaville.dokosmarshall.org> Reply-To: nicholas.dokos@hp.com Return-path: Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1MdmC6-0004sj-RL for emacs-orgmode@gnu.org; Wed, 19 Aug 2009 10:31:19 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1MdmC1-0004nD-GB for emacs-orgmode@gnu.org; Wed, 19 Aug 2009 10:31:18 -0400 Received: from [199.232.76.173] (port=34247 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1MdmC1-0004n1-2R for emacs-orgmode@gnu.org; Wed, 19 Aug 2009 10:31:13 -0400 Received: from vms173001pub.verizon.net ([206.46.173.1]:48377) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1MdmC0-0001rR-O5 for emacs-orgmode@gnu.org; Wed, 19 Aug 2009 10:31:12 -0400 Received: from gamaville.dokosmarshall.org ([98.110.172.159]) by vms173001.mailsrvcs.net (Sun Java(tm) System Messaging Server 6.3-7.04 (built Sep 26 2008; 32bit)) with ESMTPA id <0KOM00L1IO91LPH0@vms173001.mailsrvcs.net> for emacs-orgmode@gnu.org; Wed, 19 Aug 2009 09:29:31 -0500 (CDT) In-reply-to: Message from Manish of "Wed, 19 Aug 2009 19:46:48 +0530." List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: Manish Cc: Bernt Hansen , emacs-orgmode@gnu.org Manish wrote: > On Wed, Aug 19, 2009 at 7:32 PM, Nick Dokos wrote: > > Bernt Hansen 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