From: stardiviner <numbchild@gmail.com>
To: org-mode <emacs-orgmode@gnu.org>
Subject: [PATCH] fix org-babel-js-initiate-session required second optional argument
Date: Sun, 01 Apr 2018 17:42:07 +0800 [thread overview]
Message-ID: <87woxrclg0.fsf@gmail.com> (raw)
[-- 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 --]
next reply other threads:[~2018-04-01 9:42 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-04-01 9:42 stardiviner [this message]
2018-04-02 18:44 ` [PATCH] fix org-babel-js-initiate-session required second optional argument Nicolas Goaziou
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87woxrclg0.fsf@gmail.com \
--to=numbchild@gmail.com \
--cc=emacs-orgmode@gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.