From mboxrd@z Thu Jan 1 00:00:00 1970 From: Thorsten Jolitz Subject: Re: manipulate org tables using emacs-lisp Date: Fri, 30 Sep 2016 22:52:36 +0200 Message-ID: <87k2dtm7or.fsf@gmail.com> References: Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:42172) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bq4nl-00052b-0X for emacs-orgmode@gnu.org; Fri, 30 Sep 2016 16:53:01 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bq4nh-0000qY-U4 for emacs-orgmode@gnu.org; Fri, 30 Sep 2016 16:53:01 -0400 Received: from [195.159.176.226] (port=47625 helo=blaine.gmane.org) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bq4nh-0000oc-Na for emacs-orgmode@gnu.org; Fri, 30 Sep 2016 16:52:57 -0400 Received: from list by blaine.gmane.org with local (Exim 4.84_2) (envelope-from ) id 1bq4nW-00079V-9t for emacs-orgmode@gnu.org; Fri, 30 Sep 2016 22:52:46 +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" To: emacs-orgmode@gnu.org Alan Schmitt writes: Hi Alan, > Are there functions for manipulating org-tables using emacs-lisp? More > precisely, I would like to refer to a table by its name, read some cells > (either by position or by matching some given text with some text in the > first row/column), and write in some cells. ,----[ C-h f org-table-to-lisp RET ] | org-table-to-lisp is an autoloaded compiled Lisp function in | ‘../org-mode/lisp/org-table.el’. | | (org-table-to-lisp &optional TXT) | | Convert the table at point to a Lisp structure. | The structure will be a list. Each item is either the symbol ‘hline’ | for a horizontal separator line, or a list of field values as strings. | The table is taken from the parameter TXT, or from the buffer at point. | | [back] `---- returns the table as a nested list you can map with lots of Elisp functions (like mapcar). Ex.: | my | tab | | 1 | 2 | => (("my" "tab") ("1" "2")) -- cheers, Thorsten