[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH] lisp/ob-shell.el: Also override explicit-shell-file-name
From: |
Matt |
Subject: |
Re: [PATCH] lisp/ob-shell.el: Also override explicit-shell-file-name |
Date: |
Mon, 11 Mar 2024 20:16:43 +0100 |
User-agent: |
Zoho Mail |
---- On Mon, 11 Mar 2024 06:12:47 +0100 Aaron L. Zeng wrote ---
> * 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
Thank you for your report and the patch.
--
Matt Trzcinski
Emacs Org contributor (ob-shell)
Learn more about Org mode at https://orgmode.org
Support Org development at https://liberapay.com/org-mode
- [PATCH] lisp/ob-shell.el: Also override explicit-shell-file-name, Aaron L. Zeng, 2024/03/11
- Re: [PATCH] lisp/ob-shell.el: Also override explicit-shell-file-name,
Matt <=
- Re: [PATCH] lisp/ob-shell.el: Also override explicit-shell-file-name, Ihor Radchenko, 2024/03/12
- Re: [PATCH] lisp/ob-shell.el: Also override explicit-shell-file-name, Matt, 2024/03/15
- Re: [PATCH] lisp/ob-shell.el: Also override explicit-shell-file-name, Aaron Zeng, 2024/03/15
- Re: [PATCH] lisp/ob-shell.el: Also override explicit-shell-file-name, Ihor Radchenko, 2024/03/16
- How to properly attribute authorship with Git (was Re: [PATCH] lisp/ob-shell.el: Also override explicit-shell-file-name), Matt, 2024/03/17
- Re: How to properly attribute authorship with Git (was Re: [PATCH] lisp/ob-shell.el: Also override explicit-shell-file-name), Ihor Radchenko, 2024/03/17
- Re: How to properly attribute authorship with Git (was Re: [PATCH] lisp/ob-shell.el: Also override explicit-shell-file-name), Matt, 2024/03/17
- Re: How to properly attribute authorship with Git (was Re: [PATCH] lisp/ob-shell.el: Also override explicit-shell-file-name), Ihor Radchenko, 2024/03/17
- Re: How to properly attribute authorship with Git (was Re: [PATCH] lisp/ob-shell.el: Also override explicit-shell-file-name), Max Nikulin, 2024/03/17
- Re: How to properly attribute authorship with Git (was Re: [PATCH] lisp/ob-shell.el: Also override explicit-shell-file-name), Matt, 2024/03/17