branch: externals/org
commit e21061be80a8caae29f2843ed019d8f018f949c2
Author: Ihor Radchenko <[email protected]>
Commit: Ihor Radchenko <[email protected]>

    org-babel--get-shell-file-name: Remove workaround for Emacs <28
    
    * lisp/ob-eval.el (org-babel--get-shell-file-name): Use
    'executable-find' with optional argument introduced in Emacs 28.  We
    are no longer supporting Emacs 27.
---
 lisp/ob-eval.el | 11 ++---------
 1 file changed, 2 insertions(+), 9 deletions(-)

diff --git a/lisp/ob-eval.el b/lisp/ob-eval.el
index 1f40aa91b9..b7b79a5016 100644
--- a/lisp/ob-eval.el
+++ b/lisp/ob-eval.el
@@ -161,15 +161,8 @@ This buffer is named by `org-babel-error-buffer-name'."
   "Return system `shell-file-name', defaulting to /bin/sh.
 Unfortunately, `executable-find' does not support file name
 handlers.  Therefore, we could use it in the local case only."
-  ;; FIXME: Since Emacs 27, `executable-find' accepts optional second
-  ;; argument supporting remote hosts.
-  (cond ((and (not (file-remote-p default-directory))
-             (executable-find shell-file-name))
-        shell-file-name)
-       ((file-executable-p
-         (concat (file-remote-p default-directory) shell-file-name))
-        shell-file-name)
-       ("/bin/sh")))
+  (if (executable-find shell-file-name 'respect-remote)
+      shell-file-name "/bin/sh"))
 
 (provide 'ob-eval)
 

Reply via email to