emacs-orgmode
[Top][All Lists]
Advanced

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

Re: [O] Help with org-lookup-all


From: Alan L Tyree
Subject: Re: [O] Help with org-lookup-all
Date: Wed, 03 Sep 2014 16:18:58 +1000
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.0


On 03/09/14 15:04, Nick Dokos wrote:
Alan L Tyree <address@hidden> writes:

I feel so dumb!

I have this expession attached to a table: (org-lookup-all $1
'(remote(payments,@2$4..@>$4)) '(remote(payments,@2$2..@>$2)))

It is returning the right list of numbers since I can examine them
with (nth n ....

How do I add the list up? I keep getting #ERROR or obviously wrong
answers. What I want is something like

  $2='(apply '+ (org-lookup-all $1 '(remote(payments,@2$4..@>$4))
'(remote(payments,@2$2..@>$2))))

but that gives me errors since (I presume) the list is a bunch of strings.

If they *are* a bunch of strings, then mapping string-to-number across the
list should do the trick:


  $2='(apply '+ (mapcar (function string-to-number) (org-lookup-all $1 
'(remote(payments,@2$4..@>$4)) '(remote(payments,@2$2..@>$2)))))


That worked a treat - thanks Nick.

Cheers,
Alan

--
Alan L Tyree                    http://www2.austlii.edu.au/~alan
Tel:  04 2748 6206              sip:address@hidden




reply via email to

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