From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.ciao.gmane.io!not-for-mail From: Jakub Jankiewicz Newsgroups: gmane.emacs.devel Subject: Scheme Interpreter in Emacs and Readline Date: Sat, 18 Apr 2020 12:51:13 +0200 Message-ID: <20200418125113.014121d2@jcubic> Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Injection-Info: ciao.gmane.io; posting-host="ciao.gmane.io:159.69.161.202"; logging-data="42435"; mail-complaints-to="usenet@ciao.gmane.io" To: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Sat Apr 18 13:02:29 2020 Return-path: Envelope-to: ged-emacs-devel@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1jPlEz-000AxP-TU for ged-emacs-devel@m.gmane-mx.org; Sat, 18 Apr 2020 13:02:29 +0200 Original-Received: from localhost ([::1]:56762 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jPlEy-00051K-V7 for ged-emacs-devel@m.gmane-mx.org; Sat, 18 Apr 2020 07:02:28 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:50345) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jPlE8-0004ab-00 for emacs-devel@gnu.org; Sat, 18 Apr 2020 07:01:37 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1jPlE5-0000ja-Dd for emacs-devel@gnu.org; Sat, 18 Apr 2020 07:01:35 -0400 Original-Received: from smtpo79.poczta.onet.pl ([141.105.16.29]:46761) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1jPlE2-0000Zv-O6 for emacs-devel@gnu.org; Sat, 18 Apr 2020 07:01:31 -0400 Original-Received: from jcubic (unknown [185.129.113.221]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) (Authenticated sender: jcubic@onet.pl) by smtp.poczta.onet.pl (Onet) with ESMTPSA id 4948rz6Ck5z4f6jhs for ; Sat, 18 Apr 2020 12:51:15 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=onet.pl; s=2011; t=1587207076; bh=x2Jb6vn+jL16Qrr1PgfflV0UTjwuT0d2T2wANEUqhw8=; h=Date:From:To:Subject:From; b=lYPMkZgOx12ESep6ZOMrsTxuVHhXqI0pxoOGxEqx5BwuOV0QvsVuTChTOjX0DNJg7 RWeOZClNfjh8gfjwXJJRjWgp1ZNmCV8yDSSveHM77j6AE2qPgkX02HflJdCUWdC2Rb UA11nrp2N37oypdjMTybDQ2G8f30sDzcHGgJJo0Y= X-Mailer: Claws Mail 3.17.3git196 (GTK+ 2.24.32; x86_64-pc-linux-gnu) X-ONET_PL-MDA-SEGREGATION: 0 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 141.105.16.29 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Original-Sender: "Emacs-devel" Xref: news.gmane.io gmane.emacs.devel:247222 Archived-At: I have problem in creating Scheme Interpreter in Node.js that can be run using Emacs run-scheme command. I use Readline library in Node.js and when I resize the window or frame it keep adding prompt to the prompt line. I've asked on StackOverflow and also on emacs mailing list but no one answered. [How to write Node.js REPL that works with GNU Emacs?][1] Is there special thing the interpreter need to be doing, so it work with Comint mode? I have the same if I run with emacs -q. Does Emacs run-scheme work with Readline? Does anyone have issues with this? Is this a bug? I would like to know if there is workaround. Kawa and Guile works fine in GNU Emacs, I was checking Kawa source code and it don't use Readline it use stdin stream and println in Java. I have this code in my .emacs file: (defun lips () "call run-scheme with guile interpreter." (interactive) (run-scheme "/home/kuba/projects/jcubic/lips/bin/lips.js")) and I have also this (autoload 'scheme-mode "cmuscheme" "Major mode for Scheme." t) (autoload 'run-scheme "cmuscheme" "Switch to interactive Scheme buffer." t) ;; this shouldn't change anything since I'm running the function with argument (setq scheme-program-name "/home/kuba/projects/jcubic/lips/bin/lips.js") (add-hook 'scheme-mode-hook 'turn-on-font-lock) ;; there was issue with double echo ;; see my Question on Emacs StackExachange ;; [How to run custom scheme written in node.js using readline in ;; emacs?][2] (setq comint-process-echoes t) (setq comint-input-ignoredups t) (setq comint-prompt-read-only t) (add-hook 'comint-mode-hook (lambda() (setq truncate-lines 1))) [1]: https://stackoverflow.com/q/60987722/387194 [2]: https://emacs.stackexchange.com/q/57521/10438 -- Jakub Jankiewicz, Web Developer https://jcubic.pl/me