From mboxrd@z Thu Jan  1 00:00:00 1970
Return-Path: <emacs-orgmode-bounces+larch=yhetil.org@gnu.org>
Received: from mp11.migadu.com ([2001:41d0:2:bcc0::])
	(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits))
	by ms5.migadu.com with LMTPS
	id sLzWJUmosmP6iAAAbAwnHQ
	(envelope-from <emacs-orgmode-bounces+larch=yhetil.org@gnu.org>)
	for <larch@yhetil.org>; Mon, 02 Jan 2023 10:47:53 +0100
Received: from aspmx1.migadu.com ([2001:41d0:2:bcc0::])
	(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits))
	by mp11.migadu.com with LMTPS
	id +FfQJUmosmN74QAA9RJhRA
	(envelope-from <emacs-orgmode-bounces+larch=yhetil.org@gnu.org>)
	for <larch@yhetil.org>; Mon, 02 Jan 2023 10:47:53 +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 5A915AED7
	for <larch@yhetil.org>; Mon,  2 Jan 2023 10:47:53 +0100 (CET)
Received: from localhost ([::1] helo=lists1p.gnu.org)
	by lists.gnu.org with esmtp (Exim 4.90_1)
	(envelope-from <emacs-orgmode-bounces@gnu.org>)
	id 1pCHPM-0005uA-14; Mon, 02 Jan 2023 04:47:04 -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 <yantar92@posteo.net>)
 id 1pCHP8-0005qN-3j
 for emacs-orgmode@gnu.org; Mon, 02 Jan 2023 04:47:01 -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 <yantar92@posteo.net>)
 id 1pCHP5-0000Z2-Sp
 for emacs-orgmode@gnu.org; Mon, 02 Jan 2023 04:46:49 -0500
Received: from submission (posteo.de [185.67.36.169]) 
 by mout02.posteo.de (Postfix) with ESMTPS id 9C25B2402E2
 for <emacs-orgmode@gnu.org>; Mon,  2 Jan 2023 10:46:43 +0100 (CET)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=posteo.net; s=2017;
 t=1672652805; bh=1SWKZHSud0d0QExQ+3j3Eh7msVynEyIPcSLMPYFLTIY=;
 h=From:To:Cc:Subject:Date:From;
 b=mZvgbYzXfxkymIQgGGAepPCtUUGx5NHVDq/SM4ru3f53mbsDvo9atgeZSoHhDpj+8
 ZqRmxKDWWz4t+dWZu5exhyt5LPUAkP97+81O6PA3FZZjYy1MWLokLOAANZoeMZYkpK
 8Cv0IwKuYm79zhykPlX0iIiki6wfZxipbpS8AMvTbs9gHcG/R6oc6OMfvflhAUCauk
 Y0UpZ675lWDq1jO2mMaImtDdvCwlHBWB0euVCjCLvx7apVDHTlla+RgrpGUUJ/jfF1
 jgNufNVX7a9XB8jgME6/1gtgrDmpwVIIulVKTvrTlJAGMnRz1r2XXYKxTJ4vOcl5PW
 zoCIJ88WfcjDA==
Received: from customer (localhost [127.0.0.1])
 by submission (posteo.de) with ESMTPSA id 4Nlrbz7322z6tlh;
 Mon,  2 Jan 2023 10:46:39 +0100 (CET)
From: Ihor Radchenko <yantar92@posteo.net>
To: Matt <matt@excalamus.com>
Cc: emacs-orgmode <emacs-orgmode@gnu.org>
Subject: Re: ob-shell intentions and paperwork (was Bash results broken?)
In-Reply-To: <1856fc2c9c4.d213558d30469.8133539665325553154@excalamus.com>
References: <m2tu1v8gj8.fsf@me.com> <878rj7s0ti.fsf@localhost>
 <1853354beb4.fce54d8d902653.6359367327256505471@excalamus.com>
 <18555580d75.d7b471f9370716.1497263973038999899@excalamus.com>
 <87edsiv54k.fsf@localhost>
 <18561866f8c.f22a62b3866025.8634474263936272339@excalamus.com>
 <185645af285.f16730c9981316.8238066002530458068@excalamus.com>
 <87zgb38x0v.fsf@localhost>
 <1856fc2c9c4.d213558d30469.8133539665325553154@excalamus.com>
Date: Mon, 02 Jan 2023 09:47:10 +0000
Message-ID: <87a631mfoh.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." <emacs-orgmode.gnu.org>
List-Unsubscribe: <https://lists.gnu.org/mailman/options/emacs-orgmode>,
 <mailto:emacs-orgmode-request@gnu.org?subject=unsubscribe>
List-Archive: <https://lists.gnu.org/archive/html/emacs-orgmode>
List-Post: <mailto:emacs-orgmode@gnu.org>
List-Help: <mailto:emacs-orgmode-request@gnu.org?subject=help>
List-Subscribe: <https://lists.gnu.org/mailman/listinfo/emacs-orgmode>,
 <mailto:emacs-orgmode-request@gnu.org?subject=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
ARC-Seal: i=1; s=key1; d=yhetil.org; t=1672652873; a=rsa-sha256; cv=none;
	b=CTcpsTq5gfPgeSy5APR7muh9maWDn51Fhjx028frBdSH91l2ch5T2y5ZxNmPRo/3R2fTdu
	HE1Wn8zrzjmcL+ov1Wqzp3AzfZtGMS+0AIcY2nWXlg/EaBup5W1L5BgWuAJoEw3GJ/bhw8
	JhFWeUcThGUBbpmqXfec14OWv15C6lcDdib9bxI/0GS3i6Mc3mAi4OjaO+kWnSF7f7wQZV
	qnZorBNxCM33RDgtnldlfuaqhudX36qcpSnzytfpTDpj8Enew50QYqCHNeOiKQnCMA3gd/
	5FJPg7YB0azX4hS5pYDgMqQtEmgXsdcWIylR2SDxo6RZgM2KRNeEwwaRXT10fg==
ARC-Authentication-Results: i=1;
	aspmx1.migadu.com;
	dkim=pass header.d=posteo.net header.s=2017 header.b=mZvgbYzX;
	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=1672652873;
	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=hTxA3AvKCfCNH41N4hpvcEOCGO/6kaJ9j9jZ8V9J9XM=;
	b=SN4NSYlF8gfJXu8m7+UPV/Y8LU6qo1l/BAqDm7tDx89dHJ1Ctdnpk2A1kAIVFK78qoqITS
	6uIoU4+vlzOXMUdlexxahtX2AtAROIycafDVgfSznbtbNe2HRmBf2dzhG1NvnwXC0v0HcT
	SIBqQEoee5AUR1RlBClK371eqbhNxMe4nTz1eYURkRIPv4omecjSeDCqP4INF3Nmb0A+0l
	v8fEXPKPSRPPhDF9dKNm68HHuvHpsVH1upuRZXKQ5MTH6KjWefG8UwPleqkxukVCN+TuTp
	tafRsDOk4bwV9go5JO5tMZ/bQbG2rMRyfGf1a4Kpo39Bts4710vsleMW6var/g==
X-Spam-Score: -11.39
X-Migadu-Queue-Id: 5A915AED7
Authentication-Results: aspmx1.migadu.com;
	dkim=pass header.d=posteo.net header.s=2017 header.b=mZvgbYzX;
	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
X-Migadu-Scanner: scn0.migadu.com
X-Migadu-Spam-Score: -11.39
X-TUID: YXUOre+yTWU9

Matt <matt@excalamus.com> writes:

> If this set of patches look good, I can push them to main.

Just one more comment.
You are using constructs like

(if (should ...)
 (kill-buffer ...))

They will not be reliable when tests are executed interactively.
If the `should' condition fails, `kill-buffer' will never be executed
leaving dirty state, especially for sessions.

You can instead use

(unwind-protect
 (should ...)
 (kill-buffer ...))

-- 
Ihor Radchenko // yantar92,
Org mode contributor,
Learn more about Org mode at <https://orgmode.org/>.
Support Org development at <https://liberapay.com/org-mode>,
or support my work at <https://liberapay.com/yantar92>