emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Mikael Fornius <mfo@abc.se>
To: Eric Schulte <schulte.eric@gmail.com>
Cc: emacs-orgmode@gnu.org, David O'Toole <dto@gnu.org>
Subject: Re: Re: orgmode and physical fitness training
Date: Thu, 06 Nov 2008 22:33:19 +0100	[thread overview]
Message-ID: <877i7gmteo.fsf@abc.se> (raw)
In-Reply-To: <87abccu71x.fsf@gmail.com> (Eric Schulte's message of "Thu, 06 Nov 2008 08:56:42 -0800")

"Eric Schulte" <schulte.eric@gmail.com> writes:

> Mikael Fornius <mfo@abc.se> writes:
>
>> David O'Toole <dto@gnu.org> 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	other threads:[~2008-11-06 21:37 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-10-14 14:28 orgmode and physical fitness training David O'Toole
2008-10-14 16:53 ` Nick Dokos
2008-11-05 19:45 ` Mikael Fornius
2008-11-06 16:56   ` Eric Schulte
2008-11-06 21:33     ` Mikael Fornius [this message]
2008-11-07 17:54     ` Mikael Fornius
2008-11-07 18:02       ` Eric Schulte
2008-11-07 20:25         ` Mikael Fornius
2008-11-07 21:25           ` Eric Schulte
2008-11-10  9:29             ` Mikael Fornius
2008-11-07 20:52     ` Carsten Dominik
2008-11-07 21:52       ` Mikael Fornius

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.orgmode.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=877i7gmteo.fsf@abc.se \
    --to=mfo@abc.se \
    --cc=dto@gnu.org \
    --cc=emacs-orgmode@gnu.org \
    --cc=schulte.eric@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).