all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Jakub Jankiewicz <jcubic@onet.pl>
To: emacs-devel@gnu.org
Subject: Scheme Interpreter in Emacs and Readline
Date: Sat, 18 Apr 2020 12:51:13 +0200	[thread overview]
Message-ID: <20200418125113.014121d2@jcubic> (raw)

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



             reply	other threads:[~2020-04-18 10:51 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-04-18 10:51 Jakub Jankiewicz [this message]
     [not found] ` <87imhx6ocz.fsf@yahoo.com>
2020-04-18 12:29   ` Scheme Interpreter in Emacs and Readline Jakub Jankiewicz
2020-04-19  0:02     ` Po Lu
2020-04-19  7:14       ` Jakub Jankiewicz

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20200418125113.014121d2@jcubic \
    --to=jcubic@onet.pl \
    --cc=emacs-devel@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.