emacs-orgmode
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Help with a workflow to export plantuml diagrams


From: Ihor Radchenko
Subject: Re: Help with a workflow to export plantuml diagrams
Date: Tue, 17 Jan 2023 13:28:40 +0000

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

-- 
Ihor Radchenko // yantar92,
Org mode contributor,
Learn more about Org mode at <https://orgmode.org/>.
Support Org development at <https://liberapay.com/org-mode>,
or support my work at <https://liberapay.com/yantar92>



reply via email to

[Prev in Thread] Current Thread [Next in Thread]