From mboxrd@z Thu Jan 1 00:00:00 1970 From: Haroldo Stenger Subject: Re: formula Date: Wed, 5 Aug 2009 20:53:18 -0300 Message-ID: <3678e0bb0908051653t3d6e2cb1ye6e5b033345817c7@mail.gmail.com> References: <3678e0bb0908021558y35e887d2r481a7eb5a8ab7280@mail.gmail.com> <3678e0bb0908031653v6b1ec438kda7788e0b5df36a2@mail.gmail.com> <92686641-229C-43A6-9D9A-F49BD3EEB12B@gmail.com> <3678e0bb0908032328j379f2f66xffc2f05baebc271b@mail.gmail.com> <8D34FDAD-F585-4547-8176-EF35313637DB@gmail.com> <3678e0bb0908040723x74413f21qee4a440f41360eaf@mail.gmail.com> <3258ED92-7E35-4CE9-857B-90E00A5401D9@gmail.com> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="===============0568845672==" Return-path: Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1MYqIL-0007CG-Rm for emacs-orgmode@gnu.org; Wed, 05 Aug 2009 19:53:21 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1MYqIK-0007Bp-4U for emacs-orgmode@gnu.org; Wed, 05 Aug 2009 19:53:20 -0400 Received: from [199.232.76.173] (port=45702 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1MYqIJ-0007Bl-Vk for emacs-orgmode@gnu.org; Wed, 05 Aug 2009 19:53:20 -0400 Received: from qw-out-1920.google.com ([74.125.92.148]:28410) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1MYqIJ-0008WP-Be for emacs-orgmode@gnu.org; Wed, 05 Aug 2009 19:53:19 -0400 Received: by qw-out-1920.google.com with SMTP id 5so293137qwf.24 for ; Wed, 05 Aug 2009 16:53:18 -0700 (PDT) In-Reply-To: <3258ED92-7E35-4CE9-857B-90E00A5401D9@gmail.com> List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: emacs-orgmode@gnu.org --===============0568845672== Content-Type: multipart/alternative; boundary=0015175cba7a1110ad04706db507 --0015175cba7a1110ad04706db507 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Carsten, Nick, I finally could solve the issue. I got confused by what I consider are two typos in the mails, I was mislead by 'filed formula' which I thought was something new to me, when it was really a simple 'field formula'. Moreover, column formulas (as the docs say, since I checked) start like "$3=" and not as "%3=". Finally, I understood that the only thing I had missing (which you kindly provided) was the field formula that initializes the column to zero, when instead I was trying to achieve by putting a zero directly, which (I don't know why) does not work in combination with a column formula. I just write this as feedback, not to bother anyone. And thanks a lot for your kind help. best, haroldo 2009/8/4 Carsten Dominik > > On Aug 4, 2009, at 4:23 PM, Haroldo Stenger wrote: > > Carsten , >> >> I take for granted that a filed formula is a column formula , like the one >> I was using. >> > > No. A column formula starts like %3=... and applies to all fields > in column 3. A field formula starts like @2$3=... and applies to a single > field. I did out the correct formulas into the table I sent with my last > email. > > For the rest I don't know what is wrong. > > Maybe you have some local setup binding `C-c *' to a different function? > Maybe you C-u is bound to something else? > > You can try to move the cursor into the #+TBLFM line and press `C-c C-c' > there, this should also update the entire table, as should `C-u C-c C-c' > anywhere in the table. > > - Carsten > > > > >> I upgraded to the las org-mode version. >> >> I must be doing something really wrong, since C-u C-c * doesn't >> recalculate the column, it just moves the point to the first row after the >> hline. >> >> What can be that is missing here ? >> >> best regards, >> haroldo >> >> 2009/8/4 Carsten Dominik >> Hi Haroldo, >> >> Well, I am using the newest version of Org-mode for which you'd have to >> use a filed formula for the first field in the balance column. Then using >> your >> formulas, `C-u C-c *' does fill the entire table: >> >> >> | in | out | balance | >> |-----+-----+---------| >> | | | 0 | >> >> | 30 | | 30 | >> | | 25 | 5 | >> | 100 | | 105 | >> | 500 | | 605 | >> | | 400 | 205 | >> | | | 205 | >> #+TBLFM: $3=@-1$3 + @+0$1 - @+0$2::@2$3=0 >> >> So I don't know why this is not working for you. >> >> - Carsten >> >> >> On Aug 4, 2009, at 8:28 AM, Haroldo Stenger wrote: >> >> Sure, sorry, that's what text is for :) >> >> | in | out | balance | >> |-----+-----+---------| >> | | | | >> | 30 | | 30 | >> | | 25 | 5 | >> | 100 | | 105 | >> | 500 | | | >> | | 400 | | >> | | | | >> #+TBLFM: $3=@-1$3 + @+0$1 - @+0$2 >> >> That's how the table looks like after >> - creating the table >> - filling columns 1 and 2 with numbers >> - creating the column formula in column 3, and >> - typing C-c * in @3$3 , @4$3 and @5$3 >> >> The complete filling of the $3 column doesn't take place by issuing the >> commands in http://orgmode.org/org.html#Updating-the-table. If I go to >> @6$3 , @7$3 and @8$3 and type C-c * I obtain what I want, being: >> >> | in | out | balance | >> |-----+-----+---------| >> | | | | >> | 30 | | 30 | >> | | 25 | 5 | >> | 100 | | 105 | >> | 500 | | 605 | >> | | 400 | 205 | >> | | | 205 | >> #+TBLFM: $3=@-1$3 + @+0$1 - @+0$2 >> >> I know that what I'm asking should be of easy achievement on my own, but I >> got somewhat frustrated when I use the commands and the filling doesn't >> happen. Thanks for helping me. >> >> best, >> haroldo >> >> >> >> >> 2009/8/4 Carsten Dominik >> > >> > Hi Haroldo, >> > >> > instead of keeping us guessing what your table might look like, >> > maybe you can just post it.... >> > >> > - Carsten >> > >> > On Aug 4, 2009, at 1:53 AM, Haroldo Stenger wrote: >> > >> >> Dear Carsten , >> >> >> >> Thanks ! That's exactly what I was in need of: a combination of a >> column-formula and relative references in the formula. So far, so good. Now, >> I have the formula line like this >> >> >> >> #+TBLFM: $5=@-1$5 + @-0$3 - @-0$4 >> >> >> >> and the very line I typed the formula gets calculated fine. If I want >> another line into the bus, I go to the empty field in the same column in >> another line, and go to the Calculate menu, and choose recalculate line, and >> the fine result appears there , as expected. But if I approach Calculate / >> Recalculate all , in fact , nothing happens. I tried many times, without >> result. Recalc line works perfectly, but that does not seem what I'm looking >> for, which would be a recalculation of all the fields in the column that >> holds my column-formula. I'll continue reading until I find out, but if you >> come up with an answer earlier I'd be grateful in advance ! :-) >> >> >> >> best , >> >> >> >> haroldo >> >> >> >> 2009/8/3 Carsten Dominik >> >> Hi Haroldo, >> >> >> >> >> >> You cannot copy a formula easily from one field t the next with >> >> shifting the reference like you would do in a normal spreadsheet. >> >> However, you can use relative references (see the manual) in >> >> order to write formulas in an invariant way, and then use basic >> >> editing commands in the C-c ' buffer to define the formula for >> >> many fields. Even better, use a column formula which allows >> >> you to write a single formula for an entire column. >> >> >> >> - Carsten >> >> >> >> >> >> On Aug 3, 2009, at 12:58 AM, Haroldo Stenger wrote: >> >> >> >> hi , I wonder how can a formula in a table be "copied" to a location >> below, and its references be shifted alongwise automatically. I checked >> every documentation I've found , but that "feature" does not show up. I'm >> forced to copy the formula in in the C-c ' and then go to each of the >> references and type S-downarrow as many times. I'd thank any idea here. >> >> >> >> best regards, haroldo. >> >> (thanks for org-mode, it's great) >> >> _______________________________________________ >> >> Emacs-orgmode mailing list >> >> Remember: use `Reply All' to send replies to the list. >> >> Emacs-orgmode@gnu.org >> >> http://lists.gnu.org/mailman/listinfo/emacs-orgmode >> >> >> >> >> > >> >> >> >> > --0015175cba7a1110ad04706db507 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Carsten, Nick,

I finally could solve the issue. I got confused by wh= at I consider are two typos in the mails, I was mislead by 'filed formu= la' which I thought was something new to me, when it was really a simpl= e 'field formula'. Moreover, column formulas (as the docs say, sinc= e I checked) start like "$3=3D" and not as "%3=3D".

Finally, I understood that the only thing I had missing (which you kind= ly provided) was the field formula that initializes the column to zero, whe= n instead I was trying to achieve by putting a zero directly, which (I don&= #39;t know why) does not work in combination with a column formula.

I just write this as feedback, not to bother anyone. And thanks a lot f= or your kind help.

best,

haroldo

2009/8/4 Carsten Dominik <carsten.dominik@gmail.com>

On Aug 4, 2009, at 4:23 PM, Haroldo Stenger wrote:

Carsten ,

I take for granted that a filed formula is a column formula , like the one = I was using.

No. =A0A column formula starts like %3=3D... and applies to all fields
in column 3. =A0A field formula starts like @2$3=3D... and applies to a sin= gle field. =A0I did out the correct formulas into the table I sent with my = last email.

For the rest I don't know what is wrong.

Maybe you have some local setup binding `C-c *' to a different function= ?
Maybe you C-u is bound to something else?

You can try to move the cursor into the #+TBLFM line and press `C-c C-c'= ; there, this should also update the entire table, as should `C-u C-c C-c&#= 39;
anywhere in the table.

- Carsten




I upgraded to the las org-mode version.

I must be doing something really wrong, since C-u C-c * =A0doesn't reca= lculate the column, it just moves the point to the first row after the hlin= e.

What can be that is missing here ?

best regards,
haroldo

2009/8/4 Carsten Dominik <carsten.dominik@gmail.com>
Hi Haroldo,

Well, I am using the newest version of Org-mode for which you'd have to= use a filed formula for the first field in the balance column. =A0Then usi= ng your
formulas, `C-u C-c *' does fill the entire table:


| =A0in | out | balance |
|-----+-----+---------|
| =A0 =A0 | =A0 =A0 | =A0 =A0 =A0 0 |

| =A030 | =A0 =A0 | =A0 =A0 =A030 |
| =A0 =A0 | =A025 | =A0 =A0 =A0 5 |
| 100 | =A0 =A0 | =A0 =A0 105 |
| 500 | =A0 =A0 | =A0 =A0 605 |
| =A0 =A0 | 400 | =A0 =A0 205 |
| =A0 =A0 | =A0 =A0 | =A0 =A0 205 |
#+TBLFM: $3=3D@-1$3 + @+0$1 - @+0$2::@2$3=3D0

So I don't know why this is not working for you.

- Carsten


On Aug 4, 2009, at 8:28 AM, Haroldo Stenger wrote:

Sure, sorry, that's what text is for :)

| =A0in | out | balance |
|-----+-----+---------|
| =A0 =A0 | =A0 =A0 | =A0 =A0 =A0 =A0 |
| =A030 | =A0 =A0 | =A0 =A0 =A030 |
| =A0 =A0 | =A025 | =A0 =A0 =A0 5 |
| 100 | =A0 =A0 | =A0 =A0 105 |
| 500 | =A0 =A0 | =A0 =A0 =A0 =A0 |
| =A0 =A0 | 400 | =A0 =A0 =A0 =A0 |
| =A0 =A0 | =A0 =A0 | =A0 =A0 =A0 =A0 |
#+TBLFM: $3=3D@-1$3 + @+0$1 - @+0$2

That's how the table looks like after
- creating the table
- filling columns 1 and 2 with numbers
- creating the column formula in column 3, and
- typing C-c * in @3$3 =A0, @4$3 =A0and =A0@5$3

The complete filling of the $3 column doesn't take place by issuing the= commands in http://orgmode.org/org.html#Updating-the-table. If I go = to @6$3 , @7$3 and @8$3 and type C-c * =A0I obtain what I want, being:

| =A0in | out | balance |
|-----+-----+---------|
| =A0 =A0 | =A0 =A0 | =A0 =A0 =A0 =A0 |
| =A030 | =A0 =A0 | =A0 =A0 =A030 |
| =A0 =A0 | =A025 | =A0 =A0 =A0 5 |
| 100 | =A0 =A0 | =A0 =A0 105 |
| 500 | =A0 =A0 | =A0 =A0 605 |
| =A0 =A0 | 400 | =A0 =A0 205 |
| =A0 =A0 | =A0 =A0 | =A0 =A0 205 |
#+TBLFM: $3=3D@-1$3 + @+0$1 - @+0$2

I know that what I'm asking should be of easy achievement on my own, bu= t I got somewhat frustrated when I use the commands and the filling doesn&#= 39;t happen. Thanks for helping me.

best,
haroldo




2009/8/4 Carsten Dominik <carsten.dominik@gmail.com>
>
> Hi Haroldo,
>
> instead of keeping us guessing what your table might look like,
> maybe you can just post it....
>
> - Carsten
>
> On Aug 4, 2009, at 1:53 AM, Haroldo Stenger wrote:
>
>> Dear Carsten ,
>>
>> Thanks ! That's exactly what I was in need of: a combination o= f a column-formula and relative references in the formula. So far, so good.= Now, I have the formula line like this
>>
>> #+TBLFM: $5=3D@-1$5 + @-0$3 - @-0$4
>>
>> and the very line I typed the formula gets calculated fine. If I w= ant another line into the bus, I go to the empty field in the same column i= n another line, and go to the Calculate menu, and choose recalculate line, = and the fine result appears there , as expected. But if I approach Calculat= e / Recalculate all , in fact , nothing happens. I tried many times, withou= t result. Recalc line works perfectly, but that does not seem what I'm = looking for, which would be a recalculation of all the fields in the column= that holds my column-formula. =A0I'll continue reading until I find ou= t, but if you come up with an answer earlier I'd be grateful in advance= ! =A0:-)
>>
>> best ,
>>
>> haroldo
>>
>> 2009/8/3 Carsten Dominik <carsten.dominik@gmail.com>
>> Hi Haroldo,
>>
>>
>> You cannot copy a formula easily from one field t the next with >> shifting the reference like you would do in a normal spreadsheet.<= br> >> However, you can use relative references (see the manual) in
>> order to write formulas in an invariant way, and then use basic >> editing commands in the C-c ' buffer to define the formula for=
>> many fields. =A0Even better, use a column formula which allows
>> you to write a single formula for an entire column.
>>
>> - Carsten
>>
>>
>> On Aug 3, 2009, at 12:58 AM, Haroldo Stenger wrote:
>>
>> hi , I wonder how can a formula in a table be "copied" t= o a location below, and its references be shifted alongwise automatically. = I checked every documentation I've found , but that "feature"= does not show up. I'm forced to copy the formula in in the C-c ' = =A0and then go to each of the references and type S-downarrow as many times= . I'd thank any idea here.
>>
>> best regards, haroldo.
>> (thanks for org-mode, it's great)
>> _______________________________________________
>> Emacs-orgmode mailing list
>> Remember: use `Reply All' to send replies to the list.
>> Emacs-o= rgmode@gnu.org
>> http://lists.gnu.org/mailman/listinfo/emacs-orgmode
>>
>>
>





--0015175cba7a1110ad04706db507-- --===============0568845672== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ Emacs-orgmode mailing list Remember: use `Reply All' to send replies to the list. Emacs-orgmode@gnu.org http://lists.gnu.org/mailman/listinfo/emacs-orgmode --===============0568845672==--