From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp0.migadu.com ([2001:41d0:403:58f0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms8.migadu.com with LMTPS id eIRPO36f+WXWEAAAqHPOHw:P1 (envelope-from ) for ; Tue, 19 Mar 2024 15:21:51 +0100 Received: from aspmx1.migadu.com ([2001:41d0:403:58f0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp0.migadu.com with LMTPS id eIRPO36f+WXWEAAAqHPOHw (envelope-from ) for ; Tue, 19 Mar 2024 15:21:51 +0100 X-Envelope-To: larch@yhetil.org Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=posteo.net header.s=2017 header.b=NNe7anFo; 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=1710858110; 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=UoE6T8zmSHdWEXHhENQ9WbdzgZFCubsNAk/gwqRoPd4=; b=NZYH83iZH5bHUAPrjxNBDl5OgRPFQa3LrgIWkuSZXIeareeB5DgyKmF9qa4KTPM/0dU338 RRITDj3ni52QErbcTbhQNvbpDycl+MkkoaIOWTj1QqOZKl9NWtcLHoeJli03wTXlezcU4Y 4DqLFWXn5VK59ccksHMzwHwH0LHHqoBr1E1a01AcAr489fyHozXLqS33EieC2ApObp8pCB +dD4Sor9QRMz649zNv78WvYppFbGxwubEFUSCIyJXC4xOGtIp15ElCF/rDl1tCSPMbbJLk beP3juMudrbz6sZebj29nsTaXg3WCCPisexILvnsOQm6sydTew/UMTsRK7JjWw== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1710858110; a=rsa-sha256; cv=none; b=BAMQzlqxyNGCmVXhqVC+wFnOrqOKQmry3EzQDREDXR6mp4bZ8T3YFsvlp/xJz392RBErnh 8nDACQFcM01l9pxNnJxG8iXrKzitq+JQwL0lr+QOYUHw4PWIBmvqVH+8JCdu/AckbDtorJ sqK+k48uKDEAppdGeWvhvod4r1i1i1VgLfWGWggP7+vfe0fpcXb1zgGE+Y6pIM35TeGJXo eWhDS1N4Zp7V14OlwxCzIg8aOAgAjjd/SdlBK2+QQcIf1EGxXr9Rw/a9wpTScuRX4CCFgL Gq+I7vlBq6dHWV+xxF7dhe/ogbma9UIBBcGajAhZhPls6vn8F5RdFXPFkuolIg== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=pass header.d=posteo.net header.s=2017 header.b=NNe7anFo; 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 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 C68CE684C9 for ; Tue, 19 Mar 2024 15:21:50 +0100 (CET) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1rmaL1-0004MA-JK; Tue, 19 Mar 2024 10:21:11 -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 1rmaKo-0004KZ-RG for emacs-orgmode@gnu.org; Tue, 19 Mar 2024 10:21:00 -0400 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 1rmaKl-0004m9-5Q for emacs-orgmode@gnu.org; Tue, 19 Mar 2024 10:20:58 -0400 Received: from submission (posteo.de [185.67.36.169]) by mout01.posteo.de (Postfix) with ESMTPS id C89DE240028 for ; Tue, 19 Mar 2024 15:20:52 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=posteo.net; s=2017; t=1710858052; bh=CahiATnd8xlEjMsvRyFcRaA3blEio+vCvUVyYc1Azmg=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version:Content-Type: From; b=NNe7anFoapDJlrPTseJuJrx5N/jK7G047DlMGDd9sOtZPF82uNZ3OM33f+Iy9KquS 62XlXdBf8GA3pUqyspAzxvi3iXoGyDJUmjN2LqWT08DnlPVAapoNrCr5pzAQdWsONK agvhKDgXlXDNFkpyIn41OtYLT4OFPNUAcSSto5AqfQwipjPe3+rSR5jlFiLQT7eoPM HarCavDUw0q3EhNdsExDKKqDZWDEyuxj5D+UfShsZcaH7yvMYUCHHpLt5waCcmwNKq BiVvoYMAkh7+5tMChapL3pDRYHg6t+xjnm0O/2YDf68Hj1PR3ZoYcoa8XoRFEXMcf+ q8C0aQYJrLB1w== Received: from customer (localhost [127.0.0.1]) by submission (posteo.de) with ESMTPSA id 4TzYmN0g9Fz9rxB; Tue, 19 Mar 2024 15:20:51 +0100 (CET) From: Ihor Radchenko To: Matt Cc: emacs-orgmode Subject: Re: bug? org-babel-comint-with-output return value type In-Reply-To: <18e4e01717d.b1bd307a696132.1612686871442583784@excalamus.com> References: <18d753c1e8a.cfb3e1921191837.5665565128507976741@excalamus.com> <87ttmn9fg0.fsf@localhost> <18dbc1f273c.11687295c1395973.3345700621594100711@excalamus.com> <87ttm4g14s.fsf@localhost> <18e4deaa1bd.ff0f87fa694858.5955779335024266818@excalamus.com> <18e4e01717d.b1bd307a696132.1612686871442583784@excalamus.com> Date: Tue, 19 Mar 2024 14:20:49 +0000 Message-ID: <87v85iwbem.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: -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_H3=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-Flow: FLOW_IN X-Migadu-Country: US X-Migadu-Spam-Score: -9.10 X-Spam-Score: -9.10 X-Migadu-Queue-Id: C68CE684C9 X-Migadu-Scanner: mx11.migadu.com X-TUID: rMluG/a3ZDyX Matt writes: > Why =org-babel-comint-with-output= returns a list is unclear to me. > The docstring for =org-babel-comint-with-output= says it should > "return all process output". AFAIK, process output is a string, always > has been, always will be, and Babel has always gotten a substring of > the process buffer (for that code path). Yet for some reason, it was > decided to have =org-babel-comint-with-output= return a list. This > goes back to the beginning, in 2009, when the final expression used > =split-string= instead of =delete=: > https://git.savannah.gnu.org/cgit/emacs/org-mode.git/commit/lisp/org-babel-comint.el?id=dd0392a4f23b40fae7491c55aa44a2324248c103 > > ... > It seems like the return type of =org-babel-comint-with-output= is not what it should be. It looks like it should be a string. > > Am I missing something? Inside `org-babel-comint-with-output', BODY may send multiple commands to the shell; one by one. Their output will also arrive one by one, separated by PROMPT. The return value is a list of these outputs. If we were to concatenate this list, the information about which part of the output belongs to which submitted command would be lost. The docstring may indeed be improved. -- Ihor Radchenko // yantar92, Org mode contributor, Learn more about Org mode at . Support Org development at , or support my work at