From mboxrd@z Thu Jan 1 00:00:00 1970 From: Cecil Westerhof Subject: Re: Can this table formula be done more efficient Date: Mon, 9 Jun 2014 09:06:54 +0200 Message-ID: References: <87tx7vk482.fsf@gmail.com> <8738ffsg6z.fsf@gmail.com> Mime-Version: 1.0 Content-Type: multipart/alternative; boundary=001a11c1c2ae28815804fb61db77 Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:47545) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WttfT-0006vU-Nq for emacs-orgmode@gnu.org; Mon, 09 Jun 2014 03:06:56 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1WttfS-0007kR-JL for emacs-orgmode@gnu.org; Mon, 09 Jun 2014 03:06:55 -0400 Received: from mail-qa0-x22c.google.com ([2607:f8b0:400d:c00::22c]:62040) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WttfS-0007kM-FY for emacs-orgmode@gnu.org; Mon, 09 Jun 2014 03:06:54 -0400 Received: by mail-qa0-f44.google.com with SMTP id j7so7385585qaq.17 for ; Mon, 09 Jun 2014 00:06:54 -0700 (PDT) In-Reply-To: <8738ffsg6z.fsf@gmail.com> List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: emacs-orgmode@gnu.org --001a11c1c2ae28815804fb61db77 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable 2014-06-08 15:07 GMT+02:00 Eric Schulte : > Nick Dokos writes: > > > Cecil Westerhof writes: > > > >> At the moment I am using the following formula: > >> #+TBLFM: @<<$4..@>>$4 =3D $2 - $3 :: @>$2=3Dvsum(@<<$2..@>>$2) :: > >> @>$3=3Dvsum(@<<$3..@>>$3) :: @>$4=3Dvsum(@<<$4..@>>$4) > >> > >> This does what I want, but there are two things that could be improved= . > >> > >> - The second, third and fourth formula do exactly the same, only on > >> different columns. Could this be rewritten to one formula? > >> > > > > --8<---------------cut here---------------start------------->8--- > > #+TBLFM: @<<$4..@>>$4 =3D $2 - $3 :: @>$2..$4=3Dvsum(@<<$0..@>>$0) > > --8<---------------cut here---------------end--------------->8--- > > > > See (info "(org) References") > > > >> - The line becomes long and hard to evaluate for a person. Is there > >> a possibility to put the formulas below each-other? > >> > > > > I don't believe so but my belief may be out of date. It has been > > discussed before: check the list archives. > > Sort of but not really. See "Using multiple #+TBLFM lines" in the > manual. > =E2=80=8BThat I found. Is handy, but only for debugging. But with the short= ened formula line, it is less of a problem. --=20 Cecil Westerhof --001a11c1c2ae28815804fb61db77 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable
2014= -06-08 15:07 GMT+02:00 Eric Schulte <schulte.eric@gmail.com>:
Nick= Dokos <ndokos@gmail.com> wri= tes:

> Cecil Westerhof <cldweste= rhof@gmail.com> writes:
>
>> At the moment I am using the following formula:
>> =C2=A0=C2=A0=C2=A0 #+TBLFM: @<<$4..@>>$4 =3D $2 - $3 := : @>$2=3Dvsum(@<<$2..@>>$2) ::
>> @>$3=3Dvsum(@<<$3..@>>$3) :: @>$4=3Dvsum(@<&l= t;$4..@>>$4)
>>
>> This does what I want, but there are two things that could be impr= oved.
>>
>> - The second, third and fourth formula do exactly the same, only o= n
>> different columns. Could this be rewritten to one formula?
>>
>
> --8<---------------cut here---------------start------------->8--= -
> #+TBLFM: @<<$4..@>>$4 =3D $2 - $3 :: @>$2..$4=3Dvsum(@&= lt;<$0..@>>$0)
> --8<---------------cut here---------------end--------------->8--= -
>
> See (info "(org) References")
>
>> - The line becomes long and hard to evaluate for a person. Is ther= e
>> a possibility to put the formulas below each-other?
>>
>
> I don't believe so but my belief may be out of date. It has been > discussed before: check the list archives.

Sort of but not really. =C2=A0See "Using multiple #+TBLFM = lines" in the
manual.

=E2=80=8BThat I found. Is han= dy, but only for debugging. But with the shortened formula line, it is less= of a problem.

--
Cecil Westerhof
--001a11c1c2ae28815804fb61db77--