From mboxrd@z Thu Jan 1 00:00:00 1970 From: Achim Gratz Subject: Re: [PATCH] org version under Windows 7 Date: Wed, 11 Jul 2012 19:43:36 +0200 Message-ID: <87ehoiyz07.fsf@Rainer.invalid> References: <1342018996.75825.YahooMailNeo@web29804.mail.ird.yahoo.com> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" Return-path: Received: from eggs.gnu.org ([208.118.235.92]:42633) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Sp0xM-0008FR-B4 for emacs-orgmode@gnu.org; Wed, 11 Jul 2012 13:44:12 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Sp0xK-00006C-PK for emacs-orgmode@gnu.org; Wed, 11 Jul 2012 13:44:08 -0400 Received: from plane.gmane.org ([80.91.229.3]:55813) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Sp0xK-00005u-IY for emacs-orgmode@gnu.org; Wed, 11 Jul 2012 13:44:06 -0400 Received: from list by plane.gmane.org with local (Exim 4.69) (envelope-from ) id 1Sp0xH-0002zW-Cs for emacs-orgmode@gnu.org; Wed, 11 Jul 2012 19:44:03 +0200 Received: from pd9eb5791.dip.t-dialin.net ([217.235.87.145]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Wed, 11 Jul 2012 19:44:03 +0200 Received: from Stromeko by pd9eb5791.dip.t-dialin.net with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Wed, 11 Jul 2012 19:44:03 +0200 List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: emacs-orgmode@gnu.org --=-=-= Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Giovanni Ridolfi writes: > 1   I downloaded from http://orgmode.org/w/org-mode.git >     the last git snapshot (c75120aa71257604....) Jason, it would be quite useful if the Git snapshots would include both org-install.el and org-version.el — is it perhaps possible to sneak a "make autoloads" into the script that creates those? Bastien, here's a patch that allows to override the version strings more easily. You'd then eval this form: (let ((org-fake-release "7.8.11") (org-fake-git-version "7.8.11-fake")) (org-make-autoloads)) either from the scratch buffer or the command line. I'll update org hacks with the instructions when you have installed the patch. --=-=-= Content-Type: text/x-patch Content-Disposition: inline; filename=0001-Let-the-user-override-the-version-strings-produced-i.patch Content-Description: override version strings >From 5805109804bc55ef6bf079366dfd24fb928377c3 Mon Sep 17 00:00:00 2001 From: Achim Gratz Date: Wed, 11 Jul 2012 19:32:33 +0200 Subject: [PATCH] Let the user override the version strings produced in org-fixup. * UTILITIES/org-fixup.el (org-fixup): Let the user override the version strings produced in org-fixup whith strings stored in org-fake-release and org-fake-git-version. Skip loading them from a pre-existing org-version.el or trying to determine them from git in this case. This is predominantly useful if Git is not available, but the user wants to install from a Git tarball which is missing a pre-configured org-version.el file. --- UTILITIES/org-fixup.el | 37 +++++++++++++++++++++---------------- 1 file changed, 21 insertions(+), 16 deletions(-) diff --git a/UTILITIES/org-fixup.el b/UTILITIES/org-fixup.el index 1e03801..20613d2 100644 --- a/UTILITIES/org-fixup.el +++ b/UTILITIES/org-fixup.el @@ -140,22 +140,27 @@ (defmacro org-fixup () (dirgit (concat dirorg ".git/" )) (org-version "N/A-fixup") (org-git-version "N/A-fixup !!check installation!!")) - (if (load (concat dirlisp "org-version.el") 'noerror 'nomessage 'nosuffix) - (setq org-version (org-release) - org-git-version (org-git-version)) - (when (and (file-exists-p dirgit) - (executable-find "git")) - (unwind-protect - (progn - (cd dirorg) - (let ((git6 (substring (shell-command-to-string "git describe --abbrev=6 HEAD") 0 -1)) - (git0 (substring (shell-command-to-string "git describe --abbrev=0 HEAD") 0 -1)) - (gitd (string-match "\\S-" (shell-command-to-string "git status -uno --porcelain")))) - (setq org-git-version (concat git6 (when gitd ".dirty"))) - (if (string-match "^release_" git0) - (setq org-version (substring git0 8)) - (setq org-version git0)))) - (cd origin)))) + (if (and (boundp 'org-fake-release) (stringp org-fake-release) + (boundp 'org-fake-git-version) (stringp org-fake-git-version)) + (setq org-version org-fake-release + org-git-version org-fake-git-version) + (if (load (concat dirlisp "org-version.el") 'noerror 'nomessage 'nosuffix) + (setq org-version (org-release) + org-git-version (org-git-version)) + (when (and (file-exists-p dirgit) + (executable-find "git")) + (unwind-protect + (progn + (cd dirorg) + (let ((git6 (substring (shell-command-to-string "git describe --abbrev=6 HEAD") 0 -1)) + (git0 (substring (shell-command-to-string "git describe --abbrev=0 HEAD") 0 -1)) + (gitd (string-match "\\S-" + (shell-command-to-string "git status -uno --porcelain")))) + (setq org-git-version (concat git6 (when gitd ".dirty"))) + (if (string-match "^release_" git0) + (setq org-version (substring git0 8)) + (setq org-version git0)))) + (cd origin))))) `(progn (defun org-release () ,org-version) (defun org-git-version () ,org-git-version) -- 1.7.10.4 --=-=-= Content-Type: text/plain Regards, Achim. -- +<[Q+ Matrix-12 WAVE#46+305 Neuron microQkb Andromeda XTk Blofeld]>+ Waldorf MIDI Implementation & additional documentation: http://Synth.Stromeko.net/Downloads.html#WaldorfDocs --=-=-=--