From mboxrd@z Thu Jan 1 00:00:00 1970 From: Luke Swart Subject: Fwd: can't assign to hline relative reference Date: Tue, 1 Sep 2015 01:17:33 -0700 Message-ID: References: <87613u4m4i.fsf@nicolasgoaziou.fr> Mime-Version: 1.0 Content-Type: multipart/alternative; boundary=089e0112d07ebe8697051eab2fdb Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:34060) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZWglQ-00065r-IG for emacs-orgmode@gnu.org; Tue, 01 Sep 2015 04:18:01 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ZWglO-0000jA-Dj for emacs-orgmode@gnu.org; Tue, 01 Sep 2015 04:17:56 -0400 Received: from mail-wi0-x230.google.com ([2a00:1450:400c:c05::230]:38096) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZWglN-0000j0-Pi for emacs-orgmode@gnu.org; Tue, 01 Sep 2015 04:17:54 -0400 Received: by wiclp12 with SMTP id lp12so21699971wic.1 for ; Tue, 01 Sep 2015 01:17:53 -0700 (PDT) In-Reply-To: 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: mail@nicolasgoaziou.fr Cc: emacs-orgmode@gnu.org --089e0112d07ebe8697051eab2fdb Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable I am re-sending because I didn't include everyone on the original message. ---------- Forwarded message ---------- From: Luke Swart Date: Tue, Sep 1, 2015 at 1:10 AM Subject: Re: can't assign to hline relative reference To: Luke Swart , emacs-orgmode@gnu.org Hi Nicolas Goaziou, Thanks very much for your clarification: hline relative references are not allowed on the left hand side of a formul= a My error message was user-error: Can't assign to hline relative reference, which now makes sense. Still, a lot of folks didn=E2=80=99t understand the = original message, myself included. I will update my SO post and the Github issue to reflect this new information. Still, I am confused because it seems like org-mode used to allow hline references to be assigned, no? My code snippet was taken from a section in the timesheet.el MELPA package, which was working fine until an org-mode update broke it. I may be missing something, so I am not sure if this is the case. Anyway, your response is very much appreciated! Thanks, Luke On Tue, Sep 1, 2015 at 12:47 AM, Nicolas Goaziou wrote: Hello, > > Luke Swart writes: > > > There seems to be an error when using hline-relative references in an > > org-mode table=E2=80=99s formula. For example, I have the following org= -mode > table: > > > > #+BEGIN: columnview :hlines 1 :id global > > | /Project/ | Mon | Tue | Wed | Thu | Fri | Sat | Sun | > /Total/ | > > > |----------------+-----+-----+-----+------+-----+------+-----+---------| > > | AnotherProduct | | | | | | 2.50 | | > | > > | Prototype | | | | 3.50 | | | | > | > > > |----------------+-----+-----+-----+------+-----+------+-----+---------| > > | /Daily/ | | | | | | | | > | > > #+TBLFM: @I$9..@II$9=3Dvsum($2..$8);%.2f;::@II$2..@III$9=3D'(format > > "%3.2f" (apply '+ '(@I..@II)));N; > > > > and I get the error can't assign to hline relative reference when I run > M-x > > org-table-recalculate. I looked over the org-mode references > documentation > > and the gmane.org forums > > , but I did not > find > > any reasons as to why the hline relative references could not be > > assigned. > > This is a known limitation: hline relative references are not allowed on > the left hand side of a formula. The error message you get should be > explicit. > > There are apparently subtle problems, IIRC, as pointed out in > . > > > Regards, > > -- > Nicolas Goaziou > =E2=80=8B --089e0112d07ebe8697051eab2fdb Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable
I am re-sending because I didn't include everyone on t= he original message.

---------- Forw= arded message ----------
From: Luke Swart<= /b> <luke.swar= t@gmail.com>
Date: Tue, Sep 1, 2015 at 1:10 AM
Subject:= Re: can't assign to hline relative reference
To: Luke Swart <luke.swart@gmail.com>, emacs-orgmode@gnu.org


Hi Nicolas Go= aziou,

Thanks very much for your clari= fication:

hline relative= references are not allowed on the left hand side of a formula

My error message was user-error: Can't assign to hline relative reference, which now makes sense. Still, a lot of folks didn=E2=80=99t understand= the original message, myself included. I will update my SO post and the Gi= thub issue to reflect this new information.

Still, I am confused because it= seems like org-mode used to allow hline references to be assigned, no? My = code snippet was taken from a section in the timesheet.el MELPA package, wh= ich was working fine until an org-mode update broke it. I may be missing so= mething, so I am not sure if this is the case.

Anyway, your response is very m= uch appreciated!

Thanks,

Luke

On Tue, Sep 1, 2015 at 12:47 AM= , Nicolas Goaziou <mail@nicolasgoaziou.fr> wrote:

Hello,

Luke Swart <lu= ke.swart@gmail.com> writes:

> There seems to be an error when using hline-relative references in an<= br> > org-mode table=E2=80=99s formula. For example, I have the following or= g-mode table:
>
>=C2=A0 =C2=A0 =C2=A0#+BEGIN: columnview :hlines 1 :id global
>=C2=A0 =C2=A0 =C2=A0| /Project/=C2=A0 =C2=A0 =C2=A0 | Mon | Tue | Wed |= =C2=A0 Thu | Fri |=C2=A0 Sat | Sun | /Total/ |
>=C2=A0 =C2=A0 =C2=A0|----------------+-----+-----+-----+------+-----+--= ----+-----+---------|
>=C2=A0 =C2=A0 =C2=A0| AnotherProduct |=C2=A0 =C2=A0 =C2=A0|=C2=A0 =C2= =A0 =C2=A0|=C2=A0 =C2=A0 =C2=A0|=C2=A0 =C2=A0 =C2=A0 |=C2=A0 =C2=A0 =C2=A0|= 2.50 |=C2=A0 =C2=A0 =C2=A0|=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0|
>=C2=A0 =C2=A0 =C2=A0| Prototype=C2=A0 =C2=A0 =C2=A0 |=C2=A0 =C2=A0 =C2= =A0|=C2=A0 =C2=A0 =C2=A0|=C2=A0 =C2=A0 =C2=A0| 3.50 |=C2=A0 =C2=A0 =C2=A0|= =C2=A0 =C2=A0 =C2=A0 |=C2=A0 =C2=A0 =C2=A0|=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0|
>=C2=A0 =C2=A0 =C2=A0|----------------+-----+-----+-----+------+-----+--= ----+-----+---------|
>=C2=A0 =C2=A0 =C2=A0| /Daily/=C2=A0 =C2=A0 =C2=A0 =C2=A0 |=C2=A0 =C2=A0= =C2=A0|=C2=A0 =C2=A0 =C2=A0|=C2=A0 =C2=A0 =C2=A0|=C2=A0 =C2=A0 =C2=A0 |=C2= =A0 =C2=A0 =C2=A0|=C2=A0 =C2=A0 =C2=A0 |=C2=A0 =C2=A0 =C2=A0|=C2=A0 =C2=A0 = =C2=A0 =C2=A0 =C2=A0|
>=C2=A0 =C2=A0 =C2=A0#+TBLFM: @I$9..@II$9=3Dvsum($2..$8);%.2f;::@II$2..@= III$9=3D'(format
> "%3.2f" (apply '+ '(@I..@II)));N;
>
> and I get the error can't assign to hline relative reference when = I run M-x
> org-table-recalculate. I looked over the org-mode references documenta= tion
> <http://orgmode.org/manual/References.html= > and the gmane.org forums
> <http://comments.gmane.org/gmane.emacs.or= gmode/86960>, but I did not find
> any reasons as to why the hline relative references could not be=
> assigned.

This is a known limitation: hline relative references are not allowe= d on
the left hand side of a formula. The error message you get should be
explicit.

There are apparently subtle problems, IIRC, as pointed out in
<http://comments.gmane.org/gmane.emacs.orgmode= /86960>.


Regards,

--
Nicolas Goaziou

=E2=80=8B

--089e0112d07ebe8697051eab2fdb--