From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.ciao.gmane.io!not-for-mail From: Po Lu Newsgroups: gmane.emacs.devel Subject: Re: Scheme Interpreter in Emacs and Readline Date: Sun, 19 Apr 2020 08:02:02 +0800 Message-ID: <873690737p.fsf@yahoo.com> References: <20200418125113.014121d2@jcubic> <87imhx6ocz.fsf@yahoo.com> <20200418142918.7f5032b4@jcubic> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="ciao.gmane.io:159.69.161.202"; logging-data="18913"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux) Cc: emacs-devel@gnu.org To: Jakub Jankiewicz Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Sun Apr 19 02:03:02 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 1jPxQM-0004og-5Z for ged-emacs-devel@m.gmane-mx.org; Sun, 19 Apr 2020 02:03:02 +0200 Original-Received: from localhost ([::1]:34702 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jPxQL-00059p-2z for ged-emacs-devel@m.gmane-mx.org; Sat, 18 Apr 2020 20:03:01 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:50428) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jPxPY-0004bs-Md for emacs-devel@gnu.org; Sat, 18 Apr 2020 20:02:13 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.90_1) (envelope-from ) id 1jPxPW-0007ts-OU for emacs-devel@gnu.org; Sat, 18 Apr 2020 20:02:12 -0400 Original-Received: from sonic301-30.consmr.mail.ne1.yahoo.com ([66.163.184.199]:43285) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1jPxPV-0007sH-OE for emacs-devel@gnu.org; Sat, 18 Apr 2020 20:02:10 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s2048; t=1587254527; bh=wP6l4PofL52K+AkPknXCmxJzpxYEB5I9GsO9YC2awhY=; h=From:To:Cc:Subject:References:Date:In-Reply-To:From:Subject; b=a7tdMtU06jwDzZkGL2IvCivXpyYwd51E57LdiluTfR5dS4BPmGrUc6NoVG5jpWH7IUn/LvQ/Jtg3L3K5Zi1iLwu6dIN2gSkL5zVp5KIpxcjdQC54xXmATJj/5yJNzjrGGMdkRyjmkA2m/4g4iSM6nZhVh4jxqtS5dxJQRPrjVuQj/k/ZkiUyUEpVKnpHwYvIGFR/oox2nbwLdfzZCyfyBmWNZE5z1gxrUZsY6BtnhXUxV+JMuhnyToMYHSIooXiVn6CvSTiQKdSzevS4FbxxKvoaOJ+XRNg/FflGgszxfqb+EJu0AdCdbEQ5EJmqDF1q2HmslQ3pMJADLm0opyw53w== X-YMail-OSG: 8TyT3ncVM1kELkd_KjmSXH0SR_LUxvkooGs5pq5jwXfQKIU5f_lOj.rtepMOBlj 5eEG.fvJ_uvFcCz4qqEUmMFiaDSmsRKsmlio5vVpeszY6g7N0VTfYaI_DWd0Xp9xoj4dseXuCNUh M6g2oDt4CNy2GtoWkOi9aL.2k1YzaBd.YSFve4_7WungK_i6xUCk46KOt_JuUZXVoANCHQ.NkS4o CoFrNvhdby7UjicPO9KYUCTG.RVRVJDPCp61dgP.muyjh5pnWl_foEDo.xmQU0OqJzK1ntdZgrtV XHUuXp9ZX7BVZf3EmIFgDUSFHZ7nh5bomoBc8NyalHztXanyDYarHUFUMOZDGKNOnoi4zHAXkNuT QohGXyPvUpdEBxCc53c3P4ZURoj9LXJ_YQarOcvEs3eWFRIwj8ThfbNvNqgdT01OQzmL5x3CnoEo _EXLlX0zKw.sOWHsmdxZq.8.JKMl.uN2pvcujk8aOucUhtCsEPLYR1fpv.dXvm.rXxMlLwgkXMwJ CupdqmLDV0HHxnOyfJRtvOUEICfP94.kq8AAHfhVsseZCyOt06E0a51QbU.CzJhwS7cWrxhwaU2S zR3xQE.E24BDo7uvYSIOpzMrnWkFQm.drtYKaOrIA.FG1sReML7hVqnoKIwZd1SUhUSIyLcNVU9H CS3r1Ss6DU0N8mwL97S.Qc1KS2LL3qoTiN.xqNPrm_QP4OX065obJbiXPMfRIRCKMVR9ibclT7Kd c7BA9FHuugliFn8Fv78927_P.Fv9USgR7dIQcGPWR4AG9vJ_KeJSyqVVpteg1YZPMti1Zhyo1l0Z 4i3hoJO4gagrP5F3r9hvr8iaEFplIj1OimhuxkE49W Original-Received: from sonic.gate.mail.ne1.yahoo.com by sonic301.consmr.mail.ne1.yahoo.com with HTTP; Sun, 19 Apr 2020 00:02:07 +0000 Original-Received: by smtp417.mail.sg3.yahoo.com (VZM Hermes SMTP Server) with ESMTPA ID 4fcfbc0cd8555193058c08bff1d41ba4; Sun, 19 Apr 2020 00:02:05 +0000 (UTC) In-Reply-To: <20200418142918.7f5032b4@jcubic> (Jakub Jankiewicz's message of "Sat, 18 Apr 2020 14:29:18 +0200") X-Mailer: WebService/1.1.15651 hermes Apache-HttpAsyncClient/4.1.4 (Java/11.0.6) Received-SPF: pass client-ip=66.163.184.199; envelope-from=luangruo@yahoo.com; helo=sonic301-30.consmr.mail.ne1.yahoo.com X-detected-operating-system: by eggs.gnu.org: Linux 3.1-3.10 X-Received-From: 66.163.184.199 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:247254 Archived-At: Jakub Jankiewicz writes: >> What do you mean by "when I resize the window or frame it keep adding >> prompt to the prompt line"? > > I have prompt "lips> " and when I resize Emacs window on Fedora GNU/Linux > (the only system I was testing this). on each resize I get new prompt so when > I keep resizing I have something like this: > > lips> lips> lips> lips> lips> > > and they are all prompt because I can't delete it. Unless something wierd is > happening. > >> It would also probbaly be helpful if you could post the source of your >> Scheme interpreter. > > Sorry about that, my Scheme Interpreter is here: > > https://github.com/jcubic/lips/tree/devel > > Please use devel branch since it's most up to date, I still try to make it > compatible with R5RS, before I release new version, it will 1.0. > > The executable is in bin directry (there are not much code, but it would be > easier to have link that you can run insead of send this to the mailing list. > > https://github.com/jcubic/lips/blob/devel/bin/lips.js > > Just run: > > git clone https://github.com/jcubic/lips.git > cd lips > git checkout devel > > and run in GUI Emacs: > > (run-scheme "/lips/bin/lips.js") > > and resize the Frame or buffer's window if you have multiple windows. > > > And I need to add that I was looking at Node.js source code, there is lot of > code but it also use Readline and Node.js works in run-js (I'm not sure if it > use something else for --interactive option that was suggested when I've > search how to run node in Emacs). > > I've tested my interpeter with same run-js and I have same issue with > duplicated prompt. > > -- > Jakub Jankiewicz, Web Developer > https://jcubic.pl/me I'm not sure about run-js, but I turned off Readline in your interpreter, and it now works flawlessly inside comint. Since Readline is pretty much useless anyways there, it might be worth it to turn it off inside Emacs. (ie check the EMACS and INSIDE_EMACS variables, or add something like CMU's `-emacs' flag.) Bash does the same thing too; https://lists.gnu.org/archive/html/bug-bash/2015-03/msg00179.html