From mboxrd@z Thu Jan 1 00:00:00 1970 From: Mikael Fornius Subject: Re: Re: orgmode and physical fitness training Date: Thu, 06 Nov 2008 22:33:19 +0100 Message-ID: <877i7gmteo.fsf@abc.se> References: <1223994514.15613.17.camel@monad.lab> <87abceez2z.fsf@abc.se> <87abccu71x.fsf@gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Return-path: Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1KyCXX-0007sK-6L for emacs-orgmode@gnu.org; Thu, 06 Nov 2008 16:37:19 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1KyCXU-0007qe-Et for emacs-orgmode@gnu.org; Thu, 06 Nov 2008 16:37:17 -0500 Received: from [199.232.76.173] (port=60217 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1KyCXU-0007qT-BQ for emacs-orgmode@gnu.org; Thu, 06 Nov 2008 16:37:16 -0500 In-Reply-To: <87abccu71x.fsf@gmail.com> (Eric Schulte's message of "Thu, 06 Nov 2008 08:56:42 -0800") List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: Eric Schulte Cc: emacs-orgmode@gnu.org, David O'Toole "Eric Schulte" writes: > Mikael Fornius writes: > >> David O'Toole 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