Comint pre output filter handling is wrong
While digging some other issue, I discovered that the way we are using comint-preoutput-filter-functions might be off. An example output:
----CMD->
"(lumo.repl/doc defn)\n"
<-RES----
"-------------------------"
<-RES----
"\ncljs.core/defn\n([name doc-string? attr-map? [params*] prepost-map? body] [name doc-string? attr-map? ([params*] prepost-map? body) + attr-map?])\n Same as (def name (core/fn [params* ] exprs*)) or (def\n name (core/fn ([params* ] exprs*)+)) with any doc-string or attrs added\n to the var metadata. prepost-map defines a map with optional keys\n :pre and :post that contain collections of pre or post conditions.\nnil\ncljs.user=> cljs.user=> "
It might be for a couple of reasons, and the above might happen in lumo only, but it seems that inf-clojure-preoutput-filter` is called more than once.
More to dig.
Expected behavior
Ideally it should filter the aggregated response from the repl.
Actual behavior
The current split produces two prompts (one per filtered response) like:
-------------------------
cljs.core/defn
([name doc-string? attr-map? [params*] prepost-map? body] [name doc-string? attr-map? ([params*] prepost-map? body) + attr-map?])
Same as (def name (core/fn [params* ] exprs*)) or (def
name (core/fn ([params* ] exprs*)+)) with any doc-string or attrs added
to the var metadata. prepost-map defines a map with optional keys
:pre and :post that contain collections of pre or post conditions.
nil
cljs.user=> cljs.user=>
Steps to reproduce the problem
See command.
Environment & Version information
inf-clojure version information
master
Lein/Boot version
Lumo 1.8.0
Emacs version
24.5
Operating system
Ubuntu 16.04
autogenerated with https://github.com/MalloZup/doghub: issue inactive since 450 days. Please update the issue or close it
https://github.com/clojure-emacs/inf-clojure/pull/201 doesn't solve anything regarding when the filter function is called but it does prevent duplicate repls, it might be enough to close this.