emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Cecil Westerhof <cldwesterhof@gmail.com>
To: emacs-orgmode@gnu.org
Subject: Re: Can this table formula be done more efficient
Date: Mon, 9 Jun 2014 09:06:54 +0200	[thread overview]
Message-ID: <CAG-LmmBGR077UG3WuUhZD-c5pmmMyjTncrvhuqb7YUC0TCPfSg@mail.gmail.com> (raw)
In-Reply-To: <8738ffsg6z.fsf@gmail.com>

[-- Attachment #1: Type: text/plain, Size: 1339 bytes --]

2014-06-08 15:07 GMT+02:00 Eric Schulte <schulte.eric@gmail.com>:

> Nick Dokos <ndokos@gmail.com> writes:
>
> > Cecil Westerhof <cldwesterhof@gmail.com> writes:
> >
> >> At the moment I am using the following formula:
> >>     #+TBLFM: @<<$4..@>>$4 = $2 - $3 :: @>$2=vsum(@<<$2..@>>$2) ::
> >> @>$3=vsum(@<<$3..@>>$3) :: @>$4=vsum(@<<$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 = $2 - $3 :: @>$2..$4=vsum(@<<$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.
>

​That I found. Is handy, but only for debugging. But with the shortened
formula line, it is less of a problem.

-- 
Cecil Westerhof

[-- Attachment #2: Type: text/html, Size: 2183 bytes --]

  reply	other threads:[~2014-06-09  7:06 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-06-08 10:19 Can this table formula be done more efficient Cecil Westerhof
2014-06-08 11:53 ` Nick Dokos
2014-06-08 13:07   ` Eric Schulte
2014-06-09  7:06     ` Cecil Westerhof [this message]
2014-06-09  7:04   ` Cecil Westerhof

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=CAG-LmmBGR077UG3WuUhZD-c5pmmMyjTncrvhuqb7YUC0TCPfSg@mail.gmail.com \
    --to=cldwesterhof@gmail.com \
    --cc=emacs-orgmode@gnu.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).