From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp0.migadu.com ([2001:41d0:303:e224::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms8.migadu.com with LMTPS id OKl6Kypl8GVSiAAAqHPOHw:P1 (envelope-from ) for ; Tue, 12 Mar 2024 15:22:34 +0100 Received: from aspmx1.migadu.com ([2001:41d0:303:e224::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp0.migadu.com with LMTPS id OKl6Kypl8GVSiAAAqHPOHw (envelope-from ) for ; Tue, 12 Mar 2024 15:22:34 +0100 X-Envelope-To: larch@yhetil.org Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=posteo.net header.s=2017 header.b=Zlr9tjhM; 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=1710253354; 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=aQJxaaUXP/EKabBsLzV3afWXuSIYobkQZLDa9Ioj3cc=; b=Q4qGEMoqDQ+h3j9ggj82rYfPihKsi2Ns63KHQoO/SQIC03NmXzTCp39WNAK25Tswhm205d 5Ch7UPMno1ZYuNDB5dTvTcoEFY53sRHuA5E9drq/15toGr6nIL4l6n1dofWDaXuAbN0eYU 01od7p+5JQ8cVuYp1LDqqDHHiw8kjmaNdGyIpcIgO26XAq/64sBaRtBHNparA/WzYk+xam WEB5AMqi+PrXKeE3SHgHSRwN+C+qv4bb1kLYavuCtaPCZygYkjUdBfP3FvBQ2rzRP1jsR3 vDRyLPVUYdn8fJMjrEmGGBjqSqJS1waCs5eRVKJLa0yj8KvP/O5NiqLINTx0aA== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=pass header.d=posteo.net header.s=2017 header.b=Zlr9tjhM; 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=1710253354; a=rsa-sha256; cv=none; b=nt/uqhqDtaaXcwoeLcBNpgMc2c6G+P7bvmrJmwqQrz6EcQoFC5EnDj0xgdGc52MS5y38IZ JdoYVciU3bVjDLhUu1UxlEN2mu1bVhfvHMVX0qU9XCNQGdwfv5X6H/MOQOF/zdhJ3GVO+d HIcaWV/oySBjc1NkTse7j8r5g8jCOJBvT8ZwzKDJKFG2s4Vp4Hfekr3oXiKHITE2pauNdk y1PMONZDi0GjsEpB4qHWhOje/HOqnlwqUDw1jvw6/kWuCt3ZIMfQ5e+OR6S656VTrNQXwW R6gPLGj0b5MqGWOrmlQH3B+pEciRV8scDwKtSrmoi7wnT+JrrAj7OyKimC3fZg== 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 4D7E164100 for ; Tue, 12 Mar 2024 15:22:34 +0100 (CET) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1rk30m-0001kU-J8; Tue, 12 Mar 2024 10:21:48 -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 1rk30i-0001jj-RG for emacs-orgmode@gnu.org; Tue, 12 Mar 2024 10:21:44 -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 1rk30e-00042b-3l for emacs-orgmode@gnu.org; Tue, 12 Mar 2024 10:21:44 -0400 Received: from submission (posteo.de [185.67.36.169]) by mout02.posteo.de (Postfix) with ESMTPS id AC258240104 for ; Tue, 12 Mar 2024 15:21:37 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=posteo.net; s=2017; t=1710253297; bh=snaJt5qF7gKlPuBE3vKLzeId6cS3t1rgruUA83kJ+u4=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version:Content-Type: Content-Transfer-Encoding:From; b=Zlr9tjhMbcid9XWtg5jFPTxjsqoQvGnHAlDz4dR8MA/mp+hFebEheaFGzoGPzcE3t /rdQhS7+uaphtsEu7EirPkwPNSFELzaBQrqreu+dHGAZQsZszyjwonhSIeOiWIR5Dw RguTJeZ66eItW3K6oaT2Bxbl6tQ89JA1Pon8b647D9odqvtVBeSdhwGzo+HDhxikIm xtSOMvgPU2OKobJaSLjtAdZG9ltfz2LyDjSyv91CIL53QWYIP7M4JPU2z1XBfFO1aE EkL0BR7VD+KGh90aYIYwAD/1R76iihD3J6ar+8+gUATK4JCzmWmUBnkrKt0hXHyIe9 XQyFTKaRVvvdA== Received: from customer (localhost [127.0.0.1]) by submission (posteo.de) with ESMTPSA id 4TvG6S5MYtz9rxD; Tue, 12 Mar 2024 15:21:36 +0100 (CET) From: Ihor Radchenko To: Matt Cc: Ilya Konovalov , emacs-orgmode Subject: Re: [BUG] ":sep" header argument doesn't work in ob-shell [9.6.21 ( @ /home/aragaer/.config/emacs/elpa/org-9.6.21/)] In-Reply-To: <18e322f5c04.c5668358256842.4107681299308039596@excalamus.com> References: <87plw3jh5c.fsf@gmail.com> <87il1rn6fn.fsf@gmail.com> <18e322f5c04.c5668358256842.4107681299308039596@excalamus.com> Date: Tue, 12 Mar 2024 14:25:49 +0000 Message-ID: <87a5n3cys2.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: -43 X-Spam_score: -4.4 X-Spam_bar: ---- X-Spam_report: (-4.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_H4=0.001, RCVD_IN_MSPIKE_WL=0.001, 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-bounces+larch=yhetil.org@gnu.org X-Migadu-Country: US X-Migadu-Flow: FLOW_IN X-Migadu-Scanner: mx12.migadu.com X-Migadu-Spam-Score: -9.48 X-Spam-Score: -9.48 X-Migadu-Queue-Id: 4D7E164100 X-TUID: g6rNjudIoWIL Matt writes: > ...=C2=A0 According to my notes, :sep and :separator don't work for > anything beyond basic table layout. I'm not familiar with org-table > and there isn't much documentation on those keywords in the manual. > The :sep keyword shows up for Texinfo and LaTeX. It looks like :sep is > used for export? It's not clear to me how they're supposed to work > with shell block output, or if that was even a consideration at all. > > They were added in > https://git.savannah.gnu.org/cgit/emacs/org-mode.git/commit/?id=3Da60a83f= bb65a368bb96ea6aaf1db20706b3e99c5 > claiming "better handling of table in shell scripts" So, it looks like > their inclusion was intentional. > > Maybe someone has deeper insights? :sep header argument is used to format table result when writing to file: By default, Org assumes that a table written to a file has TAB-delimited output. You can choose a different separator with the =E2=80=98sep=E2=80=99 header argument. "16.6 Results of Evaluation" section of the manual. It is only relevant when you have :results file and the evaluation results are redirected to file instead of Org buffer. :sep header argument is universal to all babel backends. :separator argument is used in ob-sqlite and ob-shell. However, it means different things in ob-sqlite vs. ob-shell. In ob-sqlite, :separator argument is defining how sqlite formats its output. AFAIU, it is only needed when sql table data contains "|" - the default separator. In ob-shell, :separator argument is _not_ used to format the output. Instead, it is used to control how ob-shell passes Elisp data shell variabl= es. However, it is almost never used in practice (also, it is not documented) - :separator argument only affects how deeply nested Elisp lists are converted to bash data: #+begin_src bash :var x=3D'((((1 1)) 3) (4 5)) :results output :cache no :s= eparator "+" echo keys: ${!x[@]} echo values: ${x[@]} #+end_src #+RESULTS[7de8e7c561edda2dce18a302f4d8beb8a51595df]: : keys: 4 1+1 : values: 5 3 Normal two-dimentional tables and lists are handled without being affected by :separator. --=20 Ihor Radchenko // yantar92, Org mode contributor, Learn more about Org mode at . Support Org development at , or support my work at