From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: 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 iB5ZHt4YymMSFQAAbAwnHQ (envelope-from ) for ; Fri, 20 Jan 2023 05:30:22 +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 UFFZHt4YymNkaAEA9RJhRA (envelope-from ) for ; Fri, 20 Jan 2023 05:30:22 +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 45278375CC for ; Fri, 20 Jan 2023 05:30:21 +0100 (CET) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pIj2Q-0001Q6-J1; Thu, 19 Jan 2023 23:30:02 -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 1pIj2O-0001PX-N3 for emacs-orgmode@gnu.org; Thu, 19 Jan 2023 23:30:00 -0500 Received: from sender4-op-o12.zoho.com ([136.143.188.12]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pIj2M-0002Cn-OJ for emacs-orgmode@gnu.org; Thu, 19 Jan 2023 23:30:00 -0500 ARC-Seal: i=1; a=rsa-sha256; t=1674188994; cv=none; d=zohomail.com; s=zohoarc; b=CUD0lPWm+SdStrqLGDdSF+2XB99D6b2cgeAASSEK6Y+bFTGr+wGYhkwYRsa598vOA8VMEOmeEFwAthFpHcOJrGv3V9sajmOlhC8tPUzj0VH8O4XCLsIm136Sb46TdxP0MPJxvxJ9qcgBNd+fD6Ra5hP59HV569kb/l2bg3rFU3Y= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1674188994; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:MIME-Version:Message-ID:References:Subject:To; bh=Seyuq7eqfFRQsdR7k7F3hGcaFfI1xIMbm5LwKMQmVaU=; b=FMQgQJQY2rK/zdDeMnzZdzmUfbPklIrQg/9DNuZBoA0JSxnGsA327pOr4g6k4fsVULVwD+xZLosQG8qzpecfewxTfncLC7edB0P6E0Lkcaq5BIoj52B/NnNjOt4Lj9MJ2/lQE7+X/RiIfRG5ZFuS+sPvV7Gx3vUA3WcynkjDbgA= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass header.i=excalamus.com; spf=pass smtp.mailfrom=matt@excalamus.com; dmarc=pass header.from= DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; t=1674188994; s=zmail; d=excalamus.com; i=matt@excalamus.com; h=Date:Date:From:From:To:To:Cc:Cc:Message-ID:In-Reply-To:References:Subject:Subject:MIME-Version:Content-Type:Content-Transfer-Encoding:Message-Id:Reply-To; bh=Seyuq7eqfFRQsdR7k7F3hGcaFfI1xIMbm5LwKMQmVaU=; b=NLNDb9KP+gajt9rQl/fH0ckRAJd5+pW15nlVu7MQjv8BxQrXI1r/cysvdtOutQj+ Xguzt2XdUjuC8bwJGo11vr1PNMLpOCNJTSCwFalu4US6tasPkftH6wexpSgDzAy7Wgp 4dduoGTW4/mbNiFYUTnHsTM9ExRBdSJAzVRyN8zU= Received: from mail.zoho.com by mx.zohomail.com with SMTP id 1674188992072801.3783209079988; Thu, 19 Jan 2023 20:29:52 -0800 (PST) Date: Thu, 19 Jan 2023 23:29:52 -0500 From: Matt To: "Osher Jacob" Cc: "ihor radchenko" , "emacs-orgmode" Message-ID: <185cd70ae39.f63b9940267772.3953346328326599863@excalamus.com> In-Reply-To: References: <185bc86c826.11ae860d1190626.407710511075709301@excalamus.com> <185bd43e452.bb3f5419220019.823265614059778953@excalamus.com> <185c34814a4.bcdd7b94578193.327779579906739164@excalamus.com> <87ilh48b6p.fsf@localhost> Subject: Re: [BUG] ob-shell doesn't evaluate last line on Windows (cmd/cmdproxy) [9.6.1 ( @ c:/Users/Osher/AppData/Roaming/.emacs.d/elpa/org-9.6.1/)] MIME-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Importance: Medium User-Agent: Zoho Mail X-Mailer: Zoho Mail Received-SPF: pass client-ip=136.143.188.12; envelope-from=matt@excalamus.com; helo=sender4-op-o12.zoho.com 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, RCVD_IN_DNSWL_NONE=-0.0001, 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-bounces+larch=yhetil.org@gnu.org X-Migadu-Flow: FLOW_IN X-Migadu-Country: US ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1674189021; 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=Seyuq7eqfFRQsdR7k7F3hGcaFfI1xIMbm5LwKMQmVaU=; b=hHpuO1vmR20MopcXbra6jLjGDIu+wgg3vtYSaGjDXRT7+eXn+NUl0jC57gx3ToKDHH0wm4 11R6TNwAPnhd2K2ar4poll5AnF6vuutITA+AgGDgMSup76ITgfGTIxGPvJNUk6ePgzQVUp HKWX8wcgVKaKPO5/7QEoR1DAlw+pKcl1qBM9g9CxuRO+gyG+xVbi/c3FSWBPf4VEFfP8jc kX5Xn/R7RPPzfzBw4OfemiHDglTDnD5XvIq8qJWbUimxjhuebCYubXvDmt+oBrTLaz4/yU uID121tTXKaecCO5kcN+K8uxNNLY8f/K72P3lVuE9lrqQJRQiKoCjGax+hZb8Q== ARC-Authentication-Results: i=2; aspmx1.migadu.com; dkim=pass header.d=excalamus.com header.s=zmail header.b=NLNDb9KP; dmarc=none; arc=pass ("zohomail.com:s=zohoarc:i=1"); 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=2; s=key1; d=yhetil.org; t=1674189021; a=rsa-sha256; cv=pass; b=mhyk/mS9uirKge38LWUD64LwKAJKptzcV0KrGHPVCJxP9Z4UU4JXfsb5SOrVEo4RmYV2HD bdQ4qsSEfIKYWWmab7+fISr/LjAdeYsKC3mGCklBzs4eG4yoHTrXW6E777Wqj/qPPt5Tsz EiIeE1AJokG2DMhL18JhQxXTlPuj847FtYLjWASPjJjSwM1pSWAnLQ/ToEYBe6790k0m/r NjAzHeTWD9Wqk0yvgh4AKC7D0+XTBUt+BO93uDGt+TNYYDSwaRdESZj25fz850k2qEwR1R mQXfR4OSy4hUhNtHO/cf4YmmebV4hmBRWiB/3a6YH3WAsRh3OJ+EhVENSw3Uyw== X-Migadu-Scanner: scn1.migadu.com X-Migadu-Spam-Score: -5.30 X-Spam-Score: -5.30 X-Migadu-Queue-Id: 45278375CC Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=excalamus.com header.s=zmail header.b=NLNDb9KP; dmarc=none; arc=pass ("zohomail.com:s=zohoarc:i=1"); 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-TUID: LVoMapk4ZTK/ ---- On Thu, 19 Jan 2023 11:28:09 -0500 Osher Jacob wrote ---=20 =20 > If we're insistent=C2=A0on passing the input through=C2=A0the command li= ne arguments, I can think of two ways to go about this,=C2=A0but both seem = undesirable They're good ideas and, I agree, aren't ideal. =20 > =C2=A0I think it could be enough to make sure the input ends with a newl= ine, in which case it could be done the way I proposed in the first message= , that is changing:(t (org-babel-eval shell-file-name (org-trim body)))))) > to(t (org-babel-eval shell-file-name (concat (org-trim body) "\n")))))) Your original proposal was reasonable and looks even more so now.=20 =20 > I think as long as this change doesn't break the code in non-Windows ope= rating systems (How would we go about verifying this?), it would be prefera= ble due to its=C2=A0simplicity and minimality. Agreed, I like its simplicity. Tests are a first step and they all pass wi= th your suggested change. > If for any other reason you would rather not change the=C2=A0org-babel-s= h-evaluate, and would like to implement a separate function for Windows, th= at's also a viable option.I am willing to try and go down that path, althou= gh I'm not a very experienced lisper. > Do any of these options sound like they could work well? I agree, putting in the newline is simple and it would be easy enough to cr= eate a separate path for Windows/cmd if it were a problem. I wonder if it might make sense to move where the trimming happens so that = the body passed into `org-babel-sh-evaluate' is ready to go and we could ha= ndle the cmd case separately and earlier (by inserting the newline there)? I appreciate you taking the time to explore and for being open to what feel= s like me over-thinking it :) I'll be away from the keyboard for a few days and I look forward to getting= this wrapped up for you. Meanwhile, I'm curious if Ihor or others have ad= vice.