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 10:59:41 -0400 Message-ID: <4419.1346770781@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]:50774) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1T8ubX-0003np-47 for emacs-orgmode@gnu.org; Tue, 04 Sep 2012 10:59:52 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1T8ubS-0006O6-7A for emacs-orgmode@gnu.org; Tue, 04 Sep 2012 10:59:51 -0400 Received: from g5t0007.atlanta.hp.com ([15.192.0.44]:47537) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1T8ubS-0006O1-1x for emacs-orgmode@gnu.org; Tue, 04 Sep 2012 10:59:46 -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 Not so: there are three optional arguments - if the last one is nil (or not provided), no message is printed in the echo area. The others control whether to insert the string at point and whether to use the abbreviated version or the full git version. So just add one of the following at the beginning of org-toodledo and you should be set: (setq org-version (org-version)) or (setq org-version (org-version nil t)) depending on what string you want. Nick > (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 > 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