From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp11.migadu.com ([2001:41d0:403:58f0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms8.migadu.com with LMTPS id IE9aLL45bmVxNQAA9RJhRA:P1 (envelope-from ) for ; Mon, 04 Dec 2023 21:42:38 +0100 Received: from aspmx1.migadu.com ([2001:41d0:403:58f0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp11.migadu.com with LMTPS id IE9aLL45bmVxNQAA9RJhRA (envelope-from ) for ; Mon, 04 Dec 2023 21:42:38 +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 5D2D4174A8 for ; Mon, 4 Dec 2023 21:42:38 +0100 (CET) Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=excalamus.com header.s=zmail header.b=Gw0Pqfcm; arc=pass ("zohomail.com:s=zohoarc:i=1"); dmarc=none; 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-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1701722558; 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=Kl/QJNu0/2ruAiWOAKyNPYvm3Y5pL/ScZY1h2As4e/8=; b=E6JBso+uIWQBm6pjxO6wFrdbziYodFW4vHp6gApJb4Byjbo5rOwMWeOBnqZnvKaeh14GkV h5joAfYpd3RLjsLEf0sezLXGFgXh9orFjo3RuEH2iumN/fXa6lyuKgT+msKkKK1qs2ur+L psQDDO1R7456ohdXEtmQxGdjwUJJqWcCVM6GwPeV/Y6PfO9X7CyPQtJxWB0SgYvcT9WhDe De1w5ElmtHuWkNs4TXamQR7kEa74+sp8PAmDVMCTSXlh9lLjgLoXCDJ6qsHRLDjV+pTOiV KXEtj94e8uyBcUz+Qq2c3RYqXP+w2vnj3hfxFFVDMMJmfyktmYqFD1x0DK4XoQ== ARC-Seal: i=2; s=key1; d=yhetil.org; t=1701722558; a=rsa-sha256; cv=pass; b=G0v+A3kcZm6b9+DoGF9Xr6omac0yIwy6i2fQELbcdfRcrvX6GLSJpUTMb+iWBj7irDEkes yGmx8KIhq6LvXb5sbB6UZ+A5ZFT5TBuvqJqqpY3TpeJ7aoyuXBWPgfO6RJgax0QLeGoUqN U85xw1TnAZlgEU4lE/M1rP5KZNgASl3DCi6WLwEYCfKjDiIO6PwC8XtHEH0gVsCDbI8Oap j/ISzHTmPtSjQzwykI7ZQ9mPZYoswYnybepCzlkXmIsQlRypZDrE4vHD9GvTLfu1rMv/7d F9VZ/5bPQ+6ednqAFp9QhudM2E9+qYQcs8jZIjq07v+cmPH4UrkRqITf6/BE5w== ARC-Authentication-Results: i=2; aspmx1.migadu.com; dkim=pass header.d=excalamus.com header.s=zmail header.b=Gw0Pqfcm; arc=pass ("zohomail.com:s=zohoarc:i=1"); dmarc=none; 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" Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1rAFkz-0001s0-MN; Mon, 04 Dec 2023 15:41:33 -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 1rAFks-0001qo-Lt for emacs-orgmode@gnu.org; Mon, 04 Dec 2023 15:41:30 -0500 Received: from sender4-op-o18.zoho.com ([136.143.188.18]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1rAFkq-000886-UZ for emacs-orgmode@gnu.org; Mon, 04 Dec 2023 15:41:26 -0500 ARC-Seal: i=1; a=rsa-sha256; t=1701722479; cv=none; d=zohomail.com; s=zohoarc; b=Vxu1WPSeHhY2FzpN/A+cY9BvRDe5TJDguhH9hyp1tH0ss2mkBi1pgbW1wVMGWU7wxzZo2eoFzcwuxOnAySxUNdYRfhVk43PhEtZhwNJhs87gkksuItv91Ef9Kl3mVlKBcakZr9WtnNxKnZh2yq5Za7O+igtbAEocMzyVl9SKwsU= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1701722479; h=Content-Type:Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:MIME-Version:Message-ID:References:Subject:Subject:To:To:Message-Id:Reply-To; bh=Kl/QJNu0/2ruAiWOAKyNPYvm3Y5pL/ScZY1h2As4e/8=; b=Flxj+M5A9xDT27ZVNvNjMXkYmww0Q50OEjw/vrk43qK06Z9UbLnJLCCuKPpnV8RQEhT7DXE+GOmZVOol8kqtx0Pk7G6YaXb5Mewpk1NW0gZGKpWxgXJapJRsdZ0pnYWxj9gJL8m2A70KxH0lFRyny+hf+eq6AuRzhmn2J6CohRA= 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=1701722479; 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=Kl/QJNu0/2ruAiWOAKyNPYvm3Y5pL/ScZY1h2As4e/8=; b=Gw0Pqfcm/aW8Qkmj096YeffC+CiAQw/ZGBkJbn5gtk8t47bTAolY4pPe7rMu9ZqS 1r8gobS7hIdgeWELZyxXsLo4lF+Bc1XK2lz5Ie/Tl+1WS+aYGQxzYZBcAgcpxBlrfIf 4j3Taj/6lddpUx8MWZ/W1bw1La4d3fx7YFG8bKsM= Received: from mail.zoho.com by mx.zohomail.com with SMTP id 1701722478924681.6467273680013; Mon, 4 Dec 2023 12:41:18 -0800 (PST) Date: Mon, 04 Dec 2023 21:41:18 +0100 From: Matt To: "Ihor Radchenko" Cc: "Max Nikulin" , "emacs-orgmode" Message-ID: <18c36905936.c032bac8385085.3724383818677538265@excalamus.com> In-Reply-To: <87fs0im5lu.fsf@localhost> References: <18be39f70c0.11af741683423289.2491735561665013905@excalamus.com> <87fs0im5lu.fsf@localhost> Subject: Re: [BUG] ob-shell: :shebang changes interpretation of :cmdline MIME-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 7bit Importance: Medium User-Agent: Zoho Mail X-Mailer: Zoho Mail Received-SPF: pass client-ip=136.143.188.18; envelope-from=matt@excalamus.com; helo=sender4-op-o18.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_MSPIKE_H5=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 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 X-Migadu-Scanner: mx11.migadu.com X-Migadu-Spam-Score: -7.83 X-Spam-Score: -7.83 X-Migadu-Queue-Id: 5D2D4174A8 X-TUID: SXwN3IlKGqev ---- On Mon, 04 Dec 2023 14:55:58 +0100 Ihor Radchenko wrote --- > Matt matt@excalamus.com> writes: > > > > #+begin_src bash :cmdline 1 2 3 > > > printf "%s\n" "$1" > > > #+end_src > > > > > > #+RESULTS: > > > : 1 > > > > > > #+begin_src bash :cmdline 1 2 3 :shebang #!/bin/bash > > > printf "%s\n" "$1" > > > #+end_src > > > > > > #+RESULTS: > > > : 1 2 3 > > > > Thank you! This makes a good test case. > > I am confused. Isn't it a bug? Yes, it's a bug. And the test was wrong. Here is a corrected version. When the bug is fixed, the following should pass. It currently fails because the first block returns 1 and the second block returns 1 2 3 (as seen in the quote). Both blocks should return 1. (ert-deftest test-cmdline-alone-and-with-shebang-have-same-result () "Pass arguments to a block. Don't use shebang. Then use shebang set to the same language as the block. The result should be the same." (should (equal (org-test-with-temp-text "#+begin_src bash :cmdline 1 2 3 echo \"$1\" #+end_src" (org-babel-execute-src-block)) (org-test-with-temp-text "#+begin_src bash :cmdline 1 2 3 :shebang #!/bin/bash echo \"$1\" #+end_src" (org-babel-execute-src-block)))))