From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp10.migadu.com ([2001:41d0:403:4789::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms9.migadu.com with LMTPS id cPH5CJv/2WRlZAAASxT56A (envelope-from ) for ; Mon, 14 Aug 2023 12:19:07 +0200 Received: from aspmx1.migadu.com ([2001:41d0:403:4789::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp10.migadu.com with LMTPS id aNX2B5v/2WR3sgAAG6o9tA (envelope-from ) for ; Mon, 14 Aug 2023 12:19: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 78DD84A101 for ; Mon, 14 Aug 2023 12:19:06 +0200 (CEST) Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=posteo.net header.s=2017 header.b=SyvcMAkC; 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=posteo.net ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1692008346; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc: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=nl4P7Bo1H/qU7z2doqGBj3Y+KJsKOnaShmL89BRAJgc=; b=IbHaCl1ZHm9jz8rrcYNHksUiBl1y0E19Ea1QnFzOSbBNWyDD9fUfvOdJJ7QbhwenHWb9TJ momWyVg8RvCpG8+N95ikEfmcVGMQPCHnE/+sttchLcfbnrrboYt7+vr09LLXLV+0WxBN/c s6bp0z5vRHp3KeBLphhoAy7ri2Po1qsZLrQbgjFaO9qvBl/vGJQ3Its7D6hrheT+xn3kuP 8wleTCgY+7DDEDH1Q6KOrmy5c0zmm+K8EDL5mSrJkGEMXeAtbBw99f8fD20kPYkE8WiTzW Ns8i0MgIw3bcwNP3J0JCqTUGqhBiXhi/J5g+M4q72mCaYBMOTqCLlE8ZuYLuGw== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=pass header.d=posteo.net header.s=2017 header.b=SyvcMAkC; 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=posteo.net ARC-Seal: i=1; s=key1; d=yhetil.org; t=1692008346; a=rsa-sha256; cv=none; b=R9o/psPGOprfcic7OREhCAhjDsN8t51zeD12F8m4VGN50ReAWfU9z9xYzZy+vlM46Q+zED m6pDE8cG1o7Z5WSjS8iorHn/v7UJ11HamAf1+TqMpFTyxaoFYCtG62g/W6rUJRPxG9JyTA T1Q/yFoFobsrQQKLUr8ONLzjOywrX//Od3yoaiIjv6XWiVjgy6evfgxJ/feAJQ7narUuNF M29FIR9l2DGhSjMC1hVA4kfaEsju5q5JQrJdda0pzM6bZnXtxW2BBU+Qk/NkQ1DZBkHZ90 C0rzUMnglJ9NkRyMSAJ4gqcTB6TnZXq/Pcv6vkjfF+kkXi+GCz6vGSwQVOj8UA== Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qVUea-00083T-83; Mon, 14 Aug 2023 06:18:28 -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 1qVUeX-000831-FE for emacs-orgmode@gnu.org; Mon, 14 Aug 2023 06:18:25 -0400 Received: from mout02.posteo.de ([185.67.36.66]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qVUeV-0000ut-Dz for emacs-orgmode@gnu.org; Mon, 14 Aug 2023 06:18:25 -0400 Received: from submission (posteo.de [185.67.36.169]) by mout02.posteo.de (Postfix) with ESMTPS id 52734240101 for ; Mon, 14 Aug 2023 12:18:21 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=posteo.net; s=2017; t=1692008301; bh=90ERXgWZ1dEy2VEeG+bYUrXg+cPtpcIswcb3OQmqcfw=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version: Content-Transfer-Encoding:From; b=SyvcMAkCWi2oa9nuw1AIrFB6qTPGVKNd1KoBe6sinxiN0Rl3HK7ZUXgIrZsTXqp+G xZl9OUMVTSr6ibDWFEJ/g6gp+4Z5rAuLDrweMLMcLLJYTHi8+u/KhbsRdrT8MRVe8D 8FB6XbOGCGw/tUxAtdCr01HDJ3mAzjZz2vWMPaYc+WoVmtb0Ftyl8tARwpfILzd3e5 QKJlJ8uE39g7EC5MembE47BRockr1ouRFdq5DSLnX5jG4k+co1ZLZnaNu+w1zWswdM 2lwdubb16YhzlEOcNKs0MspPEhMfdO4pK1dfCPRhj7atjtwiEz1jkWgO9CLZwmGvoN sKz5EjSrWMeRw== Received: from customer (localhost [127.0.0.1]) by submission (posteo.de) with ESMTPSA id 4RPVj848v4z9rxL; Mon, 14 Aug 2023 12:18:20 +0200 (CEST) From: Ihor Radchenko To: Mike Gauland Cc: emacs-orgmode@gnu.org Subject: Re: Passing table to Ruby session In-Reply-To: References: <980379b9-3b1c-7671-839a-60fa488eed7c@gmail.com> <87350so731.fsf@localhost> <69e49c6b-62fe-f49c-2ac3-b1a57d2dea73@gmail.com> <7521f7c2-e3f0-6877-158c-0977620e06d1@gmail.com> <87o7jfb6td.fsf@localhost> <87pm3ut3zi.fsf@localhost> Date: Mon, 14 Aug 2023 10:18:46 +0000 Message-ID: <877cpyq649.fsf@localhost> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Received-SPF: pass client-ip=185.67.36.66; envelope-from=yantar92@posteo.net; helo=mout02.posteo.de X-Spam_score_int: -53 X-Spam_score: -5.4 X-Spam_bar: ----- X-Spam_report: (-5.4 / 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_MED=-2.3, RCVD_IN_MSPIKE_H5=-1, RCVD_IN_MSPIKE_WL=-0.01, SPF_HELO_NONE=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-Queue-Id: 78DD84A101 X-Migadu-Scanner: mx1.migadu.com X-Spam-Score: -6.61 X-Migadu-Spam-Score: -6.61 X-TUID: RC3kNIhSkddb Mike Gauland writes: > I've redefined org-babel-ruby-var-to-ruby in my init.el to add a newline= =20 > after each element in an array, which I think will work for anything=20 > less than a 4k-long string. Ideally, the hard-coded \n would follow the=20 > EOL convention of the buffer, but I haven't gotten that far yet. > > > (defun org-babel-ruby-var-to-ruby (var) > =C2=A0 "Convert VAR into a ruby variable. > Convert an elisp value into a string of ruby source code > specifying a variable of the same value." > =C2=A0 (if (listp var) > =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 (concat "[" (mapconcat #'org-babel-ruby-v= ar-to-ruby var ", \n") "]") I think Emacs should handle it automatically. Also, it looks like ruby sessions are broken now: #+begin_src ruby :session org-test-ruby :results output s =3D "1" s =3D "2" s =3D "3" puts s s =3D "4" #+end_src yields nothing. --=20 Ihor Radchenko // yantar92, Org mode contributor, Learn more about Org mode at . Support Org development at , or support my work at