From mboxrd@z Thu Jan 1 00:00:00 1970 From: William Denton Subject: Problem with src_ruby inline code and [] Date: Tue, 15 Mar 2016 14:13:17 -0400 (EDT) Message-ID: Mime-Version: 1.0 Content-Type: MULTIPART/MIXED; BOUNDARY="658601964-700208960-1458065597=:28796" Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:39199) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aftTA-0005a0-8s for emacs-orgmode@gnu.org; Tue, 15 Mar 2016 14:13:24 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1aftT5-0005bj-9E for emacs-orgmode@gnu.org; Tue, 15 Mar 2016 14:13:24 -0400 Received: from shell.miskatonic.org ([65.39.236.119]:40764) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aftT5-0005b5-55 for emacs-orgmode@gnu.org; Tue, 15 Mar 2016 14:13:19 -0400 Received: from localhost (localhost [127.0.0.1]) by shell.miskatonic.org (Postfix) with ESMTP id 4A671FA0073 for ; Tue, 15 Mar 2016 14:13:17 -0400 (EDT) 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: emacs-orgmode@gnu.org This message is in MIME format. The first part should be readable text, while the remaining parts are likely unreadable without MIME-aware tools. --658601964-700208960-1458065597=:28796 Content-Type: TEXT/PLAIN; format=flowed; charset=UTF-8 Content-Transfer-Encoding: quoted-printable I was updating and exporting a file where I use Ruby to do some basic=20 arithmetic on tables, and noticed that inline code blocks where I referen= ce an=20 array aren't working. If you C-c C-c on this simple src_ruby example you get the results. src_ruby{1 + 2} {{{results(=3D3=3D)}}} But this doesn't work: #+NAME: sampletable | name | one | two | | Me | 5 | 3 | | You | 4 | 6 | src_ruby[:var t=3Dsampletable]{t[2][2]} It changes the line to src_ruby[:var t=3Dsampletable]{t[2] {{{results(=3D=3D)}}}[2]} and says: -:5: syntax error, unexpected keyword_end, expecting ']' -:7: syntax error, unexpected end-of-input, expecting keyword_end However, this does work: #+BEGIN_SRC ruby :var t=3Dsampletable t[2][2] #+END_SRC #+RESULTS: : 6 Bill --=20 William Denton =E2=86=94 Toronto, Canada =E2=86=94 https://www.miskaton= ic.org/ --658601964-700208960-1458065597=:28796--