From mboxrd@z Thu Jan 1 00:00:00 1970 From: Matthew Lundin Subject: Re: Saving column views in agenda Date: Tue, 09 Dec 2008 15:55:19 -0600 Message-ID: <87ej0hypx4.fsf@fastmail.fm> References: <06D0017E-5568-42C0-9AA2-4777F558D23E@uva.nl> <87k5aau0lh.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 1LAAYC-0006e8-Bj for emacs-orgmode@gnu.org; Tue, 09 Dec 2008 16:55:28 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1LAAY9-0006dM-OY for emacs-orgmode@gnu.org; Tue, 09 Dec 2008 16:55:27 -0500 Received: from [199.232.76.173] (port=56052 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1LAAY9-0006dI-IH for emacs-orgmode@gnu.org; Tue, 09 Dec 2008 16:55:25 -0500 Received: from out1.smtp.messagingengine.com ([66.111.4.25]:51637) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1LAAY9-0003Bb-4R for emacs-orgmode@gnu.org; Tue, 09 Dec 2008 16:55:25 -0500 In-Reply-To: (Carsten Dominik's message of "Tue\, 9 Dec 2008 08\:27\:14 +0100") 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: Carsten Dominik Cc: emacs org-mode mailing list Hi Carsten, Thanks for your quick and thoughtful response. Carsten Dominik writes: > Hi Matt, > > this is an interesting problem. I can see three ways to go forward: > > 1. To indeed export agenda column view, but maybe it would actually > be nicer to capture it into a table somewhere. I'd agree that capturing agenda column view in in a table would be even better than export, so that further calculations could be performed on the data. > > 2. I believe I can relatively easily make it possible to capture > in an Org buffer from a sparse tree, or even using a full > match string with tags and properties. However, I don't think > that I can make he partial sums work in this way, and I don't > actually think that you'd want your parent properties filled with > temporary, partial sums. Maybe the way to go would be to capture > a sparse tree, and then to do the summing using calc formulas on the > captured table, would that work? I am not sure tight now if such > formulas persist, but I believe it works for clock tables, so we > could make it work for column view capture as well. > This would be another very nice option. There would be no need for partial sums in the column view itself so long as calculations could be performed in the exported table. > 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? It occurred to me that an ideal scenario would be to combine #2 and #3. Would it be possible to capture a sparse tree column view as a dynamic block containing parameters that could subsequently be changed/updated? Thanks so much for considering these ideas. Of course, please consider all these requests simply as wishlist items. I'm working on learning emacs lisp, but I'm afraid it will be a while before I can contribute anything to org. Best, Matt > > - Carsten > > > > On Dec 8, 2008, at 4:51 PM, mdl@imapmail.org wrote: > >> >> Hi Carsten, >> >> Carsten Dominik writes: >> >>> Hi Matthew, >>> >>> this is currently not possible. >>> >>> You could try to use the mapping API to do something yourself. >>> >>> What is your use-case? >>> >>> - Carsten >> >> Thanks for the quick response. I use the agenda to filter column views >> via property searches. Let's say I'm keeping track of my spending with >> the following outline: >> >> #+COLUMNS: %20ITEM %10TIMESTAMP %20spendtype %10amount{$} >> >> * December Spending >> ** 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: >> >> With such an outline (obviously much longer and more complex in >> reality), I use columns and dynamic blocks to give me a quick overview >> (with sums) of spending by week. I also use the agenda to filter these >> views by spendtype, so that I can see, for instance, the sum of how >> much I spent on food each week/month/year. Currently, I can use column >> view in the agenda to generate sums, but I cannot export the column >> view for permanent reference or for sharing with others. >> >> I suppose this functionality could be achieved in a few other ways as >> well: >> >> 1) A dynamic block that captures a column view, but with a parameter >> that filters for TAG, property, etc. >> >> 2) A column view combined with a sparse tree that sums the amounts of >> only the visible items. Currently, when "summary-type" is specified, >> the column view adds all items in the outline hierarchy, regardless of >> their visibility. (Of course, if this method were possible, one would >> still have to devise a way to export the filtered column view.) >> >> 3) A filter for tables that one could apply to the exported column >> view. (E.g., show only rows in which "Column 3 = x" and calculate only >> the visible items.) >> >> There is, of course, the likelihood that #1, #2, or #3 already exist >> and that I have simply missed something in the manual. Please do let >> me know if this is the case. I also realize that I could simply >> create subheadings for each spending type (e.g., *** Food) that would >> create the desired effect in the column view. But as data becomes more >> complex, it would be nice to generate these filtered views >> dynamically. >> >> To sum up a long reply: I am curious whether it is possible to create >> exportable, dynamically filtered data in column views, in which the >> sum created in a "summary-type" column is recalculated when items are >> filtered. (I suppose this would count as part of org-mode's >> "spreadsheet" functionality.) >> >> Thanks, as always, for such a wonderful program. >> >> Matt >> >>> >>> On Dec 8, 2008, at 6:52 AM, Matthew Lundin wrote: >>> >>>> >>>> I often use dynamic blocks to save/export column views in org-mode >>>> files. Does anyone know of a similar way to export/save a column >>>> view >>>> from the agenda? When I write the agenda to a file, it naturally >>>> writes only the text (not the column overlay). >>>> >>>> Regards, >>>> Matt >>>> >>>> >>>> _______________________________________________ >>>> 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