help-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Comint mode with REPL in Node.js and Readline


From: Jakub Jankiewicz
Subject: Re: Comint mode with REPL in Node.js and Readline
Date: Thu, 2 Apr 2020 13:41:25 +0200

Forget to mention I use:

GNU Emacs 26.3; Fedora 30

The same happen in emacs -q

On Thu, 2 Apr 2020 13:18:06 +0200
Jakub Jankiewicz <jcubic@onet.pl> wrote:

> Hi,
> 
> I have issue with comint mode:
> 
> I reproduced the issue with simple Node.js code:
> 
> shell.js file:
> 
> #!/usr/bin/env node
> const readline = require('readline');
> 
> var prompt = 'lips> ';
> var continuePrompt = '... ';
> const rl = readline.createInterface({
>     input: process.stdin,
>     output: process.stdout,
>     prompt: prompt,
>     terminal: !!process.stdin.isTTY
> });
> if (process.stdin.isTTY) {
>     rl.prompt();
> }
> 
> rl.on('line', function(line) {
>     if (process.stdin.isTTY) {
>         rl.prompt();
>     }
> });
> 
> If I run this as scheme in GNU Emacs:
> 
> (run-scheme "/path/.../shell.js")
> ;; this is needed otherwise I get duplicated input
> (setq comint-process-echoes t)
> 
> And the issue I have is that when I resize the window I've got duplicated:
> 
> lips> lips> lips> lips>  
> 
> What I did wrong with my REPL in Node.js anybody have idea if I need to
> setup something in Emacs. REPL works fine in terminal emulator and
> ansi-term.
> 
> I've asked the same question on StackOverflow in hope I'll get some answers
> how to fix this:
> 
> https://stackoverflow.com/q/60987722/387194
> 
> I have no idea if it's issue with Node.js Readline or with GNU Emacs comint
> mode.
> 

--
Jakub Jankiewicz, Web Developer
https://jcubic.pl/me



reply via email to

[Prev in Thread] Current Thread [Next in Thread]