From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp12.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 EAg7OURN0mPmRQEAbAwnHQ (envelope-from ) for ; Thu, 26 Jan 2023 10:52:05 +0100 Received: from aspmx1.migadu.com ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp12.migadu.com with LMTPS id uALkOERN0mP8OQEAauVa8A (envelope-from ) for ; Thu, 26 Jan 2023 10:52:04 +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 A853037B97 for ; Thu, 26 Jan 2023 10:52:04 +0100 (CET) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pKyuE-0001CT-Nt; Thu, 26 Jan 2023 04:50:54 -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 1pKyuD-0001Aq-Bk for emacs-orgmode@gnu.org; Thu, 26 Jan 2023 04:50:53 -0500 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 1pKyuB-0006Lo-3z for emacs-orgmode@gnu.org; Thu, 26 Jan 2023 04:50:53 -0500 Received: from submission (posteo.de [185.67.36.169]) by mout01.posteo.de (Postfix) with ESMTPS id F13302405F2 for ; Thu, 26 Jan 2023 10:50:47 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=posteo.net; s=2017; t=1674726649; bh=ORJdjq8TYotDzSDFE0B5TWALkeToYH2IEbZe+ofLOQ4=; h=From:To:Cc:Subject:Date:From; b=T6ActYsNmh5jMA+ytPr+vqmUnr9wV45PlCfp6QEH7zBmf7WjrYmTkMQvubGMNp+2O s7IMoz0xf9JP2EjAAqtx9CEFKI920n/yZVGyQuZB/HKGf9+KHqk6HzKxN8A2y7IHDa Zhc1j/MyCGphy9pF2B8rQgL9itYGb944PFch9QkKWAYto5P4TbF/64n3mL8yAFhrUu IlUjDI+G9IJbM2foMWiZKmgipY+bAbpMtfy/27HM6XDsSMiRGd+OiMy4qPyYFXVy2H TM9Ku4XCr4KewWYha0E1CUF4Syxq3t2CrDZt3fJKSq6Vvs1l84bVhR/mH9ExELq+wt Qf5pzdAfN4UOA== Received: from customer (localhost [127.0.0.1]) by submission (posteo.de) with ESMTPSA id 4P2bYf2TdPz9rxH; Thu, 26 Jan 2023 10:50:45 +0100 (CET) From: Ihor Radchenko To: Matt , Bastien Cc: osher jacob , emacs-orgmode 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/)] In-Reply-To: <185ec3f46e2.f96332c0506072.2994965640426706061@excalamus.com> References: <185bc86c826.11ae860d1190626.407710511075709301@excalamus.com> <185bd43e452.bb3f5419220019.823265614059778953@excalamus.com> <185c34814a4.bcdd7b94578193.327779579906739164@excalamus.com> <87ilh48b6p.fsf@localhost> <185cd70ae39.f63b9940267772.3953346328326599863@excalamus.com> <87bkmttv2h.fsf@localhost> <185dc9cbce2.e7688b29675726.108231333271155983@excalamus.com> <185ec3f46e2.f96332c0506072.2994965640426706061@excalamus.com> Date: Thu, 26 Jan 2023 09:51:19 +0000 Message-ID: <87fsbxwrmw.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, 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-Country: US X-Migadu-Flow: FLOW_IN ARC-Seal: i=1; s=key1; d=yhetil.org; t=1674726724; a=rsa-sha256; cv=none; b=qD6BzBFRkAiRXrFIXGzqj+3sUalXp51O9okk9rEUkNUeEsQNlCiQzfXyemz/B16pQSffkX tD3YIG2CMhtsxrO7xAJJBeTnqqTh6O0/CDqz77TqWY4xwqN03LIFBcKU0jq9rQ/66F5Hso Y4dXWHqhsmM3zxlQNEqDrhUuKtw5Az8Noqtvv+vTZznvN5S1ChMH04XrDOZ2trpQoP4SJ1 HK1eRlUb+F0SZ/7079dFaTHtUz4wIiqiuPmDexMlNb1D89XwOa/BJAA/ixSVNwFzjFRMpe D8lUycZ3hoWzqRlDrIzF22l0axiVhrvP8jhrBcgGLTj+56Hydlh87tQUWsXfTA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1674726724; 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=tWLM9BcqAdlSHL4eZl0wUSBASjixvF38VMfCKB6OTwo=; b=gVvZodhfJ6tFuWJkvk7yzRCKsdHH4pLKjXra454CjXToESpIgWYNops+vAxd+eDtFuCz8H pvgaVmrdnlQGOtbdJqXyUcjtI9+EXwTYh36BtmAjhnGDPJkIJB4zeL90WrNu+Mp8O36r/P K2t7iLbwXkEBknj03/UT0mw0Ub8bn2yBLQZsrwdslHhBqUi5HCP0sM7H2K7Zhp1RZF4LSq Z5/iGSeEO3wAKU0GaCPMR1fu0Fui9s0PnCseg28As1gGoyieV/RSYI4qmvQ1zYkdvkZHiv 419L7yIqEZdQ2L6ep8K6Xxzd9Bh3VWRDvSpzjSaOj2wJYsXPiJNwfMtzUmK47Q== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=pass header.d=posteo.net header.s=2017 header.b=T6ActYsN; 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: -6.14 X-Spam-Score: -6.14 X-Migadu-Queue-Id: A853037B97 Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=posteo.net header.s=2017 header.b=T6ActYsN; 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-TUID: GqgpRRVEr8LO Matt writes: > > ---- On Fri, 20 Jan 2023 04:27:18 -0500 Ihor Radchenko wrote --- > > I think `org-babel--shell-command-on-region' will be more appropriate. > > Because similar issues might appear when attempting to evaluate other > > code blocks on Windows, where `shell-file-name' is set to cmdproxy.exe. > > Is something like this what you're thinking? Or, do we want to check explicitly for "cmdproxy.exe"? AFAIK, extra newline should be safe in all other script languages. > Also, this bug isn't currently tracked in Woof!. I'm not able to confirm it, but since we're putting in a fix, should be add it anyway? Your message with a patch is supposed to be auto-detected... (It is not, which is a bug) Bastien, heads up. Do not worry about Woof! just yet. The new version is not yet officially used. Bastien is still polishing the code. > - nil shell-command-switch command)) > + nil shell-command-switch > + ;; Pass newline to satisfy Windows > + ;; cmdproxy.exe prompt for More. > + ;; > + ;; See: > + ;; `https://list.orgmode.org/orgmode/87bkmttv2h.fsf@localhost/' > + (concat command "\n"))) This will add a newline to "cmdproxy.exe" command -> "cmdproxy.exe\n". You should instead look into `org-babel--write-temp-buffer-input-file'. -- Ihor Radchenko // yantar92, Org mode contributor, Learn more about Org mode at . Support Org development at , or support my work at