From mboxrd@z Thu Jan 1 00:00:00 1970 From: "Eric Schulte" Subject: Re: Saving column views in agenda Date: Thu, 11 Dec 2008 07:45:11 -0800 Message-ID: <87vdtq67i0.fsf@gmail.com> References: <06D0017E-5568-42C0-9AA2-4777F558D23E@uva.nl> <87k5aau0lh.fsf@fastmail.fm> <87ej0hypx4.fsf@fastmail.fm> 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 1LAnib-00019S-9W for emacs-orgmode@gnu.org; Thu, 11 Dec 2008 10:44:49 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1LAniZ-00018b-GW for emacs-orgmode@gnu.org; Thu, 11 Dec 2008 10:44:48 -0500 Received: from [199.232.76.173] (port=36734 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1LAniZ-00018Y-Bu for emacs-orgmode@gnu.org; Thu, 11 Dec 2008 10:44:47 -0500 Received: from rn-out-0910.google.com ([64.233.170.188]:65091) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1LAniY-000437-Vf for emacs-orgmode@gnu.org; Thu, 11 Dec 2008 10:44:47 -0500 Received: by rn-out-0910.google.com with SMTP id k32so996711rnd.7 for ; Thu, 11 Dec 2008 07:44:44 -0800 (PST) In-Reply-To: <87ej0hypx4.fsf@fastmail.fm> (Matthew Lundin's message of "Tue, 09 Dec 2008 15:55:19 -0600") 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: Matthew Lundin Cc: emacs org-mode mailing list Matthew Lundin writes: >> 3. Maybe what would be even beter is to build on Eric Schultes collector >> function an make something that would create a custom able from >> selected properties of matched entries. That could then be >> incorporated into a dynamic block so that it can be easily updated. >> Eric, would you like to comment? > > I was only vaguely aware of org-collector. I'll have to take a closer > look. I'm assuming that a dynamic block function based on > org-collector would be the most robust option, since one could then > choose create new subsets of data by changing the parameters. Is that > correct? > Hi, Sorry about the slow reply. I believe org-collector could be helpful in this scenario. In response to this thread I've changed org-collector so that it will preserve #+TBLFM lines. The latest version is available here. http://github.com/eschulte/org-contrib/raw/master/org-collector.el Using this version, the example below works for me. Notice that while org-collector can perform arbitrary elisp functions over the properties of any single header it can't --currently-- run functions over multiple headers, which is why the #+TBLFM line is required. Hopefully this works for you. Best -- Eric * Example #+BEGIN: propview :id "december" :cols (ITEM amount spendtype (if (string= spendtype "food") amount 0)) | "ITEM" | "amount" | "spendtype" | "(if (string= spendtype \"food\") amount 0)" | |----------------------------------+----------+-------------+----------------------------------------------| | "Week One" | 0 | 0 | 0 | | "Grocery Store [2008-12-01 Mon]" | 56.77 | "food" | 56.77 | | "Athletic club [2008-12-02 Tue]" | 75.0 | "health" | 0 | | "Week Two " | 0 | 0 | 0 | | "Restaurant [2008-12-08 Mon]" | 30.67 | "food" | 30.67 | | | | | 87.44 | #+TBLFM: @7$4=vsum(@2..@6) #+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: