emacs-orgmode
[Top][All Lists]
Advanced

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

Re: [Orgmode] Re: orgmode and physical fitness training


From: Mikael Fornius
Subject: Re: [Orgmode] Re: orgmode and physical fitness training
Date: Thu, 06 Nov 2008 22:33:19 +0100
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/23.0.60 (gnu/linux)

"Eric Schulte" <address@hidden> writes:

> Mikael Fornius <address@hidden> writes:
>
>> David O'Toole <address@hidden> writes:
>>
>>> Does anyone else here use org-mode for fitness and/or health tracking?
>>
>> I tried column mode but it is far too slow for 300 headings and the
>> calculations possible is only sums but I need much more.
>
> I ran into a very similar issue with column view lately while trying to
> use org-mode to collect experimental results.  I created the attached
> file [...] `org-collector.el' is attached

Thanks alot!

This file is a really good inspiration for me. Especially I did not know
about the power of the function org-map-entries. I will look in to it
deeper.

Because I use a very old laptop I am extra interested in not doing any
unnecessary calculations that slow things down.

When I analyzed the problem with org-columns I noticed that it is the
function org-entry-properties, when looking for inherited tags, who is
one of the most timeconsuming tasks, because of extensive use of
outline-previous-heading.

I was planning to make use of inherited tags in my running data
structure.

So I have experimented with my own recursive headings map function who
caches inherited tags. It is almost working properly now. :-)

I am currently fantasizing about having a "fast access property mirror"
(in memory) of all of the documents headings.

I like collecting notes and numbers of things and it would be nice to
be able too keep numbers and stuff in an unordered manner and be able to
sort out nice tables and statistics about it in a simple way.

Like an agenda for data instead of dates... 

Statistical diary for org-mode?

Every data object can be uniqely identified by the md5-string calculated
between points (outline-back-to-heading) and (outline-next-heading).

This to be sure about that data in memory is up to date with the org
file. (May not really be necessary for all purposes but a thougt.)

Internally the entry properties could be stored like:

((:ORG-DATA-IDENTITY . "dsf76dsliudshgah")
 (:ALLTAGS           . "abc:123:mytag")
 (:TAGS              . "123:mytag")
 (:TIMESTAMP         . (34234 32443))
 (:DIST              . 45)
 (:TIME              . 324)
  ...)

or similar structure in hashtables.
  
The property names is converted to elisp keyword symbols, numeric
values are converted to elisp numbers and timestamp is converted to
emacs internal time format and other time strings to seconds.

This makes it possible to keep track of different data types in an
unordered manner and later get some nice tables and statistics out of
it.

A dblock can be used to get tables of subsets of the data:

#+BEGIN: table :subset-tags (:running :september) :cols (:TIMESTAMP :DIST :TIME)

makes table of running entries in september,

or,

#+BEGIN: table :subset-tags (:temperature (20 35)) :cols (:TIMESTAMP :CELCIUS)

could make a table of all observed temperatures in between 20 and 35
celcius from org file.

This is what I have had working with my running data but in an external
(to org) elisp program.

I experienced problems when I wanted a new datatype it involved a lot of
work to incorporate it in the elisp datastructure.

With org mode properties I hope I can have a fully dynamic data object
definition made "at write time" by the properties.


A lot of thoughts here, any suggestions/reactions/questions are very
welcome!

/Mikael Fornius




reply via email to

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