emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: "Eric Schulte" <schulte.eric@gmail.com>
To: Matthew Lundin <mdl@imapmail.org>
Cc: emacs org-mode mailing list <emacs-orgmode@gnu.org>
Subject: Re: Saving column views in agenda
Date: Thu, 11 Dec 2008 07:45:11 -0800	[thread overview]
Message-ID: <87vdtq67i0.fsf@gmail.com> (raw)
In-Reply-To: <87ej0hypx4.fsf@fastmail.fm> (Matthew Lundin's message of "Tue, 09 Dec 2008 15:55:19 -0600")

Matthew Lundin <mdl@imapmail.org> 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:

  reply	other threads:[~2008-12-11 15:44 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-12-08  5:52 Saving column views in agenda Matthew Lundin
2008-12-08  9:40 ` Carsten Dominik
2008-12-08 15:51   ` mdl
2008-12-09  7:27     ` Carsten Dominik
2008-12-09 21:55       ` Matthew Lundin
2008-12-11 15:45         ` Eric Schulte [this message]
     [not found]           ` <87y6ymirmv.fsf@fastmail.fm>
2008-12-11 19:09             ` Eric Schulte
2008-12-11 21:34               ` mdl
2008-12-12  8:40                 ` Carsten Dominik
2008-12-12 13:21                   ` Matthew Lundin
2008-12-12 11:00                 ` Carsten Dominik
2008-12-12 11:01                 ` Carsten Dominik
2008-12-12  0:25               ` Matthew Lundin
2008-12-12  7:55               ` Carsten Dominik

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

  List information: https://www.orgmode.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87vdtq67i0.fsf@gmail.com \
    --to=schulte.eric@gmail.com \
    --cc=emacs-orgmode@gnu.org \
    --cc=mdl@imapmail.org \
    /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 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).