From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp1.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 oBz5JpDZ6mUQuQAA62LTzQ:P1 (envelope-from ) for ; Fri, 08 Mar 2024 10:25:36 +0100 Received: from aspmx1.migadu.com ([2001:41d0:303:e224::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp1.migadu.com with LMTPS id oBz5JpDZ6mUQuQAA62LTzQ (envelope-from ) for ; Fri, 08 Mar 2024 10:25:36 +0100 X-Envelope-To: larch@yhetil.org Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=posteo.net header.s=2017 header.b=fLNBkXLj; 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=1709889936; 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=5Zm3WXcnPY5HTXSpfkjSo7mHAGhLdCPibkv4+eilDqY=; b=DcQ5ueAUiNTvuVClm0BEpyhZJcahnzkzXEg5hDK8+hQs5odAMRI0IIVIhvk7sCbOANUC5y V5RfqF8h9QuPrBPbLIKSqEG9s0P14Uv0JrvNtHk4EtHe7uOIqqey+w7bljManDKMsYVFF0 VxfaenutN+kWKdP7KnM58XTrQrN055Imu4zH5AP+Nu4DO/8tIvVKxrBe3+QA9nJjx2Sg6l 74tZ6tXrjJdo5DiWBxDaaIWEteAfTqYbuWo0iagQfiKiRjZpNADdVuXca+BzC+zuvZ75i0 5lInDCAY1PYt1M+HlUl0hEbO36jwaIoz6Tpt3IavjjvCD+XCJm4acbLzRT8d7Q== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=pass header.d=posteo.net header.s=2017 header.b=fLNBkXLj; 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=1709889936; a=rsa-sha256; cv=none; b=u1ZzaDADrwHpQj59eP1n1uQjinIXE/XkNCgqk3oZMWlCFp8rXPwNR65k+FkJzGdL0Aa5Lc RfmN2TrI4twCGdlQWJf7AbKnubal95bQDlaremMdsPaxCve+S2QlqBPTriQrzvrYvhO0n0 ek/wisWxoBVx15XhH+u0Lm3HUPtHSS+ocmZxX3zkQvPXQFchMnZEafkVNi5ClPZn9FEp5u 0hZunLNx8jK6V3yyF5uqD26viXDA1R/t5dY6LV27LWd4WuOA7hq9+leIzElBrrZLNkq0Sd 1ejqjGqb2gB8kiqlXmB7yBZVrgFpCGeoGrmvVIwkp3+WIrebwRQ7OyFUHoKR3Q== 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 608F7222A0 for ; Fri, 8 Mar 2024 10:25:36 +0100 (CET) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1riWTA-0002Xg-8c; Fri, 08 Mar 2024 04:24:48 -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 1riWT8-0002WR-N1 for emacs-orgmode@gnu.org; Fri, 08 Mar 2024 04:24:46 -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 1riWSz-000729-MQ for emacs-orgmode@gnu.org; Fri, 08 Mar 2024 04:24:46 -0500 Received: from submission (posteo.de [185.67.36.169]) by mout02.posteo.de (Postfix) with ESMTPS id DF02D240103 for ; Fri, 8 Mar 2024 10:24:35 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=posteo.net; s=2017; t=1709889875; bh=JfvwKKBhJ7c0ytDVg2uU4CQz04E/vkZ7b1j92CImgec=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version:Content-Type: From; b=fLNBkXLjlBOoJ4Is4dx9WTBIEeq/vz8F+Ra0i34nbjk0Nnp4vnzkqg77miy4lIaGs 8MNedsF7YtpnLrIwMCs+9VEWHMs7PkySKdDP0PfefnMeLFDPE/yosWDW05A2R4DeHK KnZq0+1gcTYmGowvCM48wOuzLQs4jkujX3qSEiNFlQjfkxqK+jZ9Rw5OFLHApC/SKS eUuS606OaONYvqiHJv/v49j9CSeDtE7id7CRn7k0we073zpCUCQs/HByvM3pDkaHYj 8kNLdTVZ/ECxiIep3ST51Io/SAt8pyW0iiXOMEo5jcRUfd3bzpU1ZyWzVNlTLmc0zI MCXU/Q8BieB9w== Received: from customer (localhost [127.0.0.1]) by submission (posteo.de) with ESMTPSA id 4Trgjb0lgnz9rxB; Fri, 8 Mar 2024 10:24:34 +0100 (CET) From: Ihor Radchenko To: Matt Cc: emacs-orgmode Subject: Re: [BUG] ob-shell async incorrect table and value results In-Reply-To: <18e158981f3.f22980741623238.5132641315390000744@excalamus.com> References: <18e158981f3.f22980741623238.5132641315390000744@excalamus.com> Date: Fri, 08 Mar 2024 09:28:38 +0000 Message-ID: <87zfv9hy2h.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: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 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, 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.47 X-Spam-Score: -9.47 X-Migadu-Queue-Id: 608F7222A0 X-TUID: NobAlQDulE/4 Matt writes: > #+name: sync table > #+begin_src sh :session *test* :results table > echo "hello world" > #+end_src > > #+RESULTS: > | hello world | > > #+name: async table > #+begin_src sh :session *test* :results table :async t > echo "hello world" > #+end_src > > #+RESULTS: > : hello world Confirmed. This is because `ob-shell-async-chunk-callback' never returns a list. In `org-babel-sh-evaluate', there is a part that is responsible for detecting the result type: (when (and results value-is-exit-status) (setq results (car (reverse (split-string results "\n" t))))) (when results (let ((result-params (cdr (assq :result-params params)))) (org-babel-result-cond result-params results (let ((tmp-file (org-babel-temp-file "sh-"))) (with-temp-file tmp-file (insert results)) (org-babel-import-elisp-from-file tmp-file))))) This part is skipped for :async results. -- Ihor Radchenko // yantar92, Org mode contributor, Learn more about Org mode at . Support Org development at , or support my work at