org-babel: variable values are now indexable
commit1d2bab1fb85abcfa79cd57dbb9e07c3c26856d14
authorEric Schulte <schulte.eric@gmail.com>
Sat, 14 Nov 2009 03:26:44 +0000 (13 20:26 -0700)
committerEric Schulte <schulte.eric@gmail.com>
Sun, 15 Nov 2009 03:18:12 +0000 (14 20:18 -0700)
treea5c4379d2512865731833382fd89741deb74f7f9
parent6c977c41c34fc3ed4d4ddc4537b7404382c83d85
org-babel: variable values are now indexable

  it is now possible to only assign a portion of a value to a variable
  in a source block.  So for example the following will only assign
  the second and third lines of the table 'example-table' to the
  variable 'data'

  :var data=example-table[1:2]

  and the following will only assign the second column of the first row

  :var data=example-table[0,1]

  note that all indices are 0 based

  it is possible to index into the results of source-code blocks as
  well as tables.  any number of dimensions can be indexed as long as
  they are separated by ','s and ranges can be indexed using the ':'
  operator.  for more information on indexing behavior see
  `org-babel-ref-index-list'
contrib/babel/lisp/org-babel-ref.el