From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: "Jakub T. Jankiewicz" Newsgroups: gmane.emacs.devel Subject: Re: How to make custom REPL work in ansi-term? Date: Mon, 8 Jan 2024 21:00:29 +0100 Message-ID: <20240108210029.57f2c991@jcubic> References: <20240108161602.0ae166ce@jcubic> Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="33854"; mail-complaints-to="usenet@ciao.gmane.io" Cc: Emacs developers To: Eduardo Ochs Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Tue Jan 09 04:23:07 2024 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 1rN2hm-0008ar-NZ for ged-emacs-devel@m.gmane-mx.org; Tue, 09 Jan 2024 04:23:06 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1rN2h7-0005bn-P2; Mon, 08 Jan 2024 22:22:25 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1rMvne-0003qb-B8 for emacs-devel@gnu.org; Mon, 08 Jan 2024 15:00:42 -0500 Original-Received: from u1.atthost.pl ([185.255.40.21]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1rMvna-0003qD-Sn for emacs-devel@gnu.org; Mon, 08 Jan 2024 15:00:41 -0500 Original-Received: from localhost (unknown [127.0.0.1]) by u1.atthost.pl (Postfix) with ESMTP id 6ED3712090B; Mon, 8 Jan 2024 20:00:33 +0000 (UTC) X-Virus-Scanned: amavisd-new at atthost.pl Original-Received: from u1.atthost.pl ([185.255.40.21]) by localhost (atthost.pl [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id n-NlISIhdqFb; Mon, 8 Jan 2024 21:00:30 +0100 (CET) Original-Received: from jcubic (unknown [178.218.193.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) (Authenticated sender: jcubic@jcubic.pl) by u1.atthost.pl (Postfix) with ESMTPSA id 751E0123335; Mon, 8 Jan 2024 21:00:30 +0100 (CET) DKIM-Filter: OpenDKIM Filter v2.11.0 u1.atthost.pl 751E0123335 In-Reply-To: X-Mailer: Claws Mail 4.2.0 (GTK 3.24.39; x86_64-redhat-linux-gnu) Received-SPF: pass client-ip=185.255.40.21; envelope-from=SRS0=vuOC=IS=jcubic.pl=jcubic@attmail.pl; helo=u1.atthost.pl X-Spam_score_int: 17 X-Spam_score: 1.7 X-Spam_bar: + X-Spam_report: (1.7 / 5.0 requ) BAYES_00=-1.9, HEADER_FROM_DIFFERENT_DOMAINS=0.248, RCVD_IN_SBL_CSS=3.335, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=no autolearn_force=no X-Spam_action: no action X-Mailman-Approved-At: Mon, 08 Jan 2024 22:22:23 -0500 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.29 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-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.devel:314767 Archived-At: No it doesn't work in vterm. I got the same error + backspace don't remove the text. Recently I've found that in fact backspace in Terminal only move the cursor backwards and to clear the text you need to insert space. It seems that this is what vterm is doing. I made the same mistake with my ansi code interpreter. On Mon, 8 Jan 2024 15:30:13 -0300 Eduardo Ochs wrote: > Hi Jakub, > can you check if your REPL works in vterm and in eat? I use REPLs in Emacs > a lot - see: > http://anggtwu.net/eepitch.html > and there are a few programs that don't run well in ansi-term but that do > in vterm... > Cheers, > Eduardo Ochs > > > On Mon, 8 Jan 2024, 14:18 Jakub T. Jankiewicz, wrote: > > > Hi, > > > > I was asking similar question long ago, I'm not able to find replies on my > > mailbox but found a reference on question on Stack Overflow: > > > > https://stackoverflow.com/a/61300784/387194 > > > > The problem is that my REPL written in NodeJS doesn't work in Emacs > > ansi-term, you can use arrow keys for navigation and history. > > > > The same happen with native nodeJS command line. When moving cursor it add > > escape sequences to the input. NodeJS doesn't use readline library only > > it's > > own implementation written in JavaScript that's probbaly not 100% > > compatible > > with real readline. > > > > Is there something that NodeJS can do to fix the issue. Or maybe you can > > give > > me a pointers on what to search for in other to fix the issue. I may look > > into > > the source code and fix the issue. > > > > -- > > Jakub T. Jankiewicz, Senior Front-End Developer > > https://jcubic.pl/me > > https://koduj.org > > > > -- Jakub T. Jankiewicz, Senior Front-End Developer https://jcubic.pl/me https://koduj.org