Christopher J. White <orgm...@grierwhite.com> wrote: > So in version 7.8 and earlier, org-version is both a variable and a > function. The function is not useful to coders because it displays > the version string as a message: > > (org-version) > "Org-mode version 7.8.03 (release_7.8.03.437.g60ca.dirty)" > > org-version > "7.8.03" > > I used org-version as a variable because there was an incompatibility > between 7.7 and 7.8 for the function > org-export-remove-or-extract-drawers. > > So, what is the proper way to get the version number in 7.9? It seems > awkward to me that all clients would have to require something other > than just "org" to get the version number, but I can live with that. > > What I don't want to do, though, is mess around with testing for the > existence of various functions and variables just to figure out where > to get the version number from. >
Disregard my previous email: in 7.7 (and maybe 7.8), org-version (the function) does not return a simple "7.7". Here is a snippet of code that works in those two and in 7.9.1 as well: (setq version (if (boundp 'org-version) org-version (org-version)) It does not meet your requirements in the last paragraph above, but it's not too bad. I just hope that I haven't missed anything this time. Nick > Why not just keep the variable org-version around just like in 7.8 and > earlier? > > Otherwise, can someone please post a code snippet that gets me the > version string "7.8.03" that will work with 7.7, 7.8 and 7.9? > > ...cj > > On 9/4/12 6:13 AM, Giovanni Ridolfi wrote: > > Da: Nick Dokos <nicholas.do...@hp.com> > > > > Inviato: Martedì 4 Settembre 2012 14:04 > > > >> Giovanni Ridolfi <giovanni.rido...@yahoo.it> wrote: > >>> Would you please try to add (require 'org-install) instead of (require > >>> 'org) and see if org-toodledo works? > >>> > >>>> As mentioned in one of the above threads, the version of a package is > >>>> pretty fundamental > >>>> and I'd expect it to be provided by the base require. > >>> > >>> The variable org-version *is indeed provided* but not in the file your > >>> code expects it. > >>> > >> Is it? I can only find a function named org-version, not a variable. > > > > Hi, Nick, > > > > you're right, therfore, obviously ;-) I was wrong. > > > > The function is org-version and it gets its arguments from the variables > > org-release > > and > > org-git-version > > defined in the file lisp/org-version.el > > > > thanks for pointing it up. > > > > cheers, > > Giovanni > > > > > > >