emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Nicolas Goaziou <mail@nicolasgoaziou.fr>
To: Terje Larsen <terlar@gmail.com>
Cc: emacs-orgmode@gnu.org
Subject: Re: [PATCH] ob-plantuml: Support for plantuml as well as the current java+jar solution
Date: Sun, 24 Nov 2019 10:22:58 +0100	[thread overview]
Message-ID: <87k17p4oi5.fsf@nicolasgoaziou.fr> (raw)
In-Reply-To: <874kzeijnz.fsf@gmail.com> (Terje Larsen's message of "Fri, 08 Nov 2019 14:26:08 +0100")

Hello,

Terje Larsen <terlar@gmail.com> writes:

> And also see attached within this mail.

Thank you. 

Could you rebase it on top of "next" branch and add an entry in
ORG-NEWS, section "Org 9.4" about it?

> +(defcustom org-plantuml-exec-mode 'jar
> +  "Method to use for PlantUML diagram generation.
> +`jar' means to use java together with the JAR.
> +The JAR can be configured via `org-plantuml-jar-path'.
> +
> +`plantuml' means to use the PlantUML executable.
> +The executable can be configured via `org-plantuml-executable-path'.
> +You can also configure extra arguments via `org-plantuml-executable-args'."
> +  :group 'org-babel
> +  :version "24.1"

Please use 

  :package-version '(Org . "9.4")

instead.

> +(defcustom org-plantuml-executable-path "plantuml"
> +  "Path to the PlantUML executable."

File name of the PlantUML executable.

> +(defcustom org-plantuml-executable-args (list "-headless")
> +  "The arguments passed to plantuml executable when executing PlantUML."
> +  :group 'org-babel
> +  :version "24.1"

See above.

> +	 (executable-args (cond ((eq org-plantuml-exec-mode 'plantuml) org-plantuml-executable-args)
> +				(t (cond ((string= "" org-plantuml-jar-path)
> +					  (error "`org-plantuml-jar-path' is not set"))
> +					 ((not (file-exists-p org-plantuml-jar-path))
> +					  (error "Could not find plantuml.jar at %s" org-plantuml-jar-path))
> +					 (t (list java
> +						  "-jar"
> +						  (shell-quote-argument
> +						   (expand-file-name org-plantuml-jar-path))))))))

Could you merge the two `cond' in `executable-args'?

> +	 (cmd (string-join
> +	       (append
> +		(list executable)
> +		executable-args
> +		(cond ((string= (file-name-extension out-file) "png") '("-tpng"))
> +		      ((string= (file-name-extension out-file) "svg") '("-tsvg"))
> +		      ((string= (file-name-extension out-file) "eps") '("-teps"))
> +		      ((string= (file-name-extension out-file) "pdf") '("-tpdf"))
> +		      ((string= (file-name-extension out-file) "tex") '("-tlatex"))
> +		      ((string= (file-name-extension out-file) "vdx") '("-tvdx"))
> +		      ((string= (file-name-extension out-file) "xmi") '("-txmi"))
> +		      ((string= (file-name-extension out-file) "scxml") '("-tscxml"))
> +		      ((string= (file-name-extension out-file) "html") '("-thtml"))
> +		      ((string= (file-name-extension out-file) "txt") '("-ttxt"))
> +		      ((string= (file-name-extension out-file) "utxt") '("-utxt")))

Could you use 

   (pcase (file-name-extension out-file)
    ("png" ...)
    ...)

instead?

Regards,

-- 
Nicolas Goaziou

  reply	other threads:[~2019-11-24  9:23 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-11-08 13:26 Terje Larsen
2019-11-24  9:22 ` Nicolas Goaziou [this message]
2019-11-24 22:29   ` Terje Larsen
2020-02-12 17:30 ` Bastien
2020-02-16 13:20   ` Terje Larsen
2020-02-16 23:29     ` Bastien
2020-05-26 19:29       ` Terje Larsen
2020-06-01 13:59         ` Bastien
2020-06-09  6:53           ` Terje Larsen
2020-08-30 19:49             ` Terje Larsen
2020-09-04 10:38               ` Bastien

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=87k17p4oi5.fsf@nicolasgoaziou.fr \
    --to=mail@nicolasgoaziou.fr \
    --cc=emacs-orgmode@gnu.org \
    --cc=terlar@gmail.com \
    --subject='Re: [PATCH] ob-plantuml: Support for plantuml as well as the current java+jar solution' \
    /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

Code repositories for project(s) associated with this 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).