Ah, sorry, I didn't think to check when it was added! describe-function sez: Probably introduced at or before Emacs version 28.1.
I am happy to modify the patch this weekend.
Thanks for this change.
Unfortunately my emacs doesn't have this function. It looks like it must
have been added after 27? I don't think we're ready to drop support for
27 quite yet.
I believe `split-string-shell-command` was added somewhere in 28.1. But
we can support both variants, by checking whether it's available by
`fboundp` and it will work for both old and new versions.
--
Andrey Listopadov
-Phil
#+begin_src emacs-lisp
(setq fennel-program "nix-shell /home/rrix/Code/koreader-to-org/shell.nix --run \"fennel --repl\"")
(fennel-repl nil)
#+end_src
https://nixos.wiki/wiki/Development_environment_with_nix-shell
Without this patch the final two arguments to make-comint are "fennel" "--repl" rather than a single argument the shell provides and nix-shell expects.
---
fennel-mode.el | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/fennel-mode.el b/fennel-mode.el
index f0abc15..fcb8843 100644
--- a/fennel-mode.el+++ b/fennel-mode.el
@@ -186,7 +186,7 @@ the prompt."
(if (not (comint-check-proc fennel-repl--buffer))
(let* ((cmd (or (and ask-for-command? (read-from-minibuffer "Command: "))
fennel-program))
- (cmdlist (split-string cmd)))+ (cmdlist (split-string-shell-command cmd))) (set-buffer (apply #'make-comint "Fennel REPL" (car cmdlist) nil (cdr cmdlist)))
(fennel-repl-mode)
(setq-local fennel-program cmd)
--
2.36.1