From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp2.migadu.com ([2001:41d0:303:e16b::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms8.migadu.com with LMTPS id 2KXNNlCT7mVwygAAe85BDQ:P1 (envelope-from ) for ; Mon, 11 Mar 2024 06:14:57 +0100 Received: from aspmx1.migadu.com ([2001:41d0:303:e16b::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp2.migadu.com with LMTPS id 2KXNNlCT7mVwygAAe85BDQ (envelope-from ) for ; Mon, 11 Mar 2024 06:14:57 +0100 X-Envelope-To: larch@yhetil.org Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=bcc32.com header.s=fm1 header.b=jYnHWmFz; dkim=pass header.d=messagingengine.com header.s=fm1 header.b=lVCnAmtb; 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=bcc32.com ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1710134096; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding:list-id:list-help: list-unsubscribe:list-subscribe:list-post:dkim-signature; bh=f9T/6KCB1dcLFw8QAT6aJbg6l3jw5geodBvH3Lduy1M=; b=ipHfHxwGChE4kYo+M3l3ASTv3WWLRdSGFWJUj4vMXV0pwq24Znr0o5bBaUX8gRfcTb8tD3 w7jPzfdF+NmxHLGvx8S4oD1pdLPwnMvfu4mMmGXqcfqacXDoS0RVDe/VsqFX6gpvWL+tUb jlh6/pOTMrbVKHtxRItpPq1j+vaxGGjlO5Os6Kb9ZbJB45ICMHrnTObxxvlz98rlQ3hmGv Gh5M8aR578G1P5+Tl3z1xZUPRcPWdOVUWayuCXJyR3e7ZRdl+6+jMnlmN/5kJ/2G3YWlwz zZ0BUvuYB0VP74EOLYiok/CUJUw5lJIodLC35BEi3KEMW36tn2NuIoyQq2H0tA== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=pass header.d=bcc32.com header.s=fm1 header.b=jYnHWmFz; dkim=pass header.d=messagingengine.com header.s=fm1 header.b=lVCnAmtb; 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=bcc32.com ARC-Seal: i=1; s=key1; d=yhetil.org; t=1710134096; a=rsa-sha256; cv=none; b=h4ZHtCne4+VBGWn6GhJA8wNcGuXJUADd8XoHEV5zVZ/aAsn3ctnmv3s6ZzVedPqPG6EHa8 oMSuGIgwrYHeUpZkqm6yfc0wbzMwk0Pq3EtCAKgh+tEzbN8rC6grLLPL60GqomBu5EYnWS 92I2KrerVbCk94rd+Iwseq2pcYxInJbjdOLp9CCCdrWfAuhs2i9PACtFIccUJCdsCTYKBI Blf2IuDmGqVrxVzlaaR+q6NV9+C02e835JLbccqQBL+1R+dM9SyAaE18kLHoaXAvQ1M3Fe atBTfnvNjLujxQV6MDVJFlgbnovbMoDLPuhn5C9Gvbo/rHmXEe2EZlaIh/shPQ== 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 EB995130EC for ; Mon, 11 Mar 2024 06:14:55 +0100 (CET) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1rjXyx-0003yu-13; Mon, 11 Mar 2024 01:13:51 -0400 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 1rjXyr-0003yZ-7r for emacs-orgmode@gnu.org; Mon, 11 Mar 2024 01:13:46 -0400 Received: from fout7-smtp.messagingengine.com ([103.168.172.150]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1rjXyo-0004uS-Gz for emacs-orgmode@gnu.org; Mon, 11 Mar 2024 01:13:44 -0400 Received: from compute7.internal (compute7.nyi.internal [10.202.2.48]) by mailfout.nyi.internal (Postfix) with ESMTP id 94F661380093; Mon, 11 Mar 2024 01:13:38 -0400 (EDT) Received: from mailfrontend2 ([10.202.2.163]) by compute7.internal (MEProxy); Mon, 11 Mar 2024 01:13:38 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bcc32.com; h=cc :cc:content-transfer-encoding:content-type:date:date:from:from :in-reply-to:message-id:mime-version:reply-to:subject:subject:to :to; s=fm1; t=1710134018; x=1710220418; bh=f9T/6KCB1dcLFw8QAT6aJ bg6l3jw5geodBvH3Lduy1M=; b=jYnHWmFzz3yk3qj1z71j1/rs+Rb4wp7F1cuJo JFIrRGD940nRcECC+As1oQcBA5oCTgwJ5ki8m83GgN+DBDxxsndhnnMxorFDoXrw kDMvUbgbSMgmygpGQPJEr1YwWnC7ppyPABVLiOw5g5Lvs0VJtpVMLWKTgu4E7yQS 6EoXzSfqxH87uOPHBgLCd+TTaXZf7zHWwX2VuUxfvW6J2jKpQ7ZEFtUDzU6dAc86 KVx24KYOPmPkBOGmGeXhigr5DVP2wG29KmR9xl4lONxlm6rkUieZl4/AbDnWEaR2 m016GEXvSQFQJmmtwvosjdXib3JoCMu8P/846ZhGT+yH/n9MA== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-transfer-encoding :content-type:date:date:feedback-id:feedback-id:from:from :in-reply-to:message-id:mime-version:reply-to:subject:subject:to :to:x-me-proxy:x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s= fm1; t=1710134018; x=1710220418; bh=f9T/6KCB1dcLFw8QAT6aJbg6l3jw 5geodBvH3Lduy1M=; b=lVCnAmtb+yLrSXax/+BuSM5t1DZ1pF/OZodbM7k++IJ4 Mr1KLUI0fV0CvMSZaMnWM3O1MsBnR0NXBjLgtGTMUHQLghujk20YpgiJJPWiB7k5 OyFR2L3MoIpe3k/4+yqRWcIDUQfj39IVuy72I1w1OBDZxdvKLtZV1aNb117j/fWI 0K4ueYE4tN5GPRvF4exc2tw0NNTMrz/rMLuQrxC5A8sjc6ty9CJQ6DSif8uLl9Ea ytjSRgdaasUaJiBrZE+7rkDsxmz6oWtY/D8gH0I0gMTAkHI5FCT4tJnSg+ZQiEaa +RxvtgxL+V2F07Fj5dj9iskPMq7cgpaBQhdobkcBFA== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvledrjedtgdekudcutefuodetggdotefrodftvf curfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfghnecu uegrihhlohhuthemuceftddtnecunecujfgurhephffvvefufffkofgggfestdekredtre dttdenucfhrhhomhepfdetrghrohhnucfnrdcukggvnhhgfdcuoehmvgessggttgefvddr tghomheqnecuggftrfgrthhtvghrnhepheefhfffheefudfhkeeivdekjeehvdehvdfhvd ekjefgkefgffeitdfhudegvdfgnecuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghm pehmrghilhhfrhhomhepmhgvsegstggtfedvrdgtohhm X-ME-Proxy: Feedback-ID: i80f14645:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Mon, 11 Mar 2024 01:13:38 -0400 (EDT) From: "Aaron L. Zeng" To: emacs-orgmode@gnu.org Cc: "Aaron L. Zeng" Subject: [PATCH] lisp/ob-shell.el: Also override explicit-shell-file-name Date: Mon, 11 Mar 2024 01:12:47 -0400 Message-ID: <20240311051313.3490020-1-me@bcc32.com> X-Mailer: git-send-email 2.42.0 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Received-SPF: pass client-ip=103.168.172.150; envelope-from=me@bcc32.com; helo=fout7-smtp.messagingengine.com X-Spam_score_int: -27 X-Spam_score: -2.8 X-Spam_bar: -- X-Spam_report: (-2.8 / 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_LOW=-0.7, 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-Flow: FLOW_IN X-Migadu-Country: US X-Migadu-Spam-Score: -8.35 X-Spam-Score: -8.35 X-Migadu-Queue-Id: EB995130EC X-Migadu-Scanner: mx13.migadu.com X-TUID: Qms++0AhbrNU * lisp/ob-shell.el (org-babel-shell-initialize): Override explicit-shell-file-name in addition to shell-file-name. When a session with shell source blocks, execution calls `shell', which checks `explicit-shell-file-name' variable before `shell-file-name', to determine what shell to run. If the user has customized this variable to affect the behavior of M-x shell, `org-babel-shell-initialize' should still run the shell specified by the org source block's language name. TINYCHANGE --- lisp/ob-shell.el | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lisp/ob-shell.el b/lisp/ob-shell.el index 551c3785d..35d9e9376 100644 --- a/lisp/ob-shell.el +++ b/lisp/ob-shell.el @@ -81,7 +81,8 @@ is modified outside the Customize interface." (lambda (body params) (:documentation (format "Execute a block of %s commands with Babel." name)) - (let ((shell-file-name name)) + (let ((explicit-shell-file-name name) + (shell-file-name name)) (org-babel-execute:shell body params)))) (put fname 'definition-name 'org-babel-shell-initialize)) (defalias (intern (concat "org-babel-variable-assignments:" name)) -- 2.42.0