emacs-orgmode
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Orgmode] Re: SOLVED: elisp formulas in column view (without converting


From: news
Subject: [Orgmode] Re: SOLVED: elisp formulas in column view (without converting to tables)
Date: Sat, 14 Mar 2009 01:33:52 +0000

<address@hidden> writes:

> Hi,
>    I have rewritten the org-columns-compute function to allow elisp
>    formulas in column view.
>    It allows you to specify how to accumulate values from child headers,
>    and how to specify the value for the current header, based on other
>    columns.
>    In the column specification you place elisp code between the braces
>    {} after the column name. This elisp should return a list of 2
>    values. The first value should be the value for that header, and the second
>    value should be the running total of values so far at that level, which 
> will
>    eventually be used to set the value for the parent header.
>
>    The following values may be referenced by your elisp code:
>
>                | $name     | the value of the 'name' column for this header 
> (swap 'name' for whatever columns you have) |
>                | curval    | the current value for this header                
>                                           |
>                | curtotal  | the running total from headers at the same level 
> as this one                               |
>                | prevtotal | the total from headers below this level          
>                                           |
>

I forgot to mention that curtotal will be nil if the current header is
the first header at the current level, and prevtotal will be nil if the
current header has no children. You can test for these in your elisp functions.

-- 
aleblanc





reply via email to

[Prev in Thread] Current Thread [Next in Thread]