emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* orgmode and physical fitness training
@ 2008-10-14 14:28 David O'Toole
  2008-10-14 16:53 ` Nick Dokos
  2008-11-05 19:45 ` Mikael Fornius
  0 siblings, 2 replies; 13+ messages in thread
From: David O'Toole @ 2008-10-14 14:28 UTC (permalink / raw)
  To: emacs-orgmode

Recently I hired a personal trainer to manage my strength training
program. There is a lot of data to keep track of:

  1. timestamped records of what I eat --- these are reviewed by my
trainer and I want to go back and annotate things that i should cut out.
It will also be useful to look these up later for meal ideas. 
  2. appointments with my trainer
  3. flexible "appointments" where I plan to go to the gym at a certain
hour... is there any way to get org to send SMS messages to my phone?
  4. payments due to the gym and trainer
  5. other spending (items like gloves, shoes)
  6. my weight, measurements, and body fat percentage 
  7. medications and/or supplements
  8. sleep log (i have issues with my sleep cycle and this is very
important for recovery after exercise.)

I'd like to use org-mode to increase my grasp of the situation and
measure my progress objectively. Does anyone else here use org-mode for
fitness and/or health tracking? I would be interested to hear people's
stories or suggestions. I'm guessing I should use the spreadsheet
feature for the weight/measurements/bodyfat stuff. So I will have to
finally learn that part of org :)

I'll try to hammer out my own configuration and post any relevant
snippets. 

^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: orgmode and physical fitness training
  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
  1 sibling, 0 replies; 13+ messages in thread
From: Nick Dokos @ 2008-10-14 16:53 UTC (permalink / raw)
  To: David O'Toole; +Cc: emacs-orgmode

David O'Toole <dto@gnu.org> wrote:

> Recently I hired a personal trainer to manage my strength training
> program. There is a lot of data to keep track of:
> 
> ...
>   3. flexible "appointments" where I plan to go to the gym at a certain
> hour... is there any way to get org to send SMS messages to my phone?
> ...

I think most (all?) carriers provide the capability to send SMS messages
through email. E.g. on Verizon Wireless, I can send an SMS message to 
somebody through email by using the address

        <Mobile#>@vtext.com

Your provider's website should have the details.

That should be easy to set up with org or cron.

Nick

^ permalink raw reply	[flat|nested] 13+ messages in thread

* RE: orgmode and physical fitness training
@ 2008-10-17 22:36 David O'Toole
  0 siblings, 0 replies; 13+ messages in thread
From: David O'Toole @ 2008-10-17 22:36 UTC (permalink / raw)
  To: emacs-orgmode

[-- Attachment #1: Type: text/plain, Size: 326 bytes --]

I've started a basic "training.org" file and added some data. So far I
can get a nice columns view of my weight and body-fat percentage. There
is much more to be done (in particular tracking poundages) but perhaps
others will have responses or suggestions. I'll continue posting tidbits
as I move more of this to org-mode. 



[-- Attachment #2: training.org --]
[-- Type: text/plain, Size: 2075 bytes --]

#+TAGS: workout food trainer payment equipment supplements
#+COLUMNS: %25ITEM %weight %bodyfat %TODO %TAGS

* <2008-09-26 Fri>
  :PROPERTIES:
:weight: 266
:bodyfat: 31.0
:END:

* <2008-10-08 Wed>
  :PROPERTIES:
:weight: 261
:bodyfat: 29.7
:arm: 14.75
:waist: 47.5
:chest: 50.25
:hips: 47.25
:leg: 25.5
  :END:

* <2008-10-16 Thu>
  :PROPERTIES:
:weight: 263
  :END:

** <2008-10-16 Thu 08:30>			  :workout:trainer:

 cardio, pushups, situps, russian twist, preacher curls
 (what else to write down here?) notebook?

** <2008-10-16 Thu 13:12>				   :food:

 1 can tuna fish 
   + 2 tbsp mayo
   + 2 tbsp relish
   + 4 slices lo-carb (8g/slice) bread
 1 glass skim milk
 1 slice cheddar cheese
 1 coffee
 1 handful cashews

 (am i eating too much fat?)

** <2008-10-16 Thu 16:26>				   :food:

 1 milkshake (2 cups 2% milk, 1/4 cup yogurt, 1 ripe banana, 
          2 tbsp peanut butter)
 2 slices beef bologna

* <2008-10-17 Fri>

** <2008-10-17 Fri 03:36>				   :food:

 1 slice lo-carb whole wheat bread
   + 2 tbsp peanut butter
 2 handfuls cashews
 2 fish filets
 1 bowl raisin bran

** <2008-10-17 Fri 08:47>				   :food:

 1/2 cup cottage cheese

** <2008-10-17 Fri 11:46>				   :food:

 3 fried eggs (with 1 tbsp olive oil)
 1 handful cashews
 
** <2008-10-17 Fri 14:09>				   :food:

 1 glass 2% milk 
   + 1 teaspoon flax oil (read about this in a book?
 3 slices ham
 1 slice sharp cheddar cheese

** <2008-10-17 Fri 17:02>				   :food:

 1 glass 2% milk
 1 slice lo-carb whole wheat bread 
   + 2 tbsp peanut butter
 1 spinach salad 
   + 1/2 tbsp olive oil
   + 2 tbsp balsamic vinegar
 
* Scheduling

** TODO	Discuss solo workout scheduling 		:trainer:
** TODO Figure out org recurring tasks

** TODO Workout					   :workout:solo:
SCHEDULED: <2008-10-18 08:30 Sat>

** TODO PT Session 				  :trainer:workout:
SCHEDULED: <2008-10-21 Tue 08:30>

** TODO PT Session 				  :trainer:workout:
SCHEDULED: <2008-10-23 Thu 08:30>

** TODO Pay $400.00 					:payment:
DEADLINE: <2008-10-23 Thu>

* Tasks

** DONE buy flaxseed oil and fish oil
CLOSED: [2008-10-17 Fri 14:13]

[-- Attachment #3: Type: text/plain, Size: 204 bytes --]

_______________________________________________
Emacs-orgmode mailing list
Remember: use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode

^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: orgmode and physical fitness training
  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
  1 sibling, 1 reply; 13+ messages in thread
From: Mikael Fornius @ 2008-11-05 19:45 UTC (permalink / raw)
  To: David O'Toole; +Cc: emacs-orgmode

David O'Toole <dto@gnu.org> writes:

> Does anyone else here use org-mode for fitness and/or health tracking?

I have used emacs as my running exercise diary for some years now,
currently over 300 exercises in the database.

From the beginning I used a plain text emacs file for my exercise diary
entries.

Later I began to use org-mode for its folding and table features. I then
made my own elisp files for maintaining a database of all my org-mode
running diary entries in parallell.

When I made a new run a insert it with a command both in org-mode file
(as a heading with proerties) and in a separate data file.

I can use my own functions to get statistical tables of my training in
month och week tables.

The data is sorted in a special tree structure for fast lookup of
special heart-rate intervals or exercise types.

With point on a exercise entry I can get a colorized table fast in other
window with other runs with similar result too compare and eventually
see some progress.

Lately I have been thinking of and trying to implement a true org-mode
running diary. Which means to use the org-mode file as raw-data file
(properties) instead of my parallell sexp-assoc-list-elisp-data-file.

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.

This is how my diary can look like:

----
** 2008
*** 2008-10                                   :october:
*** 2008-11                                   :november:
**** <2008-11-01 sat>                         :running:hill:
**** <2008-11-02 sun>                         :skiing:alpine:
**** <2008-11-04 tue>                         :running:lake:
     :PROPERTIES:
     :TIME:      27:34
     :DISTANCE:  6.0
     :HEARTRATE:     169
     :MAXHEARTRATE:  183
     :PACE: 4:36
     :SHAPEINDEX:  -8.4%
     :WEATHER: +5 cloudy
     :CALORIES: 370
     :SHOES:     nb858-1
     :STATFLAG: t
     :END:
Strong legs but high heartrate.
----

Then I also have a calendar section and a statistical table section with
dynamic blocks for statistics of certain running routes,
year/month stats or record tables.

I will post here if I manage to make a nice fast org-data mapping from
headline-properties to assoc-lists or hash-tables together with some
nice table-creating functions.

Thanks alot for org-mode!

It is so flexible and clean. I also use it as a agenda planner,
time-tracker and notebook.

/Mikael Fornius

^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: Re: orgmode and physical fitness training
  2008-11-05 19:45 ` Mikael Fornius
@ 2008-11-06 16:56   ` Eric Schulte
  2008-11-06 21:33     ` Mikael Fornius
                       ` (2 more replies)
  0 siblings, 3 replies; 13+ messages in thread
From: Eric Schulte @ 2008-11-06 16:56 UTC (permalink / raw)
  To: Mikael Fornius; +Cc: emacs-orgmode, David O'Toole

[-- Attachment #1: Type: text/plain, Size: 1161 bytes --]

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?
[...]
> Lately I have been thinking of and trying to implement a true org-mode
> running diary. Which means to use the org-mode file as raw-data file
> (properties) instead of my parallell sexp-assoc-list-elisp-data-file.
>
> 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.
>

Hi Mikael,

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, which can be used to collect data from properties in a manner
similar to column view, but using a simpler method meant only for table
display, rather than column viewing, and allowing for the application of
general elisp to the values before they are dumped into the table.  I
think it would work in your case as well.

I applied it to the data you posted with the following results.  The
mechanics are working, but it could use some display cleaning.  The file
`org-collector.el' is attached


[-- Attachment #2: org-collector.el --]
[-- Type: application/emacs-lisp, Size: 3883 bytes --]

[-- Attachment #3: Type: text/plain, Size: 1971 bytes --]


and is available at http://github.com/eschulte/org-contrib/tree/master

Best -- Eric

** exercise
#+BEGIN: propview :id "nov" :cols (ITEM TIME DISTANCE (/ DISTANCE TIME) HEARTRATE)
| "ITEM"                                                     | "TIME" | "DISTANCE" | "(/ DISTANCE TIME)" | "HEARTRATE" |
|------------------------------------------------------------+--------+------------+---------------------+-------------|
| "<2008-11-01 sat>                         :running:hill:"  |     20 |        3.0 |                0.15 |         169 |
| "<2008-11-02 sun>                         :skiing:alpine:" |     27 |        4.0 | 0.14814814814814814 |         198 |
| "<2008-11-04 tue>                         :running:lake:"  |     27 |        6.0 |  0.2222222222222222 |         169 |
|                                                            |        |            |                     |             |
#+END:

*** 2008-11                                   :november:
      :PROPERTIES:
      :ID:       nov
      :END:

**** <2008-11-01 sat>                         :running:hill:
     :PROPERTIES:
     :TIME:      20:08
     :DISTANCE:  3.0
     :HEARTRATE:     169
     :MAXHEARTRATE:  183
     :PACE: 4:36
     :SHAPEINDEX:  -8.4%
     :WEATHER: +5 cloudy
     :CALORIES: 370
     :SHOES:     nb858-1
     :STATFLAG: t
     :END:

**** <2008-11-02 sun>                         :skiing:alpine:
     :PROPERTIES:
     :TIME:      27:34
     :DISTANCE:  4.0
     :HEARTRATE:     198
     :MAXHEARTRATE:  145
     :PACE: 4:36
     :SHAPEINDEX:  -8.4%
     :WEATHER: +5 cloudy
     :CALORIES: 370
     :SHOES:     nb858-1
     :STATFLAG: t
     :END:

**** <2008-11-04 tue>                         :running:lake:
     :PROPERTIES:
     :TIME:      27:34
     :DISTANCE:  6.0
     :HEARTRATE:     169
     :MAXHEARTRATE:  183
     :PACE: 4:36
     :SHAPEINDEX:  -8.4%
     :WEATHER: +5 cloudy
     :CALORIES: 370
     :SHOES:     nb858-1
     :STATFLAG: t
     :END:

[-- Attachment #4: Type: text/plain, Size: 204 bytes --]

_______________________________________________
Emacs-orgmode mailing list
Remember: use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode

^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: Re: orgmode and physical fitness training
  2008-11-06 16:56   ` Eric Schulte
@ 2008-11-06 21:33     ` Mikael Fornius
  2008-11-07 17:54     ` Mikael Fornius
  2008-11-07 20:52     ` Carsten Dominik
  2 siblings, 0 replies; 13+ messages in thread
From: Mikael Fornius @ 2008-11-06 21:33 UTC (permalink / raw)
  To: Eric Schulte; +Cc: emacs-orgmode, David O'Toole

"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

^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: orgmode and physical fitness training
  2008-11-06 16:56   ` Eric Schulte
  2008-11-06 21:33     ` Mikael Fornius
@ 2008-11-07 17:54     ` Mikael Fornius
  2008-11-07 18:02       ` Eric Schulte
  2008-11-07 20:52     ` Carsten Dominik
  2 siblings, 1 reply; 13+ messages in thread
From: Mikael Fornius @ 2008-11-07 17:54 UTC (permalink / raw)
  To: Eric Schulte; +Cc: David O'Toole, emacs-orgmode

[-- Attachment #1: Type: text/plain, Size: 1795 bytes --]

Thanks for org-collector.el, now I have read it and tried it out.

It is very nice to have the possibility to evaluate lisp expressions as
values, that is something missing in org-columns!

But it was only a few seconds faster than column-view and column dblock
and therefore not fast enough for my slow computer ;-). I timed it to 62
seconds to insert exercise data table for one year (83 headings) with 4
columns and no calculations.

* ELP Profiling Results 

|---------------------------+-------+--------------+--------------|
| org-dblock-write:propview |     1 |    62.158395 |    62.158395 |
| org-propview-collect      |     1 |    60.578724 |    60.578724 |
| org-map-entries           |     1 |    60.519551 |    60.519551 |
| org-scan-tags             |     1 |    60.267157 |    60.267157 |
| org-entry-properties      |    94 | 57.451918999 | 0.6111906276 |
| org-get-tags-at           |    94 | 54.069399999 | 0.5752063829 |
| org-up-heading-all        |   365 | 53.664638999 | 0.1470264082 |
| outline-up-heading        |   365 |    53.647627 |    0.1469798 |
| outline-previous-heading  | 29751 | 39.418412999 | 0.0013249441 |
| org-outline-level         | 30306 | 6.0971540000 | 0.0002011863 |
| org-split-string          |   555 | 2.0629750000 | 0.0037170720 |
|---------------------------+-------+--------------+--------------|

It is clear from above who is the time thief.

* Comment

It did not work at first because sometimes I have properties without
values, they then gets the empty string assigned, "".

I had to adjust function org-read-prop because in my emacs (GNU Emacs
23.0.60.5):

(stringp "")           -> t

and

(string-to-number "")  -> 0
(string-to-number "0") -> 0

and then at line 34 it tries to take substring out of "".

Attaches diff if interested :-)

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: org-collector.diff --]
[-- Type: text/x-patch, Size: 1441 bytes --]

*** /home/mfo/org/org-collector.el~	2008-11-07 17:19:12.000000000 +0100
--- /home/mfo/org/org-collector.el	2008-11-07 18:14:23.000000000 +0100
***************
*** 27,45 ****
  Otherwise if prop looks like a list (meaning it starts with a
  '(') then read it as lisp, otherwise return it unmodified as a
  string."
!   (if (stringp prop)
!       (if prop
! 	  (let ((out (string-to-number prop)))
! 	    (if (equal out 0)
! 		(if (or (equal "(" (substring prop 0 1)) (equal "'" (substring prop 0 1)))
! 		    (read prop)
! 		    (if (string-match "^\\(+0\\|-0\\|0\\)$" prop)
! 			0
! 			(progn (set-text-properties 0 (length prop) nil prop)
! 			       prop)))
! 		out))
! 	  nil)
!       prop))
  
  (defun org-dblock-write:propview (params)
    "collect the column specification from the #+cols line
--- 27,43 ----
  Otherwise if prop looks like a list (meaning it starts with a
  '(') then read it as lisp, otherwise return it unmodified as a
  string."
!   (if (and (stringp prop) (not (equal prop "")))
!       (let ((out (string-to-number prop)))
! 	(if (equal out 0)
! 	    (if (or (equal "(" (substring prop 0 1)) (equal "'" (substring prop 0 1)))
! 		(read prop)
! 	      (if (string-match "^\\(+0\\|-0\\|0\\)$" prop)
! 		  0
! 		(progn (set-text-properties 0 (length prop) nil prop)
! 		       prop)))
! 	  out))
!     prop))
  
  (defun org-dblock-write:propview (params)
    "collect the column specification from the #+cols line

[-- Attachment #3: Type: text/plain, Size: 17 bytes --]


/Mikael Fornius

[-- Attachment #4: Type: text/plain, Size: 204 bytes --]

_______________________________________________
Emacs-orgmode mailing list
Remember: use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode

^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: orgmode and physical fitness training
  2008-11-07 17:54     ` Mikael Fornius
@ 2008-11-07 18:02       ` Eric Schulte
  2008-11-07 20:25         ` Mikael Fornius
  0 siblings, 1 reply; 13+ messages in thread
From: Eric Schulte @ 2008-11-07 18:02 UTC (permalink / raw)
  To: Mikael Fornius; +Cc: David O'Toole, emacs-orgmode

Mikael Fornius <mfo@abc.se> writes:

> Thanks for org-collector.el, now I have read it and tried it out.
>
> It is very nice to have the possibility to evaluate lisp expressions as
> values, that is something missing in org-columns!
>

I'm happy someone else is finding it useful!

>
> But it was only a few seconds faster than column-view and column dblock
> and therefore not fast enough for my slow computer ;-). I timed it to 62
> seconds to insert exercise data table for one year (83 headings) with 4
> columns and no calculations.
>
> * ELP Profiling Results 
>
> |---------------------------+-------+--------------+--------------|
> | org-dblock-write:propview |     1 |    62.158395 |    62.158395 |
> | org-propview-collect      |     1 |    60.578724 |    60.578724 |
> | org-map-entries           |     1 |    60.519551 |    60.519551 |
> | org-scan-tags             |     1 |    60.267157 |    60.267157 |
> | org-entry-properties      |    94 | 57.451918999 | 0.6111906276 |
> | org-get-tags-at           |    94 | 54.069399999 | 0.5752063829 |
> | org-up-heading-all        |   365 | 53.664638999 | 0.1470264082 |
> | outline-up-heading        |   365 |    53.647627 |    0.1469798 |
> | outline-previous-heading  | 29751 | 39.418412999 | 0.0013249441 |
> | org-outline-level         | 30306 | 6.0971540000 | 0.0002011863 |
> | org-split-string          |   555 | 2.0629750000 | 0.0037170720 |
> |---------------------------+-------+--------------+--------------|
>
> It is clear from above who is the time thief.
>

Speeding up these functions would also pay off if/when org-mode is used
on more portable handheld computers.

>
> Attaches diff if interested :-)

Thanks,

I will certainly apply this to org-collector.el.  In fact if you would
be interested in collaborating on this tool --for speed, stability,
cleaner arguments and results printing-- I could upload this to worg
where we could both make changes.

Best -- Eric

>
> *** /home/mfo/org/org-collector.el~	2008-11-07 17:19:12.000000000 +0100
> --- /home/mfo/org/org-collector.el	2008-11-07 18:14:23.000000000 +0100
> ***************
> *** 27,45 ****
>   Otherwise if prop looks like a list (meaning it starts with a
>   '(') then read it as lisp, otherwise return it unmodified as a
>   string."
> !   (if (stringp prop)
> !       (if prop
> ! 	  (let ((out (string-to-number prop)))
> ! 	    (if (equal out 0)
> ! 		(if (or (equal "(" (substring prop 0 1)) (equal "'" (substring prop 0 1)))
> ! 		    (read prop)
> ! 		    (if (string-match "^\\(+0\\|-0\\|0\\)$" prop)
> ! 			0
> ! 			(progn (set-text-properties 0 (length prop) nil prop)
> ! 			       prop)))
> ! 		out))
> ! 	  nil)
> !       prop))
>   
>   (defun org-dblock-write:propview (params)
>     "collect the column specification from the #+cols line
> --- 27,43 ----
>   Otherwise if prop looks like a list (meaning it starts with a
>   '(') then read it as lisp, otherwise return it unmodified as a
>   string."
> !   (if (and (stringp prop) (not (equal prop "")))
> !       (let ((out (string-to-number prop)))
> ! 	(if (equal out 0)
> ! 	    (if (or (equal "(" (substring prop 0 1)) (equal "'" (substring prop 0 1)))
> ! 		(read prop)
> ! 	      (if (string-match "^\\(+0\\|-0\\|0\\)$" prop)
> ! 		  0
> ! 		(progn (set-text-properties 0 (length prop) nil prop)
> ! 		       prop)))
> ! 	  out))
> !     prop))
>   
>   (defun org-dblock-write:propview (params)
>     "collect the column specification from the #+cols line
>
> /Mikael Fornius

^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: orgmode and physical fitness training
  2008-11-07 18:02       ` Eric Schulte
@ 2008-11-07 20:25         ` Mikael Fornius
  2008-11-07 21:25           ` Eric Schulte
  0 siblings, 1 reply; 13+ messages in thread
From: Mikael Fornius @ 2008-11-07 20:25 UTC (permalink / raw)
  To: Eric Schulte; +Cc: David O'Toole, emacs-orgmode

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

> Speeding up these functions would also pay off if/when org-mode is used
> on more portable handheld computers.

That is a good point. I will try to see if I am able to make some
improvement and I know that without inherited tags it is about 10 times
faster.

I have my own recursive map headings function who passes inherited tags,
it is much faster, but it would be even nicer if a more general function
like org-map-entries could remember and pass inherited tags (and
properties?) in some smart way...

> I will certainly apply this to org-collector.el.  In fact if you would
> be interested in collaborating on this tool --for speed, stability,
> cleaner arguments and results printing-- I could upload this to worg
> where we could both make changes.

I am registered on Worg-git but I have never committed anything just
looked around and I like it.

Yes, I am interested in collaboration. You have read my reply about my
personal goals of a all-round statistical diary. I think that this tool
can be a nice beginning.

/Mikael Fornius

^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: Re: orgmode and physical fitness training
  2008-11-06 16:56   ` Eric Schulte
  2008-11-06 21:33     ` Mikael Fornius
  2008-11-07 17:54     ` Mikael Fornius
@ 2008-11-07 20:52     ` Carsten Dominik
  2008-11-07 21:52       ` Mikael Fornius
  2 siblings, 1 reply; 13+ messages in thread
From: Carsten Dominik @ 2008-11-07 20:52 UTC (permalink / raw)
  To: Eric Schulte; +Cc: Mikael Fornius, David O'Toole, emacs-orgmode

Hi,

if you do not need the tags, calling

    (org-entry-properties nil 'standard)

will be a lot faster.

- Carsten

On Nov 6, 2008, at 5:56 PM, Eric Schulte wrote:

> 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?
> [...]
>> Lately I have been thinking of and trying to implement a true org- 
>> mode
>> running diary. Which means to use the org-mode file as raw-data file
>> (properties) instead of my parallell sexp-assoc-list-elisp-data-file.
>>
>> 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.
>>
>
> Hi Mikael,
>
> 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, which can be used to collect data from properties in a manner
> similar to column view, but using a simpler method meant only for  
> table
> display, rather than column viewing, and allowing for the  
> application of
> general elisp to the values before they are dumped into the table.  I
> think it would work in your case as well.
>
> I applied it to the data you posted with the following results.  The
> mechanics are working, but it could use some display cleaning.  The  
> file
> `org-collector.el' is attached
>
> <org-collector.el><mime-attachment.txt><mime-attachment.txt>

^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: orgmode and physical fitness training
  2008-11-07 20:25         ` Mikael Fornius
@ 2008-11-07 21:25           ` Eric Schulte
  2008-11-10  9:29             ` Mikael Fornius
  0 siblings, 1 reply; 13+ messages in thread
From: Eric Schulte @ 2008-11-07 21:25 UTC (permalink / raw)
  To: Mikael Fornius; +Cc: David O'Toole, emacs-orgmode

Mikael Fornius <mfo@abc.se> writes:

> "Eric Schulte" <schulte.eric@gmail.com> writes:
[...]
> Yes, I am interested in collaboration. You have read my reply about my
> personal goals of a all-round statistical diary. I think that this tool
> can be a nice beginning.
>

Great,

I've placed org-collector.el up on worg.  See the
http://legito.net/worg/org-devel.php page on Worg (which should
propagate within an hour or so) for information and links.

Note: While this seems like an appropriate use of Worg to me, if anyone
with more Worg experience thinks this is a misuse of the repo, please
let me know and I'll gladly move this somewhere else.

Tally Ho -- Eric

^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: orgmode and physical fitness training
  2008-11-07 20:52     ` Carsten Dominik
@ 2008-11-07 21:52       ` Mikael Fornius
  0 siblings, 0 replies; 13+ messages in thread
From: Mikael Fornius @ 2008-11-07 21:52 UTC (permalink / raw)
  To: Carsten Dominik; +Cc: emacs-orgmode, David O'Toole

Carsten Dominik <dominik@science.uva.nl> writes:

>    (org-entry-properties nil 'standard)
>
> will be a lot faster.

Thanks! But I have already noticed that, and that it is about 10-times
faster to get properties of a subtree without inherited tags. :-)

The problem is that I like to use inherited tags in my document
structure. I am planning to use tags and properties to generate subsets
of my heading data, for tables and statistics.

* :2008:
** :november:
*** <2008-11-05> :temperature:
*** <2008-11-07> :weight:
*** <2008-11-09> :running:interval:
*** <2008-11-10> :skiing:
 :PROPERTIES:...
Wow what a ride!

I want to be able to get subset of lets say skiing in year 2008 then
"Wow what a ride!" should match if all tags are inherited.

(org-tags-at "Wow what a ride!") -> ":2008:november:skiing:"

/Mikael Fornius

^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: orgmode and physical fitness training
  2008-11-07 21:25           ` Eric Schulte
@ 2008-11-10  9:29             ` Mikael Fornius
  0 siblings, 0 replies; 13+ messages in thread
From: Mikael Fornius @ 2008-11-10  9:29 UTC (permalink / raw)
  To: Eric Schulte; +Cc: emacs-orgmode, David O'Toole

Now I found it! First I issued the wrong command 'git fetch origin' but
it did not work, so now I tried 'git pull origin' and it worked, took
some time for me to ge it. Thanks :-)

^ permalink raw reply	[flat|nested] 13+ messages in thread

end of thread, other threads:[~2008-11-10  9:29 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
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
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
  -- strict thread matches above, loose matches on Subject: below --
2008-10-17 22:36 David O'Toole

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).