jplindstrom / emacs-org-transform-tree-table

Transform an org-mode outline and its properties to a table format (org-table, CSV)
GNU General Public License v3.0
26 stars 4 forks source link

how to make it work? #3

Closed ghost closed 4 years ago

ghost commented 7 years ago

Hello,

I would like to know if you can help me on how to use your package. I have this file. I open it in, activate org-mode, I do M-: (require 'org-transform-tree-table) then M-x org-transform-table/org-tree-buffer-from-csv, but I get an error: Before first headline at position 29 in buffer reviews.txt-tree.csv . I also tried in csv-mode, and with other files. Your package seems very interesting to me, but I don't know how to use it.

What am I doing wrong? Thanks.

jplindstrom commented 7 years ago

I just tried with that file, and I get the same result. Emacs 24.3.1 . Might be an issue with the version of Emacs or org-mode.

I haven't got time to look into it right now, but maybe at the weekend (maybe).

ghost commented 7 years ago

Thanks :)

    #+BEGIN_SRC emacs-lisp
      (org-version)
    #+END_SRC

    #+RESULTS:
    : 9.0.7
    #+BEGIN_SRC emacs-lisp
      (emacs-version)
    #+END_SRC

    #+RESULTS:
    : GNU Emacs 24.4.1 (x86_64-pc-linux-gnu, GTK+ Version 3.4.2)
    :  of 2015-01-11 on maritornes, modified by Debian
WernerHeijstek commented 6 years ago

Exact same problem here.

    #+BEGIN_SRC emacs-lisp
      (org-version)
    #+END_SRC

    #+RESULTS:
    : 9.1.2
    #+BEGIN_SRC emacs-lisp
      (emacs-version)
    #+END_SRC

   #+RESULTS:
    : GNU Emacs 25.1.1 (x86_64-apple-darwin13.4.0, NS appkit-1265.21 Version 10.9.5 (Build 13F1911))
    :  of 2016-09-21
jplindstrom commented 4 years ago

The problem here is that the data file is one that isn't originally converted from an org-mode tree. As such, it lacks the general structure that a data file converted from and org-mode tree would have, primarily the org heading levels in the first column, e.g. "* Gizmo", but also the first header column being "Heading".

I've added some docs to clairfy this, and validation so that the error messages more useful than cryptic. If anyone feels like it would be useful to support some kind of sensible default behaviour for this, feel free to open another issue to discuss. I'm very unlikely to implement this though, but patches welcome :)