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 YB+PFGuEkGNQkAAAbAwnHQ (envelope-from ) for ; Wed, 07 Dec 2022 13:17:47 +0100 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 qOHGE2uEkGP+5gAAG6o9tA (envelope-from ) for ; Wed, 07 Dec 2022 13:17:47 +0100 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 EC2CB179B3 for ; Wed, 7 Dec 2022 13:17:46 +0100 (CET) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1p2tLx-0006j4-Pe; Wed, 07 Dec 2022 07:16:45 -0500 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 1p2tLv-0006ip-Vn for emacs-orgmode@gnu.org; Wed, 07 Dec 2022 07:16:44 -0500 Received: from mout01.posteo.de ([185.67.36.65]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1p2tLt-00051D-Cg for emacs-orgmode@gnu.org; Wed, 07 Dec 2022 07:16:43 -0500 Received: from submission (posteo.de [185.67.36.169]) by mout01.posteo.de (Postfix) with ESMTPS id 7A5AB240026 for ; Wed, 7 Dec 2022 13:16:36 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=posteo.net; s=2017; t=1670415399; bh=7qN8CBdkweMVv8FeGJBBbnA9FdcojpojlPkMfVCQ1OA=; h=From:To:Cc:Subject:Date:From; b=d1zCcu9jgozZyK91qEQn5OO3Iu6Gf68kc0JYOnX4TcVdheifRK6lb49a2XUWvLAir bn75F6YQ5h9/Ny+9epKJyCRpiunq5ccOGWxZlcAc5bjVYUVTjDjgGh+pDMk7ZQzOyV MisvJNGnLlaYr4WhRNUWr+dYh9Kdw08un15W8s41NYqbfzGqaAgYNPhe+7T65TgZmV obFAJmicyb/Ge+S5hInLug+aj6IjPU/NOWYh1equW765APAAjKSY+OlDSMsGdAZWfG WgYdodgESBCiGTOcmB5BDDZ91E0aXLTtzQrfUIR/Mbku0BEBXhPJqcWxZJJUYf0G+8 kkV/j3TOu6g/Q== Received: from customer (localhost [127.0.0.1]) by submission (posteo.de) with ESMTPSA id 4NRx8w3Pbvz6tmq; Wed, 7 Dec 2022 13:16:32 +0100 (CET) From: Ihor Radchenko To: Jeremie Juste Cc: Greg Minshall , Johan =?utf-8?Q?Tol=C3=B6?= , emacs-orgmode@gnu.org, "Berry, Charles" Subject: Re: [BUG] ob-R.el: extra empty data.frame columns generated from plain lists after recent change [9.6 (release_9.6-3-ga4d38e @ /usr/share/emacs/30.0.50/lisp/org/)] In-Reply-To: <87wn74xjv7.fsf@gmail.com> References: <87wn77mdvk.fsf@toloe.se> <766358.1670208594@archlinux> <87wn74xjv7.fsf@gmail.com> Date: Wed, 07 Dec 2022 12:16:28 +0000 Message-ID: <87bkofh0ir.fsf@localhost> MIME-Version: 1.0 Content-Type: text/plain Received-SPF: pass client-ip=185.67.36.65; envelope-from=yantar92@posteo.net; helo=mout01.posteo.de 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_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 ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1670415467; 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:in-reply-to:in-reply-to: references:references:list-id:list-help:list-unsubscribe: list-subscribe:list-post:dkim-signature; bh=G0frQIjaZGiVBB5outmBrc8YxsiAq562RNdCxm57rqQ=; b=VABRFjKn4b6rCbJme/+7DgGyFEq73RU3rl8TmNTaL9GThShZqyJRI22DWh7h0rs5f8Lrbk 0OhgxnArzx1fgqBcI/wIYRZ3jSg8TUTjKqFH1VoYQBKprWs+FDh/BgFytztKw4qOSX1WxL WdjQP97HTqLuVLP59b8MIs/oL4jNSjWB8gaIpothk3jrpPb5TryuHwulWmAwaDLyGhgmfo 78kKHPqTScIc3V6QWMalsmnmKl03MYPUqYo1jx8CHdoeW269L74kikvwgl1e+/5+h81C4P 57ItZsfgCJCpwpjFSQ2RykWsI+AVAxhgraSKskGxw++3ZrgsBfbkeuNDJyX21w== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1670415467; a=rsa-sha256; cv=none; b=sUEGDw2ra+yW15guLqVyxsZvRkZruaO/EcXRmXDQ+Zq2Esi+76Zbf3yFc3Rx3Ph/Pqiwnu hNRbIBXsQ1BtJxwp4bLRGGJHJ2HWh4o+pZYS1EgmuT49fC1Ptl3RDGe9q2qpgZbkjl8OTj X3Xy1n+FOKYa39l1OFN2GH7XYCPnw+G2VC8UTOHfzhs8VbV4bPwUQ0uVKAeO+HhCK5rRSk KwmQjjskZW70ynkT6jDBJT0pog8uer5BTyU5aQNJAXUgG9rhuie6Ddntp0qNCZOp8lueSu XVv+RuuWMKPYcfDKr0XH6qBS46PtK0N+jgu6lMXyhh/E6Jp4eHJZJroYJsR7WA== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=pass header.d=posteo.net header.s=2017 header.b=d1zCcu9j; dmarc=pass (policy=none) header.from=posteo.net; 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" X-Migadu-Spam-Score: -2.06 Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=posteo.net header.s=2017 header.b=d1zCcu9j; dmarc=pass (policy=none) header.from=posteo.net; 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" X-Migadu-Queue-Id: EC2CB179B3 X-Spam-Score: -2.06 X-Migadu-Scanner: scn1.migadu.com X-TUID: daTO6ByEp/o5 Jeremie Juste writes: > Many thanks for the insights. I confess that I have never transferred > list from org to R before. I've always use tables and as far as I > understand they works fine in 9.6. > > So assuming this list > > #+name: alist > - first item > - second item > - third item > - 3.1 item > - fourth item > > > before c72d5ee84 we could do something like > > #+begin_src R :var list=alist > list > #+end_src > > #+RESULTS: > | first item | | > | second item | | > | third item | (unordered (3.1 item)) | > | fourth item | | And it was a bug that the ob-core patch fixed. Unfortunately, a number of babel backends also developed workarounds meanwhile. For the context, the ground truth is Org manual: 16.4 Environment of a Code Block list A simple named list. #+NAME: example-list - simple - not - nested - list #+BEGIN_SRC emacs-lisp :var x=example-list (print x) #+END_SRC #+RESULTS: | simple | list | Note that only the top level list items are passed along. Nested list items are ignored. > and after we end up with > > > #+begin_src R :var list=alist > list > #+end_src > > #+RESULTS: > | first item | second item | third item | fourth item | | | | | | | > > Here I'm on uncharted territory. We could go with > 1. > | first item | second item | third item | fourth item | > > or be closer to the version 9.5 with > 2. > | first item | > | second item | > | third item | > | fourth item | > > However I'm still tempted to choose the second option to break as little > workflow as possible. > > If we go in this direction the solution of Chuck works fine. Many thanks > for the suggestions. I also like the second option as **printing** more, but it is _not_ what we have in the manual. Note that the origin of the issue is in how list=alist is assigned. Before the problematic commit, we had awkward situation when alist=(("first item") ("second item") ...) I changed things to alist=("first item" "second item" ...) which makes a lot more sense when passed as variable value. Now, printing: ob-core prints lists as a special case of tables. Since ("first item" "second item" ...) is a row vector, we get | first item | second item | ... | changing row vectors to be printed as column vectors is easy, but I am afraid about non-trivial breakage. Hope the above clarifies about what happened and why I changes things like I did. -- Ihor Radchenko // yantar92, Org mode contributor, Learn more about Org mode at . Support Org development at , or support my work at