From mboxrd@z Thu Jan 1 00:00:00 1970 From: Austin Frank Subject: include value of single table cell in text? Date: Tue, 27 Jul 2010 04:45:22 -0400 Message-ID: Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="===============1745991932==" Return-path: Received: from [140.186.70.92] (port=54279 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1OdfnJ-0008QA-KH for emacs-orgmode@gnu.org; Tue, 27 Jul 2010 04:45:51 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1OdfnE-0004nH-VW for emacs-orgmode@gnu.org; Tue, 27 Jul 2010 04:45:49 -0400 Received: from lo.gmane.org ([80.91.229.12]:46386) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1OdfnE-0004mv-H8 for emacs-orgmode@gnu.org; Tue, 27 Jul 2010 04:45:44 -0400 Received: from list by lo.gmane.org with local (Exim 4.69) (envelope-from ) id 1OdfnD-0007GZ-7U for emacs-orgmode@gnu.org; Tue, 27 Jul 2010 10:45:43 +0200 Received: from cpe-66-66-11-181.rochester.res.rr.com ([66.66.11.181]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Tue, 27 Jul 2010 10:45:43 +0200 Received: from austin.frank by cpe-66-66-11-181.rochester.res.rr.com with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Tue, 27 Jul 2010 10:45:43 +0200 List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: emacs-orgmode@gnu.org --===============1745991932== Content-Type: multipart/signed; boundary="=-=-="; micalg=pgp-sha1; protocol="application/pgp-signature" --=-=-= Content-Transfer-Encoding: quoted-printable Hello! Is it possible to include the value of a single cell from an org-mode table in the body of an org-mode document? That is, given #+TBLNAME: test-table | key | value | |-----+-------| | a | 1 | | b | 2 | Is there any way to refer to cell @2$2 within the text of an org-mode document, and have that reference converted to the value "2" during export? I believe one approach would be to use babel's in-line source evaluation capabilities along with the remote() function from the org spreadsheet editor. But I haven't yet been able to identify the right combination of those functions to get the desired result. This, for example, doesn't work for me: =2D-8<---------------cut here---------------start------------->8--- #+TBLNAME: test-table | key | value | |-----+-------| | a | 1 | | b | 2 | I'm testing to see whether src_emacs-lisp{(org-table-eval-formula "remote(test-table @2$2)")} works. =2D-8<---------------cut here---------------end--------------->8--- It throws an error during export, because I'm not in a table data field. Additionally, if there's not already a built-in way to do this, I'd nominate this functionality for some special syntax. Following babel's inlining and remote reference conventions, maybe table{test-table @2$2} or <> This would make it very easy to refer to specific elements the tabular output of babel blocks, adding to the utility of babel as a meta-programming language for org-mode. Thanks for any help! /au =2D-=20 Austin Frank http://aufrank.net GPG Public Key (D7398C2F): http://aufrank.net/personal.asc --=-=-= Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.10 (Darwin) iEYEARECAAYFAkxOnKMACgkQlHMl2/XbR4HAsgCg4Xh2zwfpGXG6DUtks4ToqerF p1sAoLqYIGVa1qrzgytGEURuKs1onsDl =ZrUt -----END PGP SIGNATURE----- --=-=-=-- --===============1745991932== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ Emacs-orgmode mailing list Please use `Reply All' to send replies to the list. Emacs-orgmode@gnu.org http://lists.gnu.org/mailman/listinfo/emacs-orgmode --===============1745991932==--