From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp2.migadu.com ([2001:41d0:303:e224::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms1.migadu.com with LMTPS id kAR4B6DqJ2YvwwAAe85BDQ:P1 (envelope-from ) for ; Tue, 23 Apr 2024 19:06:40 +0200 Received: from aspmx1.migadu.com ([2001:41d0:303:e224::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp2.migadu.com with LMTPS id kAR4B6DqJ2YvwwAAe85BDQ (envelope-from ) for ; Tue, 23 Apr 2024 19:06:40 +0200 X-Envelope-To: larch@yhetil.org Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=adamkovic.org header.s=fm1 header.b=bjux7lYI; dkim=pass header.d=messagingengine.com header.s=fm3 header.b="J 5CM+4g"; spf=pass (aspmx1.migadu.com: domain of "emacs-orgmode-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="emacs-orgmode-bounces+larch=yhetil.org@gnu.org"; dmarc=pass (policy=none) header.from=adamkovic.org ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1713892000; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:list-id:list-help: list-unsubscribe:list-subscribe:list-post:dkim-signature; bh=YUA9CazOlAovRNFrokemUBAtLhch+OV0+e+dKn7/b1U=; b=YsdhROJbJxukZGVl/BEjZnWIkDd7AQdXbA5I2Ivd4ZfiwsukNbw6L73vxRQ+kYvotB3U5C tBK5tMcLpN9QyoV/2xaQSC83HOvMDXN7nHUCm4iaIY2078Hoq4c5WVz/irpZqgLlRsGGk1 yV8+fhZjXtLiGxLmxgbZsKTJ7VUmVIppRoVUjfixMrN4849jFU+2TYhQ625EntMd5B+hCP RJw4BR/rWS9Oq6RjHkUwUQ/Zt5INYC08xfGQH+lEClUXkImqBY+eRBd2WT+NAME/HFpfn/ BfvPA3OEpMG8cCVsh3FIYMLgO4DCsKPvMyfYrnfjqZ2x7LSbR9R7SIDPeI+p0A== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1713892000; a=rsa-sha256; cv=none; b=YLqx8vjZ2BWARxgGbQD9Hf3qCmM+iNCAdf57r9Xsyx6vQV0i+Lfu3gUOHeJdIOUsjK1eME 1UBbcF4jN3Q0Z2sa1oiFzmmIOzHhjyDSOnwRPJtQsK5mQZ28NZmv8dsDWKr1rQRKfrzTRL Mn8Fn/COToVKEarcuBhO3Lt6PFfHxR2pOPePzyVU2us6Ux3TqJ9ZWqUumTWMKYoKgwfFTf sdKuorHOXGimajD9ZDaVRd9kzyQKq+YMjh1GsyjNcuANkoQc8JlxweGaL+aLMV5EuIj2BX eZtjsL4gtdB2Ijztf0M64VaxW+qksrXthhD187P4eP+0x3pQEIgmbiIZkx73Yw== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=pass header.d=adamkovic.org header.s=fm1 header.b=bjux7lYI; dkim=pass header.d=messagingengine.com header.s=fm3 header.b="J 5CM+4g"; spf=pass (aspmx1.migadu.com: domain of "emacs-orgmode-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="emacs-orgmode-bounces+larch=yhetil.org@gnu.org"; dmarc=pass (policy=none) header.from=adamkovic.org 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 9EE5D1993D for ; Tue, 23 Apr 2024 19:06:39 +0200 (CEST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1rzJaN-0000AP-Vn; Tue, 23 Apr 2024 13:05:41 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1rzJa2-0008VS-Mn for emacs-orgmode@gnu.org; Tue, 23 Apr 2024 13:05:22 -0400 Received: from fhigh1-smtp.messagingengine.com ([103.168.172.152]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1rzJa0-0006q2-T4 for emacs-orgmode@gnu.org; Tue, 23 Apr 2024 13:05:18 -0400 Received: from compute5.internal (compute5.nyi.internal [10.202.2.45]) by mailfhigh.nyi.internal (Postfix) with ESMTP id 0519811400BF for ; Tue, 23 Apr 2024 13:05:16 -0400 (EDT) Received: from mailfrontend2 ([10.202.2.163]) by compute5.internal (MEProxy); Tue, 23 Apr 2024 13:05:16 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=adamkovic.org; h=cc:content-transfer-encoding:content-type:content-type:date :date:from:from:in-reply-to:in-reply-to:message-id:mime-version :references:reply-to:subject:subject:to:to; s=fm1; t=1713891915; x=1713978315; bh=YUA9CazOlAovRNFrokemUBAtLhch+OV0+e+dKn7/b1U=; b= bjux7lYIDTtwvSf7CD74x5vNDhCo451iht0h1XZ1kLLj8FEYlgjgLxdm0QVfi0nn rGjlmJXp0/7pXk4RLGcOdoCXXsom/raIBA36OQyn2+Y7bALEmOv8/7CFQDK5ItRq ErMTvGVhgWCazOmaOzR2fWr07Dc6sJh+cWDjtRiHKHwLjOrpbixApyy7cVRFxdYW serpX+3xqflzWEaTmmMPv2TLVT7zn6JZ+S6QhtaYWQHrFZgsK2y8GJwnQ5shtTtf bIgsOKdgv6JXamo50h/YG4Vne5qR3N7QeviWS1T/Uvpp4iB6fk/Gsh4KyLo9Pvnk Pxl6dK12oihydCP2mtnPaA== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-transfer-encoding:content-type :content-type:date:date:feedback-id:feedback-id:from:from :in-reply-to:in-reply-to:message-id:mime-version:references :reply-to:subject:subject:to:to:x-me-proxy:x-me-proxy :x-me-sender:x-me-sender:x-sasl-enc; s=fm3; t=1713891915; x= 1713978315; bh=YUA9CazOlAovRNFrokemUBAtLhch+OV0+e+dKn7/b1U=; b=J 5CM+4gEdGAytcXdHx+dO7i/a7T+MFQmCiQoL2SCyJIuaNgG/qkJHvqA4TLVGIaav IacRVAJsOUHYzOEGDQdsOe+ovLEXsyGG4rkLI/rMn+i6ezCEwyKeiTLgZhD6tZts BzZ0teOfuZ0ACcTwwRfDEwbXo0DldLwRUROym5WIDJA2wkDondk2MPDYUOIxuEIJ 1Lj1DYBmNuz8yIcZWFg0wwvF6Vz2nOXCSKRN11Q+ftC1GkgFNBAjOHT9SHzJFAsH lUkeXXI8x4X3gP9XZHbGnGYVRGbcvAvWyhrPrdRlXZRw/uOZqyvd+Bb+eQ6UDNwP wU/+YJI5tUGQvZAzc/WdA== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvledrudeluddguddutdcutefuodetggdotefrod ftvfcurfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfgh necuuegrihhlohhuthemuceftddtnecunecujfgurhephffvufgjfhffkfggtgfgsehtqh ertddttdejnecuhfhrohhmpeftuhguohhlfhcutegurghmkhhovhhitgcuoehruhguohhl fhesrggurghmkhhovhhitgdrohhrgheqnecuggftrfgrthhtvghrnhepieetheelveduue elveegieekjeeuteeuudeuleehheeiueehtdelffdvkefgieehnecuvehluhhsthgvrhfu ihiivgeptdenucfrrghrrghmpehmrghilhhfrhhomheprhhuugholhhfsegruggrmhhkoh hvihgtrdhorhhg X-ME-Proxy: Feedback-ID: i88214938:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA for ; Tue, 23 Apr 2024 13:05:15 -0400 (EDT) From: Rudolf =?utf-8?Q?Adamkovi=C4=8D?= To: emacs-orgmode@gnu.org Subject: Re: [PATCH] ob-lua: Support all types and multiple values in results In-Reply-To: <20240423164458.33702-1-rudolf@adamkovic.org> References: <20240423164458.33702-1-rudolf@adamkovic.org> Date: Tue, 23 Apr 2024 19:05:13 +0200 Message-ID: MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Received-SPF: pass client-ip=103.168.172.152; envelope-from=rudolf@adamkovic.org; helo=fhigh1-smtp.messagingengine.com X-Spam_score_int: -27 X-Spam_score: -2.8 X-Spam_bar: -- X-Spam_report: (-2.8 / 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, RCVD_IN_DNSWL_LOW=-0.7, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001 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-bounces+larch=yhetil.org@gnu.org X-Migadu-Flow: FLOW_IN X-Migadu-Country: US X-Migadu-Spam-Score: -9.57 X-Spam-Score: -9.57 X-Migadu-Queue-Id: 9EE5D1993D X-Migadu-Scanner: mx12.migadu.com X-TUID: 4eZ2ZRL2UgsF Rudolf Adamkovi=C4=8D writes: > +Lua code blocks can now return values of any type and can also return > +multiple values. Previously, values of certain types were incorrectly > +converted to the empty string =3D""=3D, which broke HTML export for inli= ne > +code blocks, and multiple values were incorrectly concatenated, where > +~return 1, 2, 3~ was evaluated as =3D123=3D. Also, #+BEGIN_SRC lua return {1, 2, 3} #+END_SRC previously crashed, as did #+BEGIN_SRC lua function divide() error("oops") return divident / divisor end return pcall(oops) #+END_SRC All that works now, with no more crashes. P.S. #1 We still have an old bug where src_lua{return string.match("A {B} C", "%b{}")} is misjudged to be a table: org-babel-insert-result: Inline error: list result cannot be used P.S. #2 I did not update any session-related code. Currently, #+BEGIN_SRC lua :session x print 1 #+END_SRC gives ... Sessions currently not supported, work in progress This is also documented in the header ;; Requirements: ;; for session support, lua-mode is needed. ;; [...] ;; However, sessions are not yet working. This half-finished session support should be removed, IMHO. If someone needs it and are willing to finish it, they can still dig it up it in the history. That is what VC is for, after all. As of now, all that session-related dead code only pollutes the file, making it harder to change, as it drifts out of sync... Rudy --=20 "All you have to do is write one true sentence. Write the truest sentence that you know." --- Ernest Miller Hemingway (1899-1961) Rudolf Adamkovi=C4=8D [he/him] Studenohorsk=C3=A1 25, 84103 Bratislava, Slovakia, European Union