emacs-orgmode
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [O] can't find org-version?


From: Nick Dokos
Subject: Re: [O] can't find org-version?
Date: Tue, 04 Sep 2012 10:59:41 -0400

Christopher J. White <address@hidden> 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:
> 

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)"
> 
> 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.
> 
> 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 <address@hidden>
> >
> > Inviato: Martedì 4 Settembre 2012 14:04
> >
> >> Giovanni Ridolfi <address@hidden> 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
> >
> >
> >
> 



reply via email to

[Prev in Thread] Current Thread [Next in Thread]