[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [O] Add preamble support to ob-plantuml.el
From: |
Nicolas Goaziou |
Subject: |
Re: [O] Add preamble support to ob-plantuml.el |
Date: |
Fri, 09 Dec 2016 21:55:44 +0100 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/25.1 (gnu/linux) |
Hello,
Thibault Marin <address@hidden> writes:
> However, ob-plantuml does not seem to support the prologue option. So I
> am modifying my patch to add support for the :prologue and :epilogue
> header arguments instead of using a new customization variable. In the
> process, I have added support for header variables which are passed to
> the PlantUML file via the !define macro. I am also adding a test file
> which checks that the temporary file passed to the plantuml program is
> properly generated (it does not run or check the output of plantuml).
Thank you.
> Please let me know you have any comment on the patch. Thanks in
> advance.
Comments follow.
> +(defun org-babel-plantuml-var-to-plantuml (var)
> + "Cleanup plantuml variable (remove quotes)."
> + (replace-regexp-in-string "\"" "" var))
Since this function is used only once in the code, I suggest to not
implement it and use `replace-regexp-in-string' at the appropriate
place.
> +(defun org-babel-variable-assignments:plantuml (params)
> + "Return a list of PlantUML statements assigning the block's variables."
Could you document what is PARAMS?
> + (mapcar
> + (lambda (pair)
> + (format "!define %s %s"
> + (car pair)
> + (org-babel-plantuml-var-to-plantuml (cdr pair))))
> + (org-babel--get-vars params)))
> +
> +(defun org-babel-plantuml-make-body (body params)
> + "Form PlantUML input string."
Do you mean "Return PlantUML" input string? Also you need to specify
what are body and params.
Besides, the same applies to `org-babel-plantuml-var-to-plantuml' above.
Is this function really needed, as it is a mere `format'.
Regards,
--
Nicolas Goaziou
- [O] Add preamble support to ob-plantuml.el, Thibault Marin, 2016/12/02
- Re: [O] Add preamble support to ob-plantuml.el, Nicolas Goaziou, 2016/12/05
- Re: [O] Add preamble support to ob-plantuml.el, Thibault Marin, 2016/12/05
- Re: [O] Add preamble support to ob-plantuml.el, Nicolas Goaziou, 2016/12/06
- Re: [O] Add preamble support to ob-plantuml.el, Rainer M Krug, 2016/12/06
- Re: [O] Add preamble support to ob-plantuml.el, Thibault Marin, 2016/12/06
- Re: [O] Add preamble support to ob-plantuml.el,
Nicolas Goaziou <=
- Re: [O] Add preamble support to ob-plantuml.el, Thibault Marin, 2016/12/09
- Re: [O] Add preamble support to ob-plantuml.el, Nicolas Goaziou, 2016/12/10
- Re: [O] Add preamble support to ob-plantuml.el, Thibault Marin, 2016/12/10
- Re: [O] Add preamble support to ob-plantuml.el, Nicolas Goaziou, 2016/12/10