[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [O] Multi-step ledger org-capture template
From: |
Stefan Huchler |
Subject: |
Re: [O] Multi-step ledger org-capture template |
Date: |
Thu, 23 Aug 2018 13:37:03 +0200 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/25.3 (gnu/linux) |
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)))