From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp12.migadu.com ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms5.migadu.com with LMTPS id yCgeHreA32InAAAAbAwnHQ (envelope-from ) for ; Tue, 26 Jul 2022 07:50:47 +0200 Received: from aspmx1.migadu.com ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp12.migadu.com with LMTPS id ONLcHbeA32ICMAEAauVa8A (envelope-from ) for ; Tue, 26 Jul 2022 07:50:47 +0200 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id 4B3AD103FE for ; Tue, 26 Jul 2022 07:50:47 +0200 (CEST) Received: from localhost ([::1]:60716 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1oGDSw-0006Gf-8p for larch@yhetil.org; Tue, 26 Jul 2022 01:50:46 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:54378) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oGDRu-0006GT-TD for emacs-orgmode@gnu.org; Tue, 26 Jul 2022 01:49:42 -0400 Received: from mail-pl1-x636.google.com ([2607:f8b0:4864:20::636]:42853) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1oGDRt-0000kH-DS for emacs-orgmode@gnu.org; Tue, 26 Jul 2022 01:49:42 -0400 Received: by mail-pl1-x636.google.com with SMTP id d7so12369648plr.9 for ; Mon, 25 Jul 2022 22:49:40 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=from:to:cc:subject:in-reply-to:references:date:message-id :mime-version; bh=WimRZlvbNh3vNcJ3ZjlLS3JpDoEExyJ9wGHySXLccfE=; b=cPm7ENLiMHrMVZNPUfSzeLCbGeozv/N4BgES/ktZakHJKl41mjAqvOlSfuYGBFy0HU iBpilQ0RUtiZQveMnGRsXc4wxkrj9xjtCHqY+DzYoAJbYtdOWV8R9cVbxP4SFd0pe3vh 29210yJapbjSXVlcDt71EgtAloRW7vz6Rp8e/v2g64trhvtUPXM6s0p3tQxBq5jKd6Yp 5aBSufloa+0wxbmMyzAJjp/sahUJIy87p49q8SZlR9wyRqFYVGV6LRNuvhWNFwSVxsfE 9Qsl4/zbo4LPgVr2e8DoI49BY8tlVnVO5uO5vDkdD1Z4k1j+ZCPBCx0RDcKtwUzkn4ha XZPQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:in-reply-to:references:date :message-id:mime-version; bh=WimRZlvbNh3vNcJ3ZjlLS3JpDoEExyJ9wGHySXLccfE=; b=JAMJ9AIR/eeMyPfQrhe/dQ/XenuUOhPJL7r1elR7kRpeIlL5ue7QgkCs/wOO/72I+3 Zejy0Ttx51csWFzS7qVQgtcFgBK6MJrlV2cvax6Ff4iiu+3o6SGC5/4BxP2IyuHQ+xPV fv3Zye5i2pyYRrpAiqdZvA+mN0NO8fLOZepGnbcOTB6f4SxNXw4gy8sZEoOONwRWhBX4 QVSc1SLJspIFbUSTbOBql+Etuv9++DHYAMnSKV0AvLuqYEo2hBEDT3o001WfdqQefOlM p0cIcefc75kw8dZfLrvt5Thprx54ZuMQ7SrRa84zCNUaclFYDO+bxytlfKWLR+vDoYSy Hrdg== X-Gm-Message-State: AJIora/BFQobMjn4pQrAJWUyweKSFz4QT5aejmxDy3Uco66Zs6PUpoH9 KtA6R0tbxf9PrvVmEkkfREc= X-Google-Smtp-Source: AGRyM1vFKzcO+yu/wx4IbFyfB0lDWGnpPdjL4IQgarYhLlV7UZPeEIVIW3uUotl7cxIjIGXyMzmf8w== X-Received: by 2002:a17:902:ec90:b0:16d:2e8f:27cb with SMTP id x16-20020a170902ec9000b0016d2e8f27cbmr15788412plg.12.1658814578876; Mon, 25 Jul 2022 22:49:38 -0700 (PDT) Received: from localhost ([115.154.175.57]) by smtp.gmail.com with ESMTPSA id m11-20020a170902d18b00b0016bf4428586sm10053991plb.208.2022.07.25.22.49.37 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 25 Jul 2022 22:49:38 -0700 (PDT) From: Ihor Radchenko To: Joseph Turner Cc: emacs-orgmode@gnu.org Subject: Re: [PATCH] lisp/ob-plantuml.el: Insert results in buffer In-Reply-To: <87o7xdot4d.fsf@breatheoutbreathe.in> References: <20220719231520.100206-1-joseph@breatheoutbreathe.in> <87bktduydf.fsf@localhost> <87o7xdot4d.fsf@breatheoutbreathe.in> Date: Tue, 26 Jul 2022 13:50:43 +0800 Message-ID: <877d40ctho.fsf@localhost> MIME-Version: 1.0 Content-Type: text/plain Received-SPF: pass client-ip=2607:f8b0:4864:20::636; envelope-from=yantar92@gmail.com; helo=mail-pl1-x636.google.com X-Spam_score_int: -18 X-Spam_score: -1.9 X-Spam_bar: - X-Spam_report: (-1.9 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_ENVFROM_END_DIGIT=0.25, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: emacs-orgmode@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+larch=yhetil.org@gnu.org Sender: "Emacs-orgmode" Authentication-Results: aspmx1.migadu.com; none X-Migadu-Scanner: scn0.migadu.com X-TUID: e99snWLZYrUr Joseph Turner 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