emacs-elpa-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[elpa] externals/org 0e2a9524dc: lisp/ob-shell.el: Initialize explicit-s


From: ELPA Syncer
Subject: [elpa] externals/org 0e2a9524dc: lisp/ob-shell.el: Initialize explicit-shell-file-name
Date: Fri, 15 Mar 2024 18:58:25 -0400 (EDT)

branch: externals/org
commit 0e2a9524dc6da8b4d60672e85aba74076baac211
Author: Matthew Trzcinski <matt@excalamus.com>
Commit: Matthew Trzcinski <matt@excalamus.com>

    lisp/ob-shell.el: Initialize explicit-shell-file-name
    
    * lisp/ob-shell.el (org-babel-shell-initialize): force blocks to
    always use the specified shell language
    
    Sessions are initialized using `shell'.  The `shell' command checks
    `explicit-shell-file-name' for file to use before checking other
    variables, like `shell-file-name'.  Previously, only `shell-file-name'
    was set.  So, if the user had set the `explicit-shell-file-name',
    session blocks would use that whereas non-session blocks would use
    `shell-file-name', resulting in inconsistent behavior.  This change
    sets both variables so that even if the user changes the
    `explicit-shell-file-name' or `shell-file-name', blocks will only use
    the shell language specified by the block.
    
    Submitted by: "Aaron L. Zeng" me@bcc32.com
    
    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 551c3785d8..35d9e93761 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))



reply via email to

[Prev in Thread] Current Thread [Next in Thread]