From mboxrd@z Thu Jan 1 00:00:00 1970 From: Stefan Huchler Subject: Re: Multi-step ledger org-capture template Date: Thu, 23 Aug 2018 13:37:03 +0200 Message-ID: <87o9dtjov4.fsf@mail.de> References: <876004kkor.fsf@mail.de> <87sh36j9vt.fsf@mail.de> Mime-Version: 1.0 Content-Type: text/plain Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:36710) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fsnvP-0006FQ-B3 for emacs-orgmode@gnu.org; Thu, 23 Aug 2018 07:37:15 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1fsnvL-000538-1E for emacs-orgmode@gnu.org; Thu, 23 Aug 2018 07:37:15 -0400 Received: from [195.159.176.226] (port=36325 helo=blaine.gmane.org) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1fsnvK-00051U-Pp for emacs-orgmode@gnu.org; Thu, 23 Aug 2018 07:37:10 -0400 Received: from list by blaine.gmane.org with local (Exim 4.84_2) (envelope-from ) id 1fsntC-0002Pw-Dw for emacs-orgmode@gnu.org; Thu, 23 Aug 2018 13:34:58 +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 Hmm I seem to be unable to access the data from the org-table. org-element-map seems to be pretty poorly documented, I get the data but in a strange format, (length row) returns 8 despite the table having only 6 rows. Also somehow I can't get to the data with cdr or nth or similar sequence functions. Is there some magic trick to get data (cells) from a org-table? %(progn (with-current-buffer (org-capture-get :original-buffer) (call-interactively 'copy-region-as-kill)) (with-temp-buffer "*deissenhof-import-temp*" (erase-buffer) (yank) (org-table-convert-region (buffer-end -1) (buffer-end 1) 2) (org-element-map (org-element-parse-buffer) 'table-row (lambda (row) (print "ROW {{{{") (print (length row)) (print "}}}} ROW")) nil t) (buffer-string)))