From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp10.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 IMsVO4BeymMnVAEAbAwnHQ (envelope-from ) for ; Fri, 20 Jan 2023 10:27:29 +0100 Received: from aspmx1.migadu.com ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp10.migadu.com with LMTPS id 4P03OoBeymNvWQAAG6o9tA (envelope-from ) for ; Fri, 20 Jan 2023 10:27:28 +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 A8C533EED6 for ; Fri, 20 Jan 2023 10:27:28 +0100 (CET) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pInfn-0000Ux-VB; Fri, 20 Jan 2023 04:26:59 -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 1pInfk-0000Un-Js for emacs-orgmode@gnu.org; Fri, 20 Jan 2023 04:26:56 -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 1pInfi-00085B-Sx for emacs-orgmode@gnu.org; Fri, 20 Jan 2023 04:26:56 -0500 Received: from submission (posteo.de [185.67.36.169]) by mout01.posteo.de (Postfix) with ESMTPS id 6A340240580 for ; Fri, 20 Jan 2023 10:26:51 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=posteo.net; s=2017; t=1674206812; bh=c5xUTv8+/uHwk5sS65/oKJR4MEi2L/GK4Vms3Z3gDN4=; h=From:To:Cc:Subject:Date:From; b=A3DJuXm6bXO1wPYE5ufxMrrqo/eWam6mVZzUF/IkUbSs+ZUu5NWsJgTAI7FmO0ia6 CjS/4wz3UaukUPgW4IsVOV/NIk9lvkVt9V1d3LfnDZAPJHS8J3/KfpwF2RvoTiLNvR 2T1uX83I1sZE1BprvD2kdafS5C0VPmvrnMk/Ya/fR/31a6dv5Uepcm/gUCJBuGN5wU hLipAbcxI6ujorHu2Sw6rhDo1ThORjNlz/pU/Fig28di2EneKzK81paLii1kE5NkKP eYy/vIgglY3wo2zHp7gA+ZlAn6KQsg6O4QAT5SVzgIeDrXIeJtTqn7wKxSg+ZRi2C9 FWLdJ5FXIIbLg== Received: from customer (localhost [127.0.0.1]) by submission (posteo.de) with ESMTPSA id 4NyvJp1pf2z9rxH; Fri, 20 Jan 2023 10:26:50 +0100 (CET) From: Ihor Radchenko To: Matt 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: <185cd70ae39.f63b9940267772.3953346328326599863@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> Date: Fri, 20 Jan 2023 09:27:18 +0000 Message-ID: <87bkmttv2h.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-Flow: FLOW_IN X-Migadu-Country: US ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1674206848; 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=yXCMRL7xz2mor7VsQSgj8OXm8KXV+vyKkCJ1RM24uwM=; b=CNtE5A1qopZiLwV43BJyAN7vhpsztddIAAYtFB+errjbRPZZ/1pjV7ncRhcHggDCq5LueX m8CyfchVaIZb6HfN5Htq3P2Wi3RsVQgG0GzXC8HxqyuEaDsdmLSK6Q3oY+nIeCJY7bxKgv nX0owDX/NOBsA+mPLghL5qgmKPm3NLQCVhUIJe6VgHWN4ZipaLaMmQDoSa17N5iQWs65vJ s/Qz29EitkLebuCGdNAX3HO9fyIBylxGeg5ZybodHShJIX7UmBGi2Mo/YlyYapbz9JskmH pK4/9uvMGpu7HQFGTLi9Dr4R8Gf9M2AKevdVh2t9HwkWe255cEIKgLZETW6I9g== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=pass header.d=posteo.net header.s=2017 header.b=A3DJuXm6; dmarc=pass (policy=none) header.from=posteo.net; 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=1; s=key1; d=yhetil.org; t=1674206848; a=rsa-sha256; cv=none; b=coZa6XAvRxtnxGYs0fm87z4OWbmjgYhWwPr4LxlnUCHN60qi9hHXC8TJ0Bv0dcfZxstqfF z3gyYRs0mfLZNZLLZMBzyVGzzGZpeMjkb/042WEocD4K6JaNsjo3tEomZprEIZOSqIK+c2 HZjFzy0J0GDjmloOhBszkGMvJ3wi5u+1DHVmMtPsje8PczMgTPs3ehKyY9kdzpChr+4tEO 9GiSqlZ6PpFXKh6iim86X/K8uGeJ9oO+aLhVzJjrRBcuoIePVmBr80bi6JHrB+iZCHaOTj qecQn6Y1msSLTG2FnJXctjwPUMyr3IHOvmz1+X2J62bO9E5CsxIAwMTR2RhdEg== X-Migadu-Scanner: scn1.migadu.com X-Migadu-Spam-Score: -4.57 X-Spam-Score: -4.57 X-Migadu-Queue-Id: A8C533EED6 Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=posteo.net header.s=2017 header.b=A3DJuXm6; dmarc=pass (policy=none) header.from=posteo.net; 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: 7A3sh0Zc2Loy Matt writes: > I agree, putting in the newline is simple and it would be easy enough to create 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 handle the cmd case separately and earlier (by inserting the newline there)? 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. It will also be useful to leave a comment in the code explaining why we need this newline. -- Ihor Radchenko // yantar92, Org mode contributor, Learn more about Org mode at . Support Org development at , or support my work at