From mboxrd@z Thu Jan 1 00:00:00 1970 From: Roland Donat Subject: Re: How to pass named table reference in source block variable Date: Thu, 8 Aug 2013 15:42:14 +0000 (UTC) Message-ID: References: <87mwou1mu6.fsf@gmail.com> <87ob98b4mc.fsf@gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:52340) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1V7SMR-0003cW-Ec for emacs-orgmode@gnu.org; Thu, 08 Aug 2013 11:42:54 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1V7SMI-0003Xs-6v for emacs-orgmode@gnu.org; Thu, 08 Aug 2013 11:42:47 -0400 Received: from plane.gmane.org ([80.91.229.3]:35317) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1V7SMI-0003XK-06 for emacs-orgmode@gnu.org; Thu, 08 Aug 2013 11:42:38 -0400 Received: from list by plane.gmane.org with local (Exim 4.69) (envelope-from ) id 1V7SMD-0001lw-B9 for emacs-orgmode@gnu.org; Thu, 08 Aug 2013 17:42:33 +0200 Received: from 163.116.6.12 ([163.116.6.12]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Thu, 08 Aug 2013 17:42:33 +0200 Received: from roland.donat by 163.116.6.12 with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Thu, 08 Aug 2013 17:42:33 +0200 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 Eric Schulte gmail.com> writes: > > It sounds like you want to use tables like key-value stores. I think > adding such behavior directly to Org-mode would overly complicate the > data structures passed between code blocks (which currently only > consists of scalars and tables). However, maybe the following could > work. > > > Attachment (key-value.org): text/x-org, 776 bytes > > > Cheers, > Thanks for the attachment. It works fine indeed! But should it be so complicated to add this behavior to Org-mode? I can rewrite your table as follows : #+name: table | | keys | values | |---+------+--------| | | foo | 1 | | ^ | | foo | | | bar | 2 | | ^ | | bar | Now I can refer to bar value as $bar in org-table. So, my suggestion is only to mimic this feature to assign value of source block variable like : #+headers: :results verbatim #+begin_src sh :var foo=table$foo :var bar=table$bar cat <