org-mode/UTILITIES
Achim Gratz e7d2e4e186 ensure that M-x org-version always delivers something useful
* UTILITIES/org-fixup.el (org-make-org-version): change defconst to
  defun for org-release and org-git-version and close over those
  variables (do not make them global anymore).

* UTILITIES/org-fixup.el (org-fixup): check for org-version.el or try
  to use git to get the version from the worktree (code uses parts of
  the former implementation from org.el).

* lisp/org.el (org-version): use functions instead of global variables
  to get the version strings and remove the defvaralias to
  org-version.  Warn when encountering a mixed installation (org and
  org-install.el should be found in the same directory).

Supported use-cases:

1) Org uninstalled (and possibly uncompiled) from Git or tarball.

1a) No org-version.el or org-install.el exists in worktree.  Partially
supported configuration, org version is determined from git if
possible via UTILITIES/org-fixup.el.  However, Emacs versions
delivered with orgmode will provide autoloads that may or may not work
with that version of org (mixed installation).  If such a situation is
encountered, warn the user.  It can work if the autoloads from the
installation match the ones that would be generated for the worktree,
which generelly is only the case if there is a relatively recent
installation in site-lisp.

1b) Autoload file org-install.el exists in worktree.  Fully supported
configuration, org version is determined from git if possible via
UTILITIES/org-fixup.el.

1c) Both org-version.el or org-install.el exist in worktree.
Recommended configuration for 1), org version is taken from
org-version.el (git never gets invoked).

2) Org installed.  Both org-version.el and org-install.el must exist
in install directory.  Only supported configuration for 2), org
version is taken from org-version.el (git never gets invoked since
UTILITIES/org-fixup.el is not available).

Any unsupported configuration should still yield a version string, but
it will contain "N/A" to alert the user about a botched org
installation.
2012-05-18 07:45:45 +02:00
..
fake_change_log.pl Intermediate state, I am just trying comiting now. 2008-01-31 16:04:26 +01:00
git-changelog Update git-changelog by John Wiegley 2010-07-07 08:37:11 +02:00
gplmanual.pl Put the examples in the manual under GPL. 2008-06-16 17:05:31 +02:00
guidesplit.pl Fix manual and guide tools to remove broken links 2010-07-19 19:00:24 +02:00
list-hooks.pl Utilities: New perl program to extract hooks 2009-01-01 09:54:13 +01:00
make_emacs_changelog keep Emacs' Changelog clean 2012-04-20 21:04:08 +02:00
manfull.pl UTILITIES/manfull.pl: mention http://orgmode.org 2012-04-30 18:28:31 +02:00
mansplit.pl UTILITIES/mansplit.pl: mention http://orgmode.org 2012-04-30 18:30:13 +02:00
org-fixup.el ensure that M-x org-version always delivers something useful 2012-05-18 07:45:45 +02:00
orgcard2txt.pl Make update of ascii refcard auomatic 2010-05-12 16:22:06 +02:00
pw UTILITIES/pw: Fix type in error message 2012-03-20 02:39:33 +01:00
set-version.pl set-version.pl: don't set current version in ORGWEBPAGE/index.org 2011-01-09 18:43:40 +01:00
x11idle.c Add an X11 equivalent to org-mac-idle-seconds. 2009-10-22 15:09:34 +02:00