From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp12.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms5.migadu.com with LMTPS id iLLED0GhUmO8BAAAbAwnHQ (envelope-from ) for ; Fri, 21 Oct 2022 15:40:17 +0200 Received: from aspmx1.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp12.migadu.com with LMTPS id 2KGUD0GhUmMeFQAAauVa8A (envelope-from ) for ; Fri, 21 Oct 2022 15:40:17 +0200 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 D78B72301 for ; Fri, 21 Oct 2022 15:40:16 +0200 (CEST) Received: from localhost ([::1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1olsFx-0006mf-M0 for larch@yhetil.org; Fri, 21 Oct 2022 09:40:13 -0400 Received: from [::1] (helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1olsEW-0001T7-AC for larch@yhetil.org; Fri, 21 Oct 2022 09:38:44 -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 1olsER-0001JR-Si for emacs-orgmode@gnu.org; Fri, 21 Oct 2022 09:38:39 -0400 Received: from mr85p00im-ztdg06011201.me.com ([17.58.23.181]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1olsEQ-0008K1-Bd for emacs-orgmode@gnu.org; Fri, 21 Oct 2022 09:38:39 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=me.com; s=1a1hai; t=1666359516; bh=YY1i6iyqqOsJ2MsFwbdvOK+ZzCdAY98gLn8F+rOyrUI=; h=From:To:Subject:Date:Message-ID:MIME-Version:Content-Type; b=wHMyAPhh2dty2FH0GM+rWbuYut9+QyWy89/wIQWxIlpqK4Qvzaj2odxD5NpKFFrC6 gvJwl6bx7tKXJsKhNi7vC/knqWGoynirQr7wcQCFLNxmhozIDyZZmgjJ2aalWB10iQ fKXaopQYSJGJxzr0gu7Pj2t0tdeDkHhgpQIs9z98xVQv0VKwDsDGB2kXcl8tuDlFX0 3V9j5aFpO2z+Da+PDfvXgHw/m0VALW1Dt+gNrnN4bj8dWKuaOG8eJpcE/ri2PpnQe1 uP0XawLJN9wqmMr0lXk2yhJ8fQ5BCXpP0XjeOJ4W58dFMWpCrNoR8P5XUg3d49e5CO jtBHYotxxHF5g== Received: from Rudolfs-MacBook-Air.local (mr38p00im-dlb-asmtp-mailmevip.me.com [17.57.152.18]) by mr85p00im-ztdg06011201.me.com (Postfix) with ESMTPSA id DA586960AD7; Fri, 21 Oct 2022 13:38:34 +0000 (UTC) From: Rudolf =?utf-8?Q?Adamkovi=C4=8D?= To: Ihor Radchenko Cc: Ihor Radchenko , emacs-orgmode@gnu.org Subject: Re: Org 9.6-pre and Bash sessions In-Reply-To: <87pmel68y6.fsf@localhost> References: <87edvbysqc.fsf@localhost> <87r0z6j1b1.fsf@localhost> <87pmel68y6.fsf@localhost> Date: Fri, 21 Oct 2022 15:38:31 +0200 Message-ID: MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Proofpoint-GUID: MYxQLsRqjgjFuEY_-O6xlbvkDP_YImME X-Proofpoint-ORIG-GUID: MYxQLsRqjgjFuEY_-O6xlbvkDP_YImME X-Proofpoint-Virus-Version: =?UTF-8?Q?vendor=3Dfsecure_engine=3D1.1.170-22c6f66c430a71ce266a39bfe25bc?= =?UTF-8?Q?2903e8d5c8f:6.0.425,18.0.572,17.0.605.474.0000000_definitions?= =?UTF-8?Q?=3D2022-01-14=5F01:2022-01-14=5F01,2020-02-14=5F11,2020-01-23?= =?UTF-8?Q?=5F02_signatures=3D0?= X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 adultscore=0 spamscore=0 clxscore=1015 mlxlogscore=795 phishscore=0 malwarescore=0 bulkscore=0 suspectscore=0 mlxscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2209130000 definitions=main-2210210082 Received-SPF: pass client-ip=17.58.23.181; envelope-from=salutis@me.com; helo=mr85p00im-ztdg06011201.me.com 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, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_LOW=-0.7, 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: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+larch=yhetil.org@gnu.org Sender: "Emacs-orgmode" 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=1666359616; 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=YY1i6iyqqOsJ2MsFwbdvOK+ZzCdAY98gLn8F+rOyrUI=; b=bC9QD6eMg4u0Ji4ym9dJTY14rfsaOaqup7T47wSKGoSYhB/Eu4pVM1esWoJe1fanja91+Q byZ7h50ClAvldFsbU7AlUHcCEpE4m3znKf5Ym4qOSkf4imI+cOFhfVD30Sud1m0BNxnipe CUsxnhc5wPt0yFVGQ9TCe+ufQppRUC2IdV9SScL8WRUTCsWZrU8+H2a0/AVQY4Zd7Wk5ge z5sSmLcDUOR3KH1vkJP2DNyzKoX7KW+hZQeBH1tOwfasSrvET8VsDoP6plkq45FuYpWoAn AJOgK86tyuf1Oi6iny6xiPmiamH1SCfbDxAzSmTZXKQu0wMo9cUn4bRcoe4qAQ== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1666359616; a=rsa-sha256; cv=none; b=gGsWl+tuZmmdPiz9HWKQ5CHFGcpS8Ty0WREC1jnBO1jlDeGlrq2VTj34vhlfVaFOvCgfqF atxF/WY3ZBfStPYFMnME5/lQMr5o7zHN++b2MT83FvKAOnVGDv3P55JdMYmzM722/tOMj5 Ti/lByhvG77RwBvLSt7sccxSdhjF1aE9sbY2b8Dwx6WGSVODhVF9yt29QdyVxQZARDRtJP +x+9oouH5sHRExvGfs7uNei2Qymix//fDYPnhRJn+LG5gYytF6my/Mx5GEbrP5fkDD8jL5 oW/bE6cvdoOtmlq0sbYONgm+01brBAItJx73uzrmHZ7KERcXJJHKXEhCdaoH3g== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=pass header.d=me.com header.s=1a1hai header.b=wHMyAPhh; dmarc=pass (policy=quarantine) header.from=me.com; 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: -7.64 Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=me.com header.s=1a1hai header.b=wHMyAPhh; dmarc=pass (policy=quarantine) header.from=me.com; 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: D78B72301 X-Spam-Score: -7.64 X-Migadu-Scanner: scn0.migadu.com X-TUID: MLnUQTzjz/rR Ihor Radchenko writes: > See the attached tentative patch. > I'd appreciate some testing. Hopefully, I did not break anything. I did some testing and found no issues. Great work! Below, I include some suggestions regarding the patch. > * lisp/ob-comint.el (org-babel-comint-with-output): Cleanup empty > output. Such output is spitted unnecessarily for multi-line scripts. - 'cleanup' (noun) -> 'clean up' (verb) - 'spitted' -> ??? (did you mean 'split', perhaps?) > * testing/lisp/test-ob-shell.el (test-ob-shell/session): Add test. - 'test' -> 'a test' > + (let ((res (org-babel-execute:sh "if true; then\necho \"yes\"\nfi" '((= :session . "yes"))))) This line has 93 columns, which makes it needlessly hard to read. Consider, (let ((result (org-babel-execute:sh "if true \n then \n echo yes \n fi" '((:session . "yes"))))) (should result) (should (string=3D "yes" result))) I replaced the remaining semicolons with newlines, given the test focuses on "multi-line scripts". Further, I removed the needless (escaped) quotes around "yes". Lastly, I renamed 'res' to 'result', improving readability and consistency, given the file already uses 'result' in another 'let'. Rudy --=20 "Programming reliably -- must be an activity of an undeniably mathematical nature [=E2=80=A6] You see, mathematics is about thinking, and doing mathematics is always trying to think as well as possible." -- Edsger W. Dijkstra, 1981 Rudolf Adamkovi=C4=8D [he/him] Studenohorsk=C3=A1 25 84103 Bratislava Slovakia