From mboxrd@z Thu Jan  1 00:00:00 1970
From: Nicolas Goaziou <mail@nicolasgoaziou.fr>
Subject: Re: Bug: table/calc: subscr() fails with *bold* headline
Date: Sun, 04 Sep 2016 16:33:49 +0200
Message-ID: <87twdvwx82.fsf@saiph.selenimh>
References: <2016-09-03T13-29-50@devnull.Karl-Voit.at>
Mime-Version: 1.0
Content-Type: text/plain
Return-path: <emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org>
Received: from eggs.gnu.org ([2001:4830:134:3::10]:42152)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <mail@nicolasgoaziou.fr>) id 1bgYUc-0004pt-KT
	for emacs-orgmode@gnu.org; Sun, 04 Sep 2016 10:33:55 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <mail@nicolasgoaziou.fr>) id 1bgYUa-0007IB-Hq
	for emacs-orgmode@gnu.org; Sun, 04 Sep 2016 10:33:53 -0400
Received: from relay3-d.mail.gandi.net ([2001:4b98:c:538::195]:36223)
	by eggs.gnu.org with esmtp (Exim 4.71)
	(envelope-from <mail@nicolasgoaziou.fr>) id 1bgYUa-0007I5-C6
	for emacs-orgmode@gnu.org; Sun, 04 Sep 2016 10:33:52 -0400
In-Reply-To: <2016-09-03T13-29-50@devnull.Karl-Voit.at> (Karl Voit's message
	of "Sat, 3 Sep 2016 13:30:21 +0200")
List-Id: "General discussions about Org-mode." <emacs-orgmode.gnu.org>
List-Unsubscribe: <https://lists.gnu.org/mailman/options/emacs-orgmode>,
	<mailto:emacs-orgmode-request@gnu.org?subject=unsubscribe>
List-Archive: <http://lists.gnu.org/archive/html/emacs-orgmode/>
List-Post: <mailto:emacs-orgmode@gnu.org>
List-Help: <mailto:emacs-orgmode-request@gnu.org?subject=help>
List-Subscribe: <https://lists.gnu.org/mailman/listinfo/emacs-orgmode>,
	<mailto:emacs-orgmode-request@gnu.org?subject=subscribe>
Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org
Sender: "Emacs-orgmode"
	<emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org>
To: Karl Voit <devnull@Karl-Voit.at>
Cc: Karl Voit <news1142@Karl-Voit.at>, emacs-orgmode@gnu.org

Hello,

Karl Voit <devnull@Karl-Voit.at> writes:

> I've found a bug when using subscr() to copy a value from a previous
> row. If the corresponding headline is in *bold* letters, the formula
> does not work:
>
> | *Value* | Previous Value |
> |---------+----------------|
> |       1 |                |
> |       2 | #ERROR         |
> |       3 | #ERROR         |
> |       4 | #ERROR         |
> #+TBLFM: @3$2..@>$2 = subscr(@<$1..@>$1, @# - 1)

This is not a bug in Org.

Calc probably considers *Value* as an invalid operation (missing
operands). You can simply ignore the header line

  subscr(@<<$1..@>$1, @# - 1)

or turn any suspicious value as a number

  subscr(@<$1..@>$1, @# - 1);N

Regards,

-- 
Nicolas Goaziou