all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* Scheme Interpreter in Emacs and Readline
@ 2020-04-18 10:51 Jakub Jankiewicz
       [not found] ` <87imhx6ocz.fsf@yahoo.com>
  0 siblings, 1 reply; 4+ messages in thread
From: Jakub Jankiewicz @ 2020-04-18 10:51 UTC (permalink / raw)
  To: emacs-devel

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



^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2020-04-19  7:14 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-04-18 10:51 Scheme Interpreter in Emacs and Readline Jakub Jankiewicz
     [not found] ` <87imhx6ocz.fsf@yahoo.com>
2020-04-18 12:29   ` Jakub Jankiewicz
2020-04-19  0:02     ` Po Lu
2020-04-19  7:14       ` Jakub Jankiewicz

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.