Skip to content

[Fix #63] Avoid spurious output by using buffer redirection #69

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

Merged
merged 1 commit into from
Apr 12, 2017

Conversation

arichiardi
Copy link
Contributor

I will need to fix the arglists function as well, it does not work properly for edge cases, I already have some code ready, but I figured I should do another PR.

Also, the same approach should be used for completions, but completions require more work that is why I avoided putting it here.


Before submitting the PR make sure the following things have been done (and denote this
by checking the relevant checkboxes):

  • The commits are consistent with our contribution guidelines
  • You've updated the changelog (if adding/changing user-visible functionality)

Thanks!

@arichiardi arichiardi force-pushed the fix-spurious-output branch from edb289d to fd634a4 Compare April 12, 2017 00:26
@arichiardi
Copy link
Contributor Author

The problem with completions is that you have to post-process them in different ways depending on the repl type. For instance lumo returns json, which emacs can read. So completions need a better handling.

inf-clojure.el Outdated
(set-process-filter proc comint-filt))
eldoc))
(let ((eldoc-snippet (format (inf-clojure-arglists-form) fn)))
(inf-clojure-results-from-process (inf-clojure-proc) (concat eldoc-snippet "\n"))))
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why don't you ensure the command ends with newline in inf-clojure-results-from-process?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah maybe that's better

inf-clojure.el Outdated
(setq is-matching (funcall match-p kept)))
(set-process-filter proc prev-filter))
is-matching))
(thread-last
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The use of thread-last here seems pointless to me.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The command was so long that is why I used it, I can remove it

@arichiardi arichiardi force-pushed the fix-spurious-output branch from fd634a4 to 62af115 Compare April 12, 2017 18:26
@arichiardi
Copy link
Contributor Author

Fixed the issue, I will need another sweep for fixing the problems with arglists and completions once and for all. Also, we could remove all the \n at the end of the form now, but I haven't included it here.

@bbatsov bbatsov merged commit 2669544 into clojure-emacs:master Apr 12, 2017
@arichiardi arichiardi deleted the fix-spurious-output branch July 6, 2017 12:55
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

Successfully merging this pull request may close these issues.

2 participants