From mboxrd@z Thu Jan 1 00:00:00 1970 From: Luke Swart Subject: Re: can't assign to hline relative reference Date: Tue, 1 Sep 2015 01:10:03 -0700 Message-ID: References: <87613u4m4i.fsf@nicolasgoaziou.fr> Mime-Version: 1.0 Content-Type: multipart/alternative; boundary=14dae9cc98c8f3076d051eab14f0 Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:33456) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZWgj4-000439-Qv for emacs-orgmode@gnu.org; Tue, 01 Sep 2015 04:15:36 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ZWgj3-0007bm-A1 for emacs-orgmode@gnu.org; Tue, 01 Sep 2015 04:15:30 -0400 Received: from mail-wi0-x233.google.com ([2a00:1450:400c:c05::233]:36496) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZWge8-00065L-Oe for emacs-orgmode@gnu.org; Tue, 01 Sep 2015 04:10:25 -0400 Received: by wibz8 with SMTP id z8so23047892wib.1 for ; Tue, 01 Sep 2015 01:10:23 -0700 (PDT) In-Reply-To: <87613u4m4i.fsf@nicolasgoaziou.fr> 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: Luke Swart , emacs-orgmode@gnu.org --14dae9cc98c8f3076d051eab14f0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable 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 --14dae9cc98c8f3076d051eab14f0 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable

Hi Nicolas Goaziou,

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, wh= ich now makes sense. Still, a lot of folks didn=E2=80=99t understand the or= iginal message, myself included. I will update my SO post and the Github is= sue 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
--14dae9cc98c8f3076d051eab14f0--