From: Nicolas Goaziou <mail@nicolasgoaziou.fr>
To: Thibault Marin <thibault.marin@gmx.com>
Cc: emacs-orgmode <emacs-orgmode@gnu.org>
Subject: Re: Add preamble support to ob-plantuml.el
Date: Fri, 09 Dec 2016 21:55:44 +0100 [thread overview]
Message-ID: <87oa0kesa7.fsf@nicolasgoaziou.fr> (raw)
In-Reply-To: <87vauwv7pm.fsf@dell-desktop.WORKGROUP> (Thibault Marin's message of "Tue, 06 Dec 2016 19:39:01 -0600")
Hello,
Thibault Marin <thibault.marin@gmx.com> 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
next prev parent reply other threads:[~2016-12-09 20:55 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-12-02 5:09 Add preamble support to ob-plantuml.el Thibault Marin
2016-12-05 21:28 ` Nicolas Goaziou
2016-12-06 3:52 ` Thibault Marin
2016-12-06 11:42 ` Nicolas Goaziou
2016-12-06 12:14 ` Rainer M Krug
2016-12-07 1:39 ` Thibault Marin
2016-12-09 20:55 ` Nicolas Goaziou [this message]
2016-12-10 4:48 ` Thibault Marin
2016-12-10 11:08 ` Nicolas Goaziou
2016-12-10 14:35 ` Thibault Marin
2016-12-10 16:05 ` Nicolas Goaziou
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.orgmode.org/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87oa0kesa7.fsf@nicolasgoaziou.fr \
--to=mail@nicolasgoaziou.fr \
--cc=emacs-orgmode@gnu.org \
--cc=thibault.marin@gmx.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).