johnwalker / pixie-mode

A major mode with magical powers
16 stars 3 forks source link

echoing all repl input? #5

Open joshua-g opened 9 years ago

joshua-g commented 9 years ago

Hey! I'm trying out pixie mode with emacs 24.4.1. I have an issue when I go into the repl: each line of input is immediately echoed. The repl otherwise seems to work fine, but the echoing is distracting and makes multi-line input difficult to re-read, since every line is duplicated. I don't have this problem if I go into M-x inf-clojure from a clj file.

For instance:

user => ((fn f [x]
((fn f [x]
(* x x))
(* x x))
5)
5)
25
johnwalker commented 9 years ago

Eww. If you use the repl without inf-clojure, does it do this? Is there an option to suppress this output?

joshua-g commented 9 years ago

The regular pixie-vm repl works fine -- no echoing. (Like, of course if you enter a form that evaluates to itself, then it "echoes" that, but only because it evaluated it). Within the inf-clojure repl with pixie,

user => 1
1
1
user =>

The first 1 is what i typed, the second is the echo, the third is the evaluation. But within pixie-vm,

user => 1
1
user => 

Hmm.... you mean an inf-clojure option? I'll take a look-see.

johnwalker commented 9 years ago

I thought the echo might be coming from pixie-vm, this is useful

johnwalker commented 9 years ago

This is pretty weird. I can't take a crack at it right now, but I'll see if I can resolve this Saturday. In the meantime, try installing an old version of inf-clojure.

joshua-g commented 9 years ago

Okay, I'll give it a shot. Thanks for the quick replies!

johnwalker commented 9 years ago

You're welcome! :)

johnwalker commented 9 years ago

Working on it, this happens on mine too. Not sure why it's happening yet.

johnwalker commented 9 years ago

Would you tell me if there is a process buffer and a separate repl buffer in inf-clojure with clojure files? It seems that inf-clojure assumes that if it's a derived mode, then the process and the repl buffer are the same.

joshua-g commented 9 years ago

How do I determine that?

johnwalker commented 9 years ago

Run inf-clojure in a lein project and do M-x list-buffers, and there should be an extra buffer that isn't the repl.

joshua-g commented 9 years ago

Oh ok -- there's not. There's just the repl buffer named *inf-clojure*. Also, when I run list-processes I see a process named "inf-clojure" corresponding to the *inf-clojure* buffer, running the command lein repl.

johnwalker commented 8 years ago

A little embarrassing, but I suspect the bug may go back to waaay back here haha.

https://github.com/pixie-lang/pixie/commit/14d9e2921af591f02644a2fb521656bcbfabdafc

http://stackoverflow.com/questions/19246065/python-in-emacs-shell-mode-turns-on-stty-echo-and-breaks-c-d

johnwalker commented 8 years ago

OK, so this is whats happening. If you want a quick fix, make the pixie program something like this. The tradeoff is that now you won't see => or whatever.

#!/bin/bash
cat | /home/john/toolbox/pixie/pixie-vm $*