[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH] lisp/ob-plantuml.el: Insert results in buffer
From: |
Ihor Radchenko |
Subject: |
Re: [PATCH] lisp/ob-plantuml.el: Insert results in buffer |
Date: |
Thu, 28 Jul 2022 22:36:31 +0800 |
Joseph Turner <joseph@breatheoutbreathe.in> writes:
> Ihor Radchenko <yantar92@gmail.com> writes:
>> You can examine :result-params property inside params plist. If that
>> property does not explicitly mention different results Type (see 16.6
>> Results of Evaluation), ob-plantuml may set the type to "file" with
>> plist-put.
>
> Perhaps I'm confused, but I think org-babel-default-header-args:plantuml
> is actually an alist, right?
Yes, you are right indeed.
> I tried removing the (:results . "file") from
> org-babel-default-header-args:plantuml, and then overwriting the params
> argument inside the let* block like so:
>
> ```
> (let* ((do-export (cdr (assq :file params)))
> (params (if do-export
> (add-to-list 'params '(:results . "file")))
> (out-file ...
> ```
>
> Logging the params variable after the let* block reveals that :results
> is set to "file", but I still get "Code block produced no output" when
> I try to evaluate the plantuml org src block.
>
> Thoughts?
You also need to change :result-params and :result-type.
See `org-babel-execute-src-block'.
Best,
Ihor