From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp10.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 iNJwKlun7GI9HAEAbAwnHQ (envelope-from ) for ; Fri, 05 Aug 2022 07:15:07 +0200 Received: from aspmx1.migadu.com ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp10.migadu.com with LMTPS id IjaAKVun7GJPhgAAG6o9tA (envelope-from ) for ; Fri, 05 Aug 2022 07:15:07 +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 8787E3BC1E for ; Fri, 5 Aug 2022 07:15:07 +0200 (CEST) Received: from localhost ([::1]:60404 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1oJpfu-0004PR-De for larch@yhetil.org; Fri, 05 Aug 2022 01:15:06 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:37838) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oJpfA-0004PG-CV for emacs-orgmode@gnu.org; Fri, 05 Aug 2022 01:14:20 -0400 Received: from mail-pj1-x102f.google.com ([2607:f8b0:4864:20::102f]:44775) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1oJpf8-0000Zu-PK for emacs-orgmode@gnu.org; Fri, 05 Aug 2022 01:14:20 -0400 Received: by mail-pj1-x102f.google.com with SMTP id e8-20020a17090a280800b001f2fef7886eso1778124pjd.3 for ; Thu, 04 Aug 2022 22:14:18 -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=GbpRbY38XD3ypA/TQVnGmV8OyPZkjzs+kaCz8017pGE=; b=SisjWCjHfdcM4ZJE64cD9LKzTH5ZLKNsQxvB2JbDbN0hJVvOmeLNwRzgp4ywTn06tV n0d1USiUAxMx80Fdur+uqo6cCg5RAptxoT/aowldrZLcFsA8CAe39E/zCNZyoNKyT3SC oGnPzEn2Dw7LR/znu7zLuJAT/eFJlh8ORgTi7bv6lP2na2/RU7CHsGIM6dnnr3Cfl2os XD9+XjiXYpNXmGapfw4IPFtn8K/IGK9fvB0hRVRF8VV81XUATwpIsz2n/f7TKaPFFi+d 1TiRz6UkW5NZqfYh2l58M4AsD9ksqDoi5KVZBeRxk2rkQQg2veBfx4YTjsvT3BT8tA49 Gc/g== 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=GbpRbY38XD3ypA/TQVnGmV8OyPZkjzs+kaCz8017pGE=; b=CmsRUhN4f1W1k+IQ9bDQTXE5HvI2YSICAUG74adIb3U2yNx4plcl0W4txWix4oa9QW xjNORMWm3Lu3Yvrc7HwOb7ataLs/37W3dfs71lSHlAF9hIfMuVQheqES9aX6iRZpgsok FpFMeSIZER79leev/VIDZsLHzQa4W5UAnJ1IT3yvv94wpcU1KEaMNqzHBfrb8WUy14zC +EbxdrNxe4yS6PwRtBLF+H8ES937HNVgo7NkAgXo6MVRZemhZ5gdbYpz2W55j9/0qbFp YfC3Wq7lC+T9bSfH+yLbwt8Emw1IVRFGoY6b5kaD4xKx7TGvzLfez4MDDkpBDUH0MadI rz1A== X-Gm-Message-State: ACgBeo1FjhBwnqhbP5jPn/BFLl2ocnCH9ffH0CWPbOr6X7jqkWJbF2pQ jFQGdhUp0XoXcsyIvNsxjdq5c4uapJs= X-Google-Smtp-Source: AA6agR7aM2isrbyvqn9+n7px7XoqVDpBCvPvBlJKVxStzBRa0Ma9WU15rLmWycXb0eH77kpW444HKQ== X-Received: by 2002:a17:902:f649:b0:16d:22fd:5c14 with SMTP id m9-20020a170902f64900b0016d22fd5c14mr5297306plg.98.1659676457016; Thu, 04 Aug 2022 22:14:17 -0700 (PDT) Received: from localhost ([115.154.175.57]) by smtp.gmail.com with ESMTPSA id x134-20020a62868c000000b0052e67e9402dsm1915983pfd.106.2022.08.04.22.14.15 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 04 Aug 2022 22:14:16 -0700 (PDT) From: Ihor Radchenko To: Joseph Turner Cc: emacs-orgmode@gnu.org Subject: Re: [PATCH v2] lisp/ob-plantuml.el: Insert results in buffer In-Reply-To: <20220803190245.26056-1-joseph@breatheoutbreathe.in> References: <20220803190245.26056-1-joseph@breatheoutbreathe.in> Date: Fri, 05 Aug 2022 13:15:23 +0800 Message-ID: <87zggjnudw.fsf@localhost> MIME-Version: 1.0 Content-Type: text/plain Received-SPF: pass client-ip=2607:f8b0:4864:20::102f; envelope-from=yantar92@gmail.com; helo=mail-pj1-x102f.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: scn1.migadu.com X-TUID: MeWUzLS4FGXi Joseph Turner writes: > When :results header arg is set to a value that doesn't include > "file", insert txt output in buffer below src block. This looks reasonable. Thanks! > - (let* ((out-file (or (cdr (assq :file params)) > - (error "PlantUML requires a \":file\" header argument"))) > + (let* ((do-export (member "file" > + (split-string (cdr (assq :results params))))) Let's take this opportunity and fix another omission in ob-plantuml. :results may generally contain Elisp sexps to be evaluated and the whole split-string busyness is not accurate. Please use :result-params list instead of :results. Also, can you please update the ob-plantuml documentation according to the changes made. The current version is in https://orgmode.org/worg/org-contrib/babel/languages/ob-doc-plantuml.html You will need to create a patch against https://git.sr.ht/~bzg/worg/tree/master/item/org-contrib/babel/languages/ob-doc-plantuml.org repo. Best, Ihor