Thanks, Ihor

I can't make it to work by now, but that could be a path to the correct workflow.

Best regards :-)


El 17/01/2023 a las 14:28, Ihor Radchenko escribió:
Ypo <ypuntot@gmail.com> writes:

Could be the headlines exported in a faster way?

Could be possible to avoid the duplication of information? (To create 
the diagram directly from the headlines, without yanking a copy of them).
You can use noweb reference syntax.

#+name: collect-headings
#+begin_src emacs-lisp :results silent
;; Collect all the headings in current buffer.
(concat
 "* Top\n"
 (mapconcat
  #'identity
  (org-map-entries
   '(concat "*"
            (buffer-substring-no-properties
             (line-beginning-position) (line-end-position))))
  "\n"))
#+end_src

#+begin_src plantuml :noweb yes :file my-diagram.png
@startwbs
<<collect-headings()>>
@endwbs
#+end_src