From mboxrd@z Thu Jan 1 00:00:00 1970 From: Nicolas Goaziou Subject: Re: [PATCH] add :session support for ob-js.el Date: Sat, 17 Mar 2018 12:14:26 +0100 Message-ID: <87a7v7dkdp.fsf@nicolasgoaziou.fr> References: <4f31b760-06ac-5c32-8dbd-76f1017d3cd1@gmail.com> <87efko8iwr.fsf@nicolasgoaziou.fr> <307cac72-36e9-0ba6-262b-a12f291953a0@gmail.com> Mime-Version: 1.0 Content-Type: text/plain Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:46011) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ex9nG-0001Ci-Pl for emacs-orgmode@gnu.org; Sat, 17 Mar 2018 07:14:35 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ex9nB-0005Zo-Oc for emacs-orgmode@gnu.org; Sat, 17 Mar 2018 07:14:34 -0400 Received: from relay0.mail.gandi.net ([217.70.178.220]:57559 helo=relay0-d.mail.gandi.net) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1ex9nB-0005YD-Hb for emacs-orgmode@gnu.org; Sat, 17 Mar 2018 07:14:29 -0400 In-Reply-To: <307cac72-36e9-0ba6-262b-a12f291953a0@gmail.com> (stardiviner's message of "Tue, 13 Mar 2018 19:51:38 +0800") List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Sender: "Emacs-orgmode" To: stardiviner Cc: org-mode Hello, stardiviner writes: > updated my code. I followed your suggestions. But modify code one by > one messed code up. So I merge all related commits into one commit. > Sorry for this. Some comments follow. > + (result (if (not (string= (cdr (assq :session params)) "none")) You can integrate the test above in the `cond': (cond ((string= "none" (cdr (assq :session params))) nil) ((string= "*JS REPL*" session) ...) ...) > + (sit-for .5) (goto-char (point-max)) (sit-for .5) (goto-char (point-max)) > + (mapc (lambda (var) > + (insert var) (comint-send-input nil t) > + (org-babel-comint-wait-for-output session) > + (sit-for .1) (goto-char (point-max))) var-lines))) > session)) (dolist (var ...) ...) Also, what's your status wrt FSF papers? This cannot fit as a TINYCHANGE. Regard, -- Nicolas Goaziou