From mboxrd@z Thu Jan 1 00:00:00 1970 From: Manish Subject: Re: [PATCH 0/2] Teach org-version to include git version information Date: Wed, 19 Aug 2009 19:28:44 +0530 Message-ID: References: <1250616163-11733-1-git-send-email-bernt@norang.ca> <4D2E35AC-DBAB-499C-946A-2BB86D6C2AA3@gmail.com> <87tz04yrk0.fsf@gollum.intra.norang.ca> <87prasypiv.fsf@gollum.intra.norang.ca> <87iqgkyoic.fsf@gollum.intra.norang.ca> <87eir8ylni.fsf@gollum.intra.norang.ca> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Return-path: Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1Mdlh1-00024c-01 for emacs-orgmode@gnu.org; Wed, 19 Aug 2009 09:59:11 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1Mdlgw-00022t-7u for emacs-orgmode@gnu.org; Wed, 19 Aug 2009 09:59:10 -0400 Received: from [199.232.76.173] (port=49316 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Mdlgv-00022p-Js for emacs-orgmode@gnu.org; Wed, 19 Aug 2009 09:59:05 -0400 Received: from mail-yx0-f172.google.com ([209.85.210.172]:41406) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1Mdlgu-00052W-RM for emacs-orgmode@gnu.org; Wed, 19 Aug 2009 09:59:05 -0400 Received: by yxe2 with SMTP id 2so5806486yxe.14 for ; Wed, 19 Aug 2009 06:59:04 -0700 (PDT) In-Reply-To: <87eir8ylni.fsf@gollum.intra.norang.ca> 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: Bernt Hansen Cc: emacs-orgmode@gnu.org On Wed, Aug 19, 2009 at 7:02 PM, Bernt Hansen wrote: > Manish writes: > >> On Wed, Aug 19, 2009 at 6:00 PM, Bernt Hansen wrote: >>> Manish, >>> >>> Could you try this patch - does it work? >> >> Patch application fails. =A0I tried with patch -p1 as well. >> >> ,---- >> | [Wed 19 18:47] (2118) ~/elisp/org-mode.git $ git apply >> org-version-patch-by-bernt.patch >> | error: patch failed: lisp/org.el:104 >> | error: lisp/org.el: patch does not apply >> `---- >> >> -- >> Manish > > Can you try evaluating this? and then M-x org-version and report the > results? > > (defun org-version (&optional here) > =A0"Show the org-mode version in the echo area. > With prefix arg HERE, insert it at point." > =A0(interactive "P") > =A0(let* ((org-version org-version) > =A0 =A0 =A0 =A0 (git-version) > =A0 =A0 =A0 =A0 (dir (file-truename (concat (file-name-directory (locate-= library "org")) "../" )))) > =A0 =A0(if (file-exists-p (expand-file-name ".git" dir)) > =A0 =A0 =A0 =A0(progn > =A0 =A0 =A0 =A0 (shell-command (concat "GITDIR=3D" dir " && git describe = --abbrev=3D4 HEAD")) > =A0 =A0 =A0 =A0 (save-excursion > =A0 =A0 =A0 =A0 =A0 (set-buffer "*Shell Command Output*") > =A0 =A0 =A0 =A0 =A0 (goto-char (point-min)) > =A0 =A0 =A0 =A0 =A0 (replace-regexp "-" ".") > =A0 =A0 =A0 =A0 =A0 (goto-char (point-min)) > =A0 =A0 =A0 =A0 =A0 (re-search-forward "[^\n]+") > =A0 =A0 =A0 =A0 =A0 (setq git-version (match-string 0)) > =A0 =A0 =A0 =A0 =A0 (shell-command (concat "GITDIR=3D" dir " && git diff-= index --name-only HEAD --")) > =A0 =A0 =A0 =A0 =A0 (unless (eql 1 (point-max)) > =A0 =A0 =A0 =A0 =A0 =A0 (setq git-version (concat git-version ".dirty"))) > =A0 =A0 =A0 =A0 =A0 (setq org-version (concat org-version " (" git-versio= n ")"))))) > =A0 =A0(let ((version (format "Org-mode version %s" org-version))) > =A0 =A0 =A0(if here (insert version)) > =A0 =A0 =A0(message version) > =A0 =A0 =A0version))) > > -Bernt > Results follows: Org-mode version 6.29trans ('GITDIR' is not recognized as an internal or external command,.dirty) Sorry for the delay.. had to step away for sometime. --=20 Manish