From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp10.migadu.com ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms5.migadu.com with LMTPS id 4FkRN+mMBGRuHgAAbAwnHQ (envelope-from ) for ; Sun, 05 Mar 2023 13:36:58 +0100 Received: from aspmx1.migadu.com ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp10.migadu.com with LMTPS id AMsmNumMBGQeXgAAG6o9tA (envelope-from ) for ; Sun, 05 Mar 2023 13:36:57 +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 9108F2E64B for ; Sun, 5 Mar 2023 13:36:57 +0100 (CET) Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=posteo.net header.s=2017 header.b=cbsGxDPn; 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" ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1678019817; 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=uYp4LnlHRxwKEY0yEfHoKdgJeOmXjIeYzoiy6BYz4Mk=; b=CnT8SCW/L4DGsrVKUtfCNVHlqPwUjY2w6imIKCtTtaogeXeSZzv1E9QlRJtaLMdl0lt45h czV3pFS9XdUixuYYk6VpeWj/tpnALjvUKbR6us8ME3AQSrM6hBVibLQB3PWueUtaYIklPM Hs+Y2qN5iyXu+BNpZsfvnko5rdo9hvvfnPavmavx/drGTDUKfcwi0yCAbYPvOyOOMMcmUu wf+RBnlzfKCKnuJW0Yk6dkwT8KKP9KciLBImvVZJTGFAK46oStjYTaPJWyvlWZbkucO4oa OK2SkDUKoB60Lodl9D1pJ+cfBtQsG/R8WS9uq+ELpm7aO9M0zgUXrDkoWGw9Zg== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=pass header.d=posteo.net header.s=2017 header.b=cbsGxDPn; 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" ARC-Seal: i=1; s=key1; d=yhetil.org; t=1678019817; a=rsa-sha256; cv=none; b=sfDoFJKFatJf9sgGSG4hHO3w97ZOdmEXXTN2noBBFg/t4xyrfR1PAiu6f2z7n86clc6aFJ weJr70us26V/w8vTIym4FVd8t8qvSdQ4+GD3aa/liYeYzLhWYj14ZxgJkMPosKuDsX2tkv XKkAlq3HG6CfMnaNy/D0+3TqoDOCDnwjIKlBNVfNkfYM2H5wYYdm9U0zRDhaEEWFxeOSEP K2TFLK9aBFeVxisCdyEdeWtPkr806EbeXobzZrEIIhOrwxhOJlwg+ylzxvKk7sSuZNRHnR N3ijAOMukHh34mlRYfYuuPvcrFkWUoaXbT08+3OdKMWEhKk+TA5aaJVyIdV64g== Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pYnbO-0000fB-DQ; Sun, 05 Mar 2023 07:36:34 -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 1pYnbG-0000cM-Mm for emacs-orgmode@gnu.org; Sun, 05 Mar 2023 07:36:27 -0500 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 1pYnbE-0005z1-7m for emacs-orgmode@gnu.org; Sun, 05 Mar 2023 07:36:26 -0500 Received: from submission (posteo.de [185.67.36.169]) by mout02.posteo.de (Postfix) with ESMTPS id E350524015A for ; Sun, 5 Mar 2023 13:36:18 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=posteo.net; s=2017; t=1678019779; bh=D6tx03osBJDz0z3qXW999Rjk4NxrVMjtKiwJnd3a1fQ=; h=From:To:Cc:Subject:Date:From; b=cbsGxDPnxyI2iRYktrJcVAR1OXDIK1VsCIDKCy2arG9p78JY1pBPhwnp6mMQJQy01 b1iDg9ASbkOo2/tYi1iYr6oMaSm9jG8VxISJTC/afoJ0D1zoAWo5ljhlKU9VEIzHv0 Zbs7Q/K0J2LFl7RiT4FCkB2xAAznemT3y5Y7YkH0qRxCwwwR8XJ/OCUgBCrsbqfUq4 jcTNwVieJu9wvgeiTUyjUcUKN8Qo/Z1EzfzkKobveOKyYe3naytCy9bHEfzc4X22tS D8yyKJlhH+HLAfplRzVf7OPoL1YFUR9zfAfhSGzPyhZtPtpBwp3OMz4HX5Q4jxea76 FH3CgnAaqROKQ== Received: from customer (localhost [127.0.0.1]) by submission (posteo.de) with ESMTPSA id 4PV1R51gKMz6tmG; Sun, 5 Mar 2023 13:36:17 +0100 (CET) From: Ihor Radchenko To: Jeremie Juste Cc: emacs-orgmode@gnu.org, tyler@plantarum.ca Subject: Re: [FR] ob-awk.el specifying a delimeter argument in for output In-Reply-To: <87ttyzcyrp.fsf@gmail.com> References: <87ttyzcyrp.fsf@gmail.com> Date: Sun, 05 Mar 2023 12:37:42 +0000 Message-ID: <87bkl7z84p.fsf@localhost> MIME-Version: 1.0 Content-Type: text/plain 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_H2=-0.001, 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: X-Migadu-Scanner: scn0.migadu.com X-Migadu-Queue-Id: 9108F2E64B X-Spam-Score: -8.20 X-Migadu-Spam-Score: -8.20 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-TUID: xIuPMfUBRmXS Jeremie Juste writes: > * Request > > However If I have a csv file with say semi column delimited values (;) > I don't get the org table as output > > #+begin_src awk :in-file test1.csv :cmd-line -F ";" > {print $0} > #+end_src > > #+RESULTS: > : 123;0;123 > In my opinion, this could be fixed if we could read the :cmd-line > parameter -F and use the delimeter argument ; as a parameter to the > following function Org knows nothing about your output, by default. You could as well do something like {print $1+-+$2+-+$3} What should Org do in such case? Currently, Org tries to guess the type of arbitrary output. If the output looks like a table, with fields separated by tabs, commas, or spaces, it converts the output to table. Otherwise, it is treated as string. I guess we might add an option to tell Org which separator to use when parsing output when :results table header argument is provided (see 16.6 Results of Evaluation section of Org manual). However, you can achieve the same now, using :post header argument, replacing the separators with something Org can understand. -- Ihor Radchenko // yantar92, Org mode contributor, Learn more about Org mode at . Support Org development at , or support my work at