From: Rehan Iftikhar <rehan.iftikhar@gmail.com>
To: nicholas.dokos@hp.com
Cc: emacs-orgmode@gnu.org
Subject: Re: org-collector calculated rows?
Date: Wed, 9 Mar 2011 23:14:43 -0800 [thread overview]
Message-ID: <AANLkTinufJBNa_x76YomEzuZZPUtxXY8udOYsoDAkzzK@mail.gmail.com> (raw)
In-Reply-To: <17363.1299735976@alphaville.dokosmarshall.org>
I updated to 7.5, recompiled, and now it works!
Thanks for the help!
On Wed, Mar 9, 2011 at 9:46 PM, Nick Dokos <nicholas.dokos@hp.com> wrote:
> Rehan Iftikhar <rehan.iftikhar@gmail.com> wrote:
>
>> I have tried adding
>>
>> #+TBLFM: @>$>=vmean(I..II)
>>
>> between the #+BEGIN and #+END lines (after generating a table), but
>> when I C-c C-c on #+BEGIN, the table refreshes and removes the #+TBLFM
>> line.
>>
>> I am using org-mode 7.4. Any idea why my formula isn't working?
>>
>
> I don't know why the #+TBLFM line disappears: it does not in my case -
> assuming that I've got org-collector loaded: since it's a contrib
> package it's not loaded automatically for me and when I tried the
> refresh before loading org-collector, *everything* disappeared: the
> table and the formula. But once I got the package loaded correctly,
> things worked as I described before: if only the formula is in there, it
> gets wiped out, but if there is a table along with the formula, the
> table gets refreshed and the formula is recalculated.
>
> BTW, the formula is wrong: it should read
>
> --8<---------------cut here---------------start------------->8---
> #+TBLFM: @>$>=vmean(@I..II)
> --8<---------------cut here---------------end--------------->8---
>
> and that also assumes that you are running a very recent version of org,
> one that recognizes @> and $>. But neither of these would explain why
> the formula is wiped.
>
> Nick
>
> PS. I'm using Eric Schulte's standard example from the Worg site:
>
> --8<---------------cut here---------------start------------->8---
> * Example
>
> #+BEGIN: propview :id "december" :conds ((string= spendtype "food")) :cols (ITEM amount)
> | "ITEM" | "amount" |
> |----------------------------------+----------|
> | "Grocery Store [2008-12-01 Mon]" | 56.77 |
> | "Restaurant [2008-12-08 Mon]" | 30.67 |
> | "Grocery Store [2008-12-09 Tue]" | 56.76 |
> |----------------------------------+----------|
> | | |
> #+TBLFM: @>$>=vmean(@I..II)
> #+END:
>
>
>
> #+BEGIN: propview :cols (ITEM (+ 400 amount)) :scope tree :match "example"
> | "ITEM" | "(+ 400 amount)" |
> |----------------------------------+------------------|
> | "December Spending" | 0 |
> | "Week One" | 0 |
> | "Grocery Store [2008-12-01 Mon]" | 456.77 |
> | "Athletic club [2008-12-02 Tue]" | 475.0 |
> | "Week Two " | 0 |
> | "Restaurant [2008-12-08 Mon]" | 430.67 |
> | "Grocery Store [2008-12-09 Tue]" | 456.76 |
> |----------------------------------+------------------|
> | | 259.88571 |
> #+TBLFM: @>$>=vmean(@I..II)
> #+END:
> #+TBLFM: @>$> = vmean(@I..II)
> ** December Spending :example:
> :PROPERTIES:
> :ID: december
> :END:
>
> *** Week One
> **** Grocery Store [2008-12-01 Mon]
> :PROPERTIES:
> :amount: 56.77
> :spendtype: food
> :END:
> **** Athletic club [2008-12-02 Tue]
> :PROPERTIES:
> :amount: 75.00
> :spendtype: health
> :END:
> *** Week Two
> **** Restaurant [2008-12-08 Mon]
> :PROPERTIES:
> :amount: 30.67
> :spendtype: food
> :END:
> **** Grocery Store [2008-12-09 Tue]
> :PROPERTIES:
> :amount: 56.76
> :spendtype: food
> :END:
> --8<---------------cut here---------------end--------------->8---
>
>>
>> On Sat, Mar 5, 2011 at 12:48 AM, Nick Dokos <nicholas.dokos@hp.com> wrote:
>> >> Rehan Iftikhar <rehan.iftikhar@gmail.com> wrote:
>> >>
>> >> > * More Complex Example: displaying the mean of the "Amount" column
>> >> > for each week.
>> >> >
>> >
>> > I see that I misread this: the formula calculates the mean of all the entries,
>> > not the mean for each week. Having thought about it for about 10 seconds,
>> > I cannot think of a way to do that.
>> >
>> > Nick
>> >
>>
>>
>>
>> --
>> -Rehan
>>
>
--
-Rehan
prev parent reply other threads:[~2011-03-10 7:14 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-03-03 16:16 org-collector calculated rows? Rehan Iftikhar
2011-03-05 8:43 ` Nick Dokos
2011-03-05 8:48 ` Nick Dokos
2011-03-10 5:21 ` Rehan Iftikhar
2011-03-10 5:46 ` Nick Dokos
2011-03-10 7:14 ` Rehan Iftikhar [this message]
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
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=AANLkTinufJBNa_x76YomEzuZZPUtxXY8udOYsoDAkzzK@mail.gmail.com \
--to=rehan.iftikhar@gmail.com \
--cc=emacs-orgmode@gnu.org \
--cc=nicholas.dokos@hp.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 external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.