emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Michael Hannon <jm_hannon@yahoo.com>
To: Bastien <bzg@gnu.org>, Charles <millarc@verizon.net>
Cc: "emacs-orgmode@gnu.org" <emacs-orgmode@gnu.org>
Subject: Re: How to apply multiple TBLFM rules?
Date: Tue, 8 May 2012 13:21:54 -0700 (PDT)	[thread overview]
Message-ID: <1336508514.23203.YahooMailNeo@web161906.mail.bf1.yahoo.com> (raw)
In-Reply-To: <87d36fytvf.fsf@gnu.org>

Bastien <bzg@gnu.org> wrote:

> Charles <millarc@verizon.net> writes:
>
>> Perhaps only one #+TBLFM: per table is allowed
>
> More precisely, hitting C-c C-c on #+TBLFM: will just apply formulas in
> *this* line.
>
> Using several #+TBLFM: lines is sometimes useful when you want to apply
> different sets of formulas -- which I think is the use for #+TBLFM: in
> Michael's document (but I agree this is confusing there.)

Hi, Bastien.  Thanks for looking into this.  Let me start by saying that I'm
completely satisfied with the mechanism of joining formulas with the "::"
notation, and especially with the convenient editing of such formulas with
"C-c '".

But if the multiple TBLFM lines work as I think you're describing, then I
still have some gap in my understanding.

Here's my simple test table, with multiple formulas, joined by "::":

    #+TBLNAME: test1
    | 1 | 2 |   |
    | 4 | 5 |   |
    | 7 | 8 | 9 |
    #+TBLFM: @1$3='(+ 10 7)::@2$3='(+ 11 9)::@3$1=42

If I hit C-c C-c while the point is on the one and only TBLFM line, I get:

    #+TBLNAME: test1
    |  1 | 2 | 17 |
    |  4 | 5 | 20 |
    | 42 | 8 |  9 
    
I.e.,exactly the intended result.

Here is the same table, but with the formulas spread across three different
lines:

    #+TBLNAME: test2
    | 1 | 2 |   |
    | 4 | 5 |   |
    | 7 | 8 | 9 |
    #+TBLFM: @1$3='(+ 10 7)
    #+TBLFM: @2$3='(+ 11 9)
    #+TBLFM: @3$1=42

If I hit C-c C-c while the point is on the FIRST TBLFM line, I get:

    #+TBLNAME: test2
    | 1 | 2 | 17 |
    | 4 | 5 |    |
    | 7 | 8 |  9 |

This is what I expected.  If I now proceed to hit C-c C-c while the point is
on the SECOND TBLFM line, I get:


    #+TBLNAME: test2
    | 1 | 2 | 17 |
    | 4 | 5 |    |
    | 7 | 8 |  9 |
    
I.e., there is no change whatsoever.  If I then hit C-c C-c while the point is
on the THIRD TBLFM line, I get:

    #+TBLNAME: test2
    | 1 | 2 | 17 |
    | 4 | 5 |    |
    | 7 | 8 |  9 |
    
I.e., again there is no change whatsoever.

I might add that if I do carry out these operations with table debugging
turned on (C-c {), I do NOT get prompted by the debugger when trying to
process the second and third TBLFM lines.

As I said above, I'm happy with the "::" solution and am happy to let this
topic drop, but I'm eager to expand my Org-mode skills.  Please let me know
what I'm missing.

Thanks again.

-- Mike

  reply	other threads:[~2012-05-08 20:22 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-05-07 22:00 How to apply multiple TBLFM rules? Michael Hannon
2012-05-08  1:01 ` Charles
2012-05-08  1:41   ` Michael Hannon
2012-05-08  8:11   ` Bastien
2012-05-08 20:21     ` Michael Hannon [this message]
2012-05-10  6:52       ` Bastien
2013-04-02 13:33       ` [PATCH] Was: " Ippei FURUHASHI
2013-04-04 13:09         ` Bastien
2013-04-06 13:07           ` Ippei FURUHASHI
2013-04-06 13:15             ` Bastien

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=1336508514.23203.YahooMailNeo@web161906.mail.bf1.yahoo.com \
    --to=jm_hannon@yahoo.com \
    --cc=bzg@gnu.org \
    --cc=emacs-orgmode@gnu.org \
    --cc=millarc@verizon.net \
    /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).