emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Ihor Radchenko <yantar92@gmail.com>
To: Joseph Turner <joseph@breatheoutbreathe.in>
Cc: emacs-orgmode@gnu.org
Subject: Re: [PATCH] lisp/ob-plantuml.el: Insert results in buffer
Date: Tue, 26 Jul 2022 13:50:43 +0800	[thread overview]
Message-ID: <877d40ctho.fsf@localhost> (raw)
In-Reply-To: <87o7xdot4d.fsf@breatheoutbreathe.in>

Joseph Turner <joseph@breatheoutbreathe.in> writes:

>> The solution will be simply removing the default :results setting.
>
> I think you're suggesting something like this:
>
> (defvar org-babel-default-header-args:plantuml
>   '((:exports . "results"))
>   "Default arguments for evaluating a plantuml source block.")
>
> With this change, if you *do* add a :file arg, like in the following
> example, then no output will be produced:
>
> #+begin_src plantuml :file "this.png"
>   Bob->Alice : Hello1!
> #+end_src
>
> #+RESULTS:
>
> which is also wrong.

> What would the code look like if we wanted to change the
> org-babel-default-header-args:plantuml variable inside the
> org-babel-execute:plantuml function based on the value of the params
> arg? Or perhaps you have a different solution?

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.

Best,
Ihor



  reply	other threads:[~2022-07-26  5:50 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-07-19 23:15 [PATCH] lisp/ob-plantuml.el: Insert results in buffer Joseph Turner
2022-07-25 13:15 ` Ihor Radchenko
2022-07-25 19:52   ` Joseph Turner
2022-07-26  5:50     ` Ihor Radchenko [this message]
2022-07-27 20:51       ` Joseph Turner
2022-07-28 14:36         ` Ihor Radchenko
2022-07-31 22:05           ` Joseph Turner
2022-08-02 12:42             ` Ihor Radchenko

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=877d40ctho.fsf@localhost \
    --to=yantar92@gmail.com \
    --cc=emacs-orgmode@gnu.org \
    --cc=joseph@breatheoutbreathe.in \
    /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).