lang/plantuml: error on export in server mode
'server compilation fails when exporting org files with plantuml diagrams.
This commit is contained in:
parent
0bf2f1d9bf
commit
91deaa49eb
1 changed files with 12 additions and 10 deletions
|
@ -15,16 +15,18 @@ This function is called by `org-babel-execute-src-block'."
|
||||||
(org-babel-temp-file "plantuml-" ".png")))
|
(org-babel-temp-file "plantuml-" ".png")))
|
||||||
(in-file (org-babel-temp-file "plantuml-")))
|
(in-file (org-babel-temp-file "plantuml-")))
|
||||||
(if (eq plantuml-default-exec-mode 'server)
|
(if (eq plantuml-default-exec-mode 'server)
|
||||||
(save-current-buffer
|
(if (bound-and-true-p org-export-current-backend)
|
||||||
(save-match-data
|
(user-error "Exporting plantuml diagrams in server mode is not supported (see `plantuml-default-exec-mode')")
|
||||||
(with-current-buffer
|
(save-current-buffer
|
||||||
(url-retrieve-synchronously (plantuml-server-encode-url body)
|
(save-match-data
|
||||||
nil t)
|
(with-current-buffer
|
||||||
(goto-char (point-min))
|
(url-retrieve-synchronously (plantuml-server-encode-url body)
|
||||||
;; skip the HTTP headers
|
nil t)
|
||||||
(while (not (looking-at "\n")) (forward-line))
|
(goto-char (point-min))
|
||||||
(delete-region (point-min) (+ 1 (point)))
|
;; skip the HTTP headers
|
||||||
(write-file out-file))))
|
(while (not (looking-at "\n")) (forward-line))
|
||||||
|
(delete-region (point-min) (+ 1 (point)))
|
||||||
|
(write-file out-file)))))
|
||||||
(let* ((cmd (concat (cond ((eq plantuml-default-exec-mode 'executable)
|
(let* ((cmd (concat (cond ((eq plantuml-default-exec-mode 'executable)
|
||||||
(unless (executable-find plantuml-executable-path)
|
(unless (executable-find plantuml-executable-path)
|
||||||
(error "Could not find plantuml at %s"
|
(error "Could not find plantuml at %s"
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue