[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[O] [PATCH] fix org-babel-js-initiate-session required second optional a
From: |
stardiviner |
Subject: |
[O] [PATCH] fix org-babel-js-initiate-session required second optional argument |
Date: |
Sun, 01 Apr 2018 17:42:07 +0800 |
User-agent: |
mu4e 1.0; emacs 27.0.50 |
From e6e11810c793aaaca0c491c263447fcad39b2eb0 Mon Sep 17 00:00:00 2001
From: stardiviner <address@hidden>
Date: Sun, 1 Apr 2018 17:25:19 +0800
Subject: [PATCH 1/2] * ob-js.el (org-babel-js-initiate-session) add required
optional second arg.
---
lisp/ob-js.el | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/lisp/ob-js.el b/lisp/ob-js.el
index f18aa9da6..69be1b8a4 100644
--- a/lisp/ob-js.el
+++ b/lisp/ob-js.el
@@ -156,8 +156,8 @@ specifying a variable of the same value."
(car pair) (org-babel-js-var-to-js (cdr pair))))
(org-babel--get-vars params)))
-(defun org-babel-js-initiate-session (&optional session)
- "If there is not a current inferior-process-buffer in SESSION
+(defun org-babel-js-initiate-session (&optional session _params)
+ "If there is not a current inferior-process-buffer in `SESSION'
then create. Return the initialized session."
(cond
((string= session "none")
--
2.16.3
From e03755e41e55c47f1132c530e37f35c340262b99 Mon Sep 17 00:00:00 2001
From: stardiviner <address@hidden>
Date: Sun, 1 Apr 2018 17:26:05 +0800
Subject: [PATCH 2/2] * ob-js.el (org-babel-js-initiate-session) skewer-mode
session initiate REPL.
---
lisp/ob-js.el | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/lisp/ob-js.el b/lisp/ob-js.el
index 69be1b8a4..1da29969a 100644
--- a/lisp/ob-js.el
+++ b/lisp/ob-js.el
@@ -43,6 +43,7 @@
(declare-function run-mozilla "ext:moz" (arg))
(declare-function httpd-start "simple-httpd" ())
(declare-function run-skewer "skewer-mode" ())
+(declare-function skewer-repl "skewer-repl" ())
(declare-function indium-run-node "indium-nodejs" (command))
(declare-function indium-eval "indium-interaction" (string &optional callback))
@@ -165,12 +166,14 @@ then create. Return the initialized session."
((string= "*skewer-repl*" session)
(require 'skewer-repl)
(let ((session-buffer (get-buffer "*skewer-repl*")))
- (if (and (org-babel-comint-buffer-livep (get-buffer session-buffer))
+ (if (and session-buffer
+ (org-babel-comint-buffer-livep (get-buffer session-buffer))
(comint-check-proc session-buffer))
session-buffer
;; start skewer REPL.
(httpd-start)
(run-skewer)
+ (skewer-repl)
session-buffer)))
((string= "*Javascript REPL*" session)
(require 'js-comint)
--
2.16.3
signature.asc
Description: PGP signature
- [O] [PATCH] fix org-babel-js-initiate-session required second optional argument,
stardiviner <=