emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Matt <matt@excalamus.com>
To: "Aaron L. Zeng" <me@bcc32.com>
Cc: "emacs-orgmode" <emacs-orgmode@gnu.org>
Subject: Re: [PATCH] lisp/ob-shell.el: Also override explicit-shell-file-name
Date: Mon, 11 Mar 2024 20:16:43 +0100	[thread overview]
Message-ID: <18e2ef220a9.b5a8c7ae44361.2739966878741459645@excalamus.com> (raw)
In-Reply-To: <20240311051313.3490020-1-me@bcc32.com>


 ---- 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




  reply	other threads:[~2024-03-11 19:23 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-03-11  5:12 [PATCH] lisp/ob-shell.el: Also override explicit-shell-file-name Aaron L. Zeng
2024-03-11 19:16 ` Matt [this message]
2024-03-12 13:29   ` Ihor Radchenko
2024-03-15 21:38     ` Matt
2024-03-15 22:08       ` Aaron Zeng
2024-03-16 10:11       ` Ihor Radchenko
2024-03-17  9:06         ` How to properly attribute authorship with Git (was Re: [PATCH] lisp/ob-shell.el: Also override explicit-shell-file-name) Matt
2024-03-17 10:31           ` Ihor Radchenko
2024-03-17 13:42             ` Matt
2024-03-17 14:38               ` Ihor Radchenko
2024-03-17 16:26               ` Max Nikulin
2024-03-17 17:32                 ` Matt

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.orgmode.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=18e2ef220a9.b5a8c7ae44361.2739966878741459645@excalamus.com \
    --to=matt@excalamus.com \
    --cc=emacs-orgmode@gnu.org \
    --cc=me@bcc32.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).