2

I have an org table and I will like to convert in into a tree.

So, from:

| 1 | 2 | 3 |
|---+---+---|
| a | b | c |
| l | m | n |

I will like to go to:

* a
  :PROPERTIES:
  :2:        b
  :3:        c
  :END:
* l
  :PROPERTIES:
  :2:        m
  :3:        n
  :END:

I tried this. But it did not work.

Also, I am running spacemacs.

1 Answer 1

2

org-transform-table/org-tree-buffer-from-org-table only works if the table contains outlines, so for your example it would have to look like this:

| 1   | 2 | 3 |
|-----+---+---|
| * a | b | c |
| * l | m | n |

One way to transform your table is to put point in the first content cell (in your example on a) and then type M-: (org-table-eval-formula most-positive-fixnum "'(concat \"* \" $1)" nil nil t) RET. After that, M-x org-transform-table/org-tree-buffer-from-org-table RET should yield the desired result.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.