From mboxrd@z Thu Jan 1 00:00:00 1970 From: Nick Dokos Subject: Re: can't find org-version? Date: Tue, 04 Sep 2012 13:15:32 -0400 Message-ID: <7390.1346778932@alphaville.americas.hpqcorp.net> References: <878vcrkbuu.fsf@jnanam.net> <1346657034.96590.YahooMailNeo@web29806.mail.ird.yahoo.com> <5044C335.4090004@grierwhite.com> <1346757283.96924.YahooMailNeo@web29806.mail.ird.yahoo.com> <5685.1346760278@alphaville> <1346764390.60712.YahooMailNeo@web29805.mail.ird.yahoo.com> <5046117B.9050400@grierwhite.com> Reply-To: nicholas.dokos@hp.com Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Return-path: Received: from eggs.gnu.org ([208.118.235.92]:40949) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1T8wj3-00050r-7Y for emacs-orgmode@gnu.org; Tue, 04 Sep 2012 13:15:51 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1T8wiv-0002lG-DS for emacs-orgmode@gnu.org; Tue, 04 Sep 2012 13:15:45 -0400 Received: from g4t0016.houston.hp.com ([15.201.24.19]:8403) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1T8wiv-0002kv-6i for emacs-orgmode@gnu.org; Tue, 04 Sep 2012 13:15:37 -0400 In-Reply-To: Message from "Christopher J. White" of "Tue\, 04 Sep 2012 07\:34\:35 PDT." <5046117B.9050400@grierwhite.com> 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: orgmode@grierwhite.com Cc: emacs-orgmode@gnu.org Christopher J. White 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: >=20 > (org-version) > "Org-mode version 7.8.03 (release_7.8.03.437.g60ca.dirty)" >=20 > org-version > "7.8.03" >=20 > 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. >=20 > 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. >=20 > 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. >=20 Disregard my previous email: in 7.7 (and maybe 7.8), org-version (the funct= ion) 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? >=20 > 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? >=20 > ...cj >=20 > On 9/4/12 6:13 AM, Giovanni Ridolfi wrote: > > Da: Nick Dokos > > > > Inviato: Marted=C3=AC 4 Settembre 2012 14:04 > > > >> Giovanni Ridolfi wrote: > >>> Would you please try to add (require 'org-install) instead of (requir= e 'org) and see if org-toodledo works? > >>> > >>>> As mentioned in one of the above threads, the version of a package i= s 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 you= r 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 variabl= es > > org-release > > and > > org-git-version > > defined in the file lisp/org-version.el > > > > thanks for pointing it up. > > > > cheers, > > Giovanni > > > > > > >=20