I've been struggling with the basic
org-element-parse-buffer (see here) usage. Specifically, how do I make it work? It's not interactive, so it has to be called from within an org-mode buffer, I'm guessing in a source code block. I try this solution:
#+begin_src emacs-lisp (let ((parsetree (org-element-parse-buffer 'headline))) (org-element-map parsetree 'headline (lambda (hl) (org-element-property :title hl)))) #+end_src #+RESULTS: | JANUARY | 2018-01-23T16:54:53 | 2018-01-23T19:37:21 | 2018-01-24T02:37:07 |
and get the results in a results table format. Good. But how do I get the whole buffer as an AST (one big nested list) as advertised?
#+begin_src emacs-lisp (org-element-parse-buffer) #+end_src
org-babel-insert-result: Wrong type argument: markerp, nil
I still have hope that some year I'll be productive with Emacs/org-mode....