Skip to content

inf-clojure does not return prompt on entering new-line #113

New issue

Have a question about this project? No Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “No Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? No Sign in to your account

Closed
slipset opened this issue Oct 27, 2017 · 2 comments
Closed

inf-clojure does not return prompt on entering new-line #113

slipset opened this issue Oct 27, 2017 · 2 comments

Comments

@slipset
Copy link
Contributor

slipset commented Oct 27, 2017

Expected behavior

When opening a new inf-clojure process and typing RET multiple times, I expect to see
multiple prompts:

Planck 2.8.1
ClojureScript 1.9.946
    Docs: (doc function-name-here)
          (find-doc "part-of-name-here")
  Source: (source function-name-here)
    Exit: Control+D or :cljs/quit or exit or quit
 Results: Stored in vars *1, *2, *3, an exception in *e

cljs.user=> 
cljs.user=> 
cljs.user=> 
cljs.user=> 
cljs.user=> 
cljs.user=> 
cljs.user=> 
cljs.user=> 
cljs.user=> 
cljs.user=> 
cljs.user=> 
cljs.user=> 
cljs.user=>

Actual behavior

Process inf-clojure finished
Planck 2.8.1
ClojureScript 1.9.946
    Docs: (doc function-name-here)
          (find-doc "part-of-name-here")
  Source: (source function-name-here)
    Exit: Control+D or :cljs/quit or exit or quit
 Results: Stored in vars *1, *2, *3, an exception in *e

cljs.user=> 





Steps to reproduce the problem

M-x inf-clojure
Type RET a couple of times.

I can change this behaviour by redefining inf-clojure--send-string so that it does not check for
(> (length string) 0) when sending the command, and stuff works as I expect, eg
with

(defun inf-clojure--send-string (proc string)
  (inf-clojure--set-repl-type proc)
      (comint-simple-send proc string))

things work as I expect.

@slipset slipset mentioned this issue Oct 27, 2017
2 tasks
@arichiardi
Copy link
Contributor

So that change was introduced in order to avoid spurious prompts when the string to send is empty. There were cases when this was happening quite often (especially in lumo), so I put a patch that admittedly is not the best. I should probably remove it and investigate what actually happens now that we can dump the REPL activity.

@bbatsov
Copy link
Member

bbatsov commented Dec 3, 2017

Yeah, we should fix this.

arichiardi added a commit to arichiardi/inf-clojure that referenced this issue Dec 31, 2017
No Sign up for free to join this conversation on GitHub. Already have an account? No Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants