Skip to content
New issue

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

By clicking “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? Sign in to your account

Comint pre output filter handling is wrong #136

Open
arichiardi opened this issue Feb 23, 2018 · 2 comments
Open

Comint pre output filter handling is wrong #136

arichiardi opened this issue Feb 23, 2018 · 2 comments

Comments

@arichiardi
Copy link
Contributor

arichiardi commented Feb 23, 2018

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

@MalloZup
Copy link

MalloZup commented Aug 5, 2019

autogenerated with https://github.com/MalloZup/doghub: issue inactive since 450 days. Please update the issue or close it

@JasonKDarby
Copy link
Contributor

#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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants