From mboxrd@z Thu Jan 1 00:00:00 1970 From: Carsten Dominik Subject: Re: Saving column views in agenda Date: Fri, 12 Dec 2008 08:55:57 +0100 Message-ID: <954B808C-9260-4A59-B4DF-943901DE9D87@uva.nl> References: <06D0017E-5568-42C0-9AA2-4777F558D23E@uva.nl> <87k5aau0lh.fsf@fastmail.fm> <87ej0hypx4.fsf@fastmail.fm> <87vdtq67i0.fsf@gmail.com> <87y6ymirmv.fsf@fastmail.fm> <877i664jhe.fsf@gmail.com> Mime-Version: 1.0 (Apple Message framework v929.2) Content-Type: text/plain; charset=US-ASCII; format=flowed; delsp=yes Content-Transfer-Encoding: 7bit Return-path: Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1LB3YE-0005BH-IW for emacs-orgmode@gnu.org; Fri, 12 Dec 2008 03:39:10 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1LB3YC-0005A8-WE for emacs-orgmode@gnu.org; Fri, 12 Dec 2008 03:39:09 -0500 Received: from [199.232.76.173] (port=60396 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1LB3YC-0005A0-Lg for emacs-orgmode@gnu.org; Fri, 12 Dec 2008 03:39:08 -0500 Received: from ug-out-1314.google.com ([66.249.92.171]:4657) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1LB3YC-00018T-5g for emacs-orgmode@gnu.org; Fri, 12 Dec 2008 03:39:08 -0500 Received: by ug-out-1314.google.com with SMTP id 36so377429uga.17 for ; Fri, 12 Dec 2008 00:39:06 -0800 (PST) In-Reply-To: <877i664jhe.fsf@gmail.com> 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: Org-mode On Dec 11, 2008, at 8:09 PM, Eric Schulte wrote: > Matthew Lundin writes: > >> Eric, >> >> Thanks so much. The updated org-collector works beautifully. This >> is a >> very nice way to perform calculations on subsets of data. I don't >> suppose there's any chance of generating a table that contains only >> the items in the subset (e.g., only items in which string= spendtype >> "food")? >> > > Hi Matthew, > > Good idea. I've added a :conds parameter which can do just that, see > the example below. Notice that :conds should be a list of tests, not > just one single test, if this proves awkward it would be easy to add > a :cond parameter which doesn't require a list. > > One issue with this setup, is that it's not clear what a stable way > would be to specify the #+TBLFM line. Since the size of the table > could > vary the field in which the sum should be placed could move around. > With the table below a #+TBLFM line like this > > #+TBLFM: @II+1$2=vsum(@I+1..@II-1) > > would work, but currently org-table does not allow the @I style > references before the = sign in the table formula. I wonder if this > would be hard difficult to change? Hi Eric, I do like this syntax, and I am sure that would be possible, but I do not oversee it, it would be quite complicated and would have to be changed in multiple locations, messing with well-tested regular expressions etc. I would need significant quiet time, which I don't hve right now. See also my reply to Matt's message. - Carsten > > > Thanks -- Eric > > > > * 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 | > |----------------------------------+----------| > | | 87.44 | > #+TBLFM: @4$2=vsum(@I+1..@II-1) > #+END: > > ** December Spending > :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: > > > _______________________________________________ > 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