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 +EsPB/T70WPxNAEAbAwnHQ (envelope-from ) for ; Thu, 26 Jan 2023 05:05:08 +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 +J0rB/T70WPJYgEAauVa8A (envelope-from ) for ; Thu, 26 Jan 2023 05:05:08 +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 CDC3117782 for ; Thu, 26 Jan 2023 05:05:07 +0100 (CET) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pKtUn-0001np-GU; Wed, 25 Jan 2023 23:04:17 -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 1pKtUl-0001nf-Rw for emacs-orgmode@gnu.org; Wed, 25 Jan 2023 23:04:15 -0500 Received: from sender4-op-o14.zoho.com ([136.143.188.14]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pKtUj-0006l0-Va for emacs-orgmode@gnu.org; Wed, 25 Jan 2023 23:04:15 -0500 ARC-Seal: i=1; a=rsa-sha256; t=1674705849; cv=none; d=zohomail.com; s=zohoarc; b=TAIbpyH9TcEyiENOkmX8wXDgmJlCIrWrACY2w3qPE6KVDZEBNSYcZwo8TwP8GBfNDY4W0Tm0cN0HRxH4If3RBDxJUW+TmVOERFGEVnsRM4yp0G3Bq8QujCrDgFEclkqRrCERlIBvazUp04jAyXUA+1OZR9dBB5LTFe2QgZBB0YU= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1674705849; h=Content-Type:Cc:Date:From:In-Reply-To:MIME-Version:Message-ID:References:Subject:To; bh=g8eqOiBKq3qP/Odvp9LuyesEnr3ieN8ElTpl9By8DAg=; b=Yqk9uFEbkGTMr3ChH/enTWtUBlIPM7IXuG+0ObMjxOv18fupgymEXdTlBvxK45eSjERzaEt7nBOtHyFi3TB5TMp095ZnR3+UdwMDjt/hGvJUNjuT2N6JPjHbHME95IEZKDthQekMNVg2mkROiYRcqC2xUTS7JR5td5CpLCGHBpc= 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=1674705849; s=zmail; d=excalamus.com; i=matt@excalamus.com; h=Date:Date:From:From:To:To:Cc:Cc:Message-Id:Message-Id:In-Reply-To:References:Subject:Subject:MIME-Version:Content-Type:Reply-To; bh=g8eqOiBKq3qP/Odvp9LuyesEnr3ieN8ElTpl9By8DAg=; b=ZzWh6FxpyY+/OomxyxIK32UkbOiHewrH0G4WrHYB50m1a7aX6P+wHt0mzbjqevHb WsVEYbq0oxv6Xobl6UY0KF6Z4wRU55hMrLVbCIwhyuAmthLxYMD+znj6gZKmHj176Hy uwCrFkG3GxVR3+oN9BiUlssOVl5cNsqnSyUQscGU= Received: from mail.zoho.com by mx.zohomail.com with SMTP id 1674705848057827.4639349205; Wed, 25 Jan 2023 20:04:08 -0800 (PST) Date: Wed, 25 Jan 2023 23:04:08 -0500 From: Matt To: "Ihor Radchenko" Cc: "osher jacob" , "emacs-orgmode" Message-Id: <185ec3f46e2.f96332c0506072.2994965640426706061@excalamus.com> In-Reply-To: <185dc9cbce2.e7688b29675726.108231333271155983@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> 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: multipart/mixed; boundary="----=_Part_1647199_728487791.1674705848034" Importance: Medium User-Agent: Zoho Mail X-Mailer: Zoho Mail X-Zoho-Virus-Status: 1 Received-SPF: pass client-ip=136.143.188.14; envelope-from=matt@excalamus.com; helo=sender4-op-o14.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=1674705907; 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=g8eqOiBKq3qP/Odvp9LuyesEnr3ieN8ElTpl9By8DAg=; b=QHg9NbAQp9CDPO1m6sjk0wWs4G/wwbxQuxGp7lUhuVGYqB8btEX9Nv3D2cihpMYZQlc2sV TUnx2JEKe3d3zbSyORbARUqvCZJusaLp9FlXSmlm4Wlb9yfO/u7KqUbSLsoB6ZJrtkku11 haaTdca+2677SkrX3KBhcnivNy6IHWpr6RdLFNdgP9wim1IBzvvBrPXK131Pgqyg48CSAK i4jNyjxHY/GdBHb58IgFYrsdphj+pPsyIiYkHabd7FVeK2r4A74N4CfSDxnCjZxWEBgqPg pWj1XXpxv01+L3ba6zDHcmhzmND/mlcy857k3HrUVmufWOll5YnIMNbZdXq8Zg== ARC-Authentication-Results: i=2; aspmx1.migadu.com; dkim=pass header.d=excalamus.com header.s=zmail header.b=ZzWh6Fxp; 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"; dmarc=none ARC-Seal: i=2; s=key1; d=yhetil.org; t=1674705907; a=rsa-sha256; cv=pass; b=LHjEYrvspLRd7qNHFFkQD7doyeidoXqzR5keV3kG68Rm3Goe3gbGoyWCDlWR3b0rnLVS3a NCyCbQji7coMmKAHcnivyCsaw7TDdnR9vcGkBdH51f/NZEYv2dnDEAJnhZtf459GaOXOea Vqfp1HT+TqzxbsLlYLIZGWYp3V+JVPd9zaVtcpUW7BeOCfExiUzfVVm4vaCjXwJlIhZ31s e/SpCwH4/TimGOWLWyRjO+aIR+tX6CpeUdBdMOTVRdL5pX1/tpTJlUHhjJRs/w8l5Olzu9 b6/aPhctxtD8b1qGz3toPJ6wAWC9mi2Z/p7wMdQT42dbQsmZZHYhjKOOZu/q/Q== X-Migadu-Scanner: scn1.migadu.com Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=excalamus.com header.s=zmail header.b=ZzWh6Fxp; 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"; dmarc=none X-Migadu-Spam-Score: -6.77 X-Spam-Score: -6.77 X-Migadu-Queue-Id: CDC3117782 X-TUID: Kos2vyKyIlj8 ------=_Part_1647199_728487791.1674705848034 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 7bit > ---- 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"? 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? ------=_Part_1647199_728487791.1674705848034 Content-Type: application/octet-stream; name=ob-eval-handle-windows-shell.patch Content-Transfer-Encoding: 7bit X-ZM_AttachId: 138939986480350040 Content-Disposition: attachment; filename=ob-eval-handle-windows-shell.patch diff --git a/lisp/ob-eval.el b/lisp/ob-eval.el index b9d1f7f23..9d79527a0 100644 --- a/lisp/ob-eval.el +++ b/lisp/ob-eval.el @@ -118,7 +118,13 @@ returned." (if error-file (list t error-file) t) - 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"))) (when (and input-file (file-exists-p input-file) ;; bind org-babel--debug-input around the call to keep ------=_Part_1647199_728487791.1674705848034--