Drop BabelRunner's unreachable Emacs-not-installed message !434
1 file changed, +2 −2
Layout: unified · split
Sources/OrgPrograms/BabelRunner.swift +2 −2
| @@ -76,10 +76,10 @@ public enum BabelRunner { | |||
| 76 | // In the shell, as Org runs it, so `:cmd "node --no-warnings"` or `~/bin/node` works. | 76 | // In the shell, as Org runs it, so `:cmd "node --no-warnings"` or `~/bin/node` works. |
| 77 | process.arguments = ["/bin/sh", "-c", executable + " \"$@\"", "sh"] + arguments | 77 | process.arguments = ["/bin/sh", "-c", executable + " \"$@\"", "sh"] + arguments |
| 78 | case .emacs: | 78 | case .emacs: |
| 79 | guard let emacs = EmacsRunner.executable() else { throw Failure(description: "Emacs isn't installed, so Emacs Lisp blocks can't run.") } | 79 | // `Programs` runs these natively when Emacs is missing. |
| 80 | let script = folder.appendingPathComponent("babel.el") | 80 | let script = folder.appendingPathComponent("babel.el") |
| 81 | try input.write(to: script, atomically: true, encoding: .utf8) | 81 | try input.write(to: script, atomically: true, encoding: .utf8) |
| 82 | process.arguments = [emacs.path, "-Q", "--batch", "-l", script.path] | 82 | process.arguments = [EmacsRunner.executable()?.path ?? "emacs", "-Q", "--batch", "-l", script.path] |
| 83 | case .session: | 83 | case .session: |
| 84 | return BabelOutput(stdout: "") | 84 | return BabelOutput(stdout: "") |
| 85 | } | 85 | } |