emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* [PATCH] fix org-babel-js-initiate-session required second optional argument
@ 2018-04-01  9:42 stardiviner
  2018-04-02 18:44 ` Nicolas Goaziou
  0 siblings, 1 reply; 2+ messages in thread
From: stardiviner @ 2018-04-01  9:42 UTC (permalink / raw)
  To: org-mode


[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1.1: 0001-ob-js.el-org-babel-js-initiate-session-add-required-.patch --]
[-- Type: text/x-patch, Size: 980 bytes --]

From e6e11810c793aaaca0c491c263447fcad39b2eb0 Mon Sep 17 00:00:00 2001
From: stardiviner <numbchild@gmail.com>
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


[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1.2: 0002-ob-js.el-org-babel-js-initiate-session-skewer-mode-s.patch --]
[-- Type: text/x-patch, Size: 1449 bytes --]

From e03755e41e55c47f1132c530e37f35c340262b99 Mon Sep 17 00:00:00 2001
From: stardiviner <numbchild@gmail.com>
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


[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 487 bytes --]

^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] fix org-babel-js-initiate-session required second optional argument
  2018-04-01  9:42 [PATCH] fix org-babel-js-initiate-session required second optional argument stardiviner
@ 2018-04-02 18:44 ` Nicolas Goaziou
  0 siblings, 0 replies; 2+ messages in thread
From: Nicolas Goaziou @ 2018-04-02 18:44 UTC (permalink / raw)
  To: stardiviner; +Cc: org-mode

Hello,

stardiviner <numbchild@gmail.com> writes:

> From e6e11810c793aaaca0c491c263447fcad39b2eb0 Mon Sep 17 00:00:00 2001
> From: stardiviner <numbchild@gmail.com>
> 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.

Applied. Thank you.

Regards,

-- 
Nicolas Goaziou

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2018-04-02 19:04 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-04-01  9:42 [PATCH] fix org-babel-js-initiate-session required second optional argument stardiviner
2018-04-02 18:44 ` Nicolas Goaziou

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).