emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Bernt Hansen <bernt@norang.ca>
To: emacs-orgmode@gnu.org
Subject: Re: very long table calc expressions ?
Date: Fri, 22 Jun 2018 09:16:56 -0400	[thread overview]
Message-ID: <874lhvnepj.fsf@norang.ca> (raw)
In-Reply-To: <87a7rnglnq.fsf@mat.ucm.es> (Uwe Brauer's message of "Fri, 22 Jun 2018 12:28:41 +0200")

Uwe Brauer <oub@mat.ucm.es> writes:

>    > Uwe Brauer <oub@mat.ucm.es> writes:
>
> Hello Bernt,
>    > Hi Uwe,
>
>    > You can edit or view the table formulas with C-c ' in case that helps.
>    > This splits the formulas one per line for editing.
>
> Thanks for pointing this out to me, but I seem unable to do it. 
>
> When I use C-c ' I obtain that very long formula in a special buffer,
> but it is again a long line. Breaking this line and then using C-c C-c
> cuts the second line. So this is not what I was looking for, but maybe I
> misunderstood something fundamental.

When I hit C-c ' in this table

#+TBLNAME: stat-final2
|    | Frequency |
|----+-----------|
| SS |           |
| AP |         5 |
| NT |         3 |
| SB |    #ERROR |
| MH |         2 |
| NP |         3 |
#+TBLFM: @>$2='(length (org-lookup-all "NP" '(remote(data,@2$2..@>I$2)) nil))::@>>$2='(length (org-lookup-all "MH" '(remote(data,@2$2..@>I$2)) nil))::@>>>$2='(length (org-lookup-all "SB" '\(remote(data,@2$2..@>I$2)) nil))::@>>>>$2='(length (org-lookup-all "NT" '(remote(data,@2$2..@>I$2)) nil))::@>>>>>$2='(length (org-lookup-all "AP" '(remote(data,@2$2..@>I$2)) nil))

I get a new window with this in it:

# Field and Range Formulas
@>$2 = '(length (org-lookup-all "NP" '(remote(data,@2$2..@>I$2)) nil))
@>>$2 = '(length (org-lookup-all "MH" '(remote(data,@2$2..@>I$2)) nil))
@>>>$2 = '(length (org-lookup-all "SB" '\(remote(data,@2$2..@>I$2))
nil))
@>>>>$2 = '(length (org-lookup-all "NT" '(remote(data,@2$2..@>I$2))
nil))
@>>>>>$2 = '(length (org-lookup-all "AP" '(remote(data,@2$2..@>I$2))
nil))

and I can edit individual lines and then C-c C-c or C-c ' again to exit
and rebuild the formula line on the table.

It seems to reverse the lines every other time I do it which is strange
but it works for me.

Regards,
Bernt

  reply	other threads:[~2018-06-22 13:17 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-06-19 17:21 very long table calc expressions ? Uwe Brauer
2018-06-20  6:13 ` Thierry Banel
2018-06-20  9:09   ` Uwe Brauer
2018-06-20 18:28     ` Thierry Banel
2018-06-21 13:35       ` Uwe Brauer
2018-06-21 19:06 ` Bernt Hansen
2018-06-22 10:28   ` Uwe Brauer
2018-06-22 13:16     ` Bernt Hansen [this message]
2018-06-22 14:16       ` Uwe Brauer
2018-06-22 15:03         ` Jonathan Leech-Pepin
2018-06-22 15:25           ` Uwe Brauer
2018-06-22 16:48             ` Nick Dokos
2018-06-22 17:22               ` Thierry Banel
2018-06-22 17:54                 ` Uwe Brauer

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=874lhvnepj.fsf@norang.ca \
    --to=bernt@norang.ca \
    --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).