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

Three related patches on error handling. #690

Merged
merged 3 commits into from
Aug 4, 2014

Conversation

vspinu
Copy link
Contributor

@vspinu vspinu commented Aug 2, 2014

Three patches:

  • Use file-truename consistently in cider-highlight-compilation-errors to avoid recognizing simplinked files as different.
  • Add cider-auto-jump-to-error functionality.
  • Print cider error messages into minibuffer. Most useful when cider-show-error-buffer is nil. This particular behavior was there a month ago. I assume it's a regression that I don't see it anymore in the HEAD.

    Fixes (scan-error "Unbalanced parentheses") when the compiled file is
    simlinked.
@bbatsov
Copy link
Member

bbatsov commented Aug 3, 2014

This wasn't a regression, but a result of the discussion in #572.

@vspinu
Copy link
Contributor Author

vspinu commented Aug 3, 2014

Well. I don't mind if it's printed in repl or not, but it should be printed in the echo area as well. I expect output in the minibuffer, error it is or not. It's especially inconsistent and confusing when stacktrace is not automatically popped. I can check for the value of the cider-show-error-buffer and conditionally on that display the message. I think it's a good compromise.

@vspinu
Copy link
Contributor Author

vspinu commented Aug 4, 2014

I have rewrote the api and addressed the error message issue as discussed.

(cider-highlight-compilation-errors buffer err)
(cider-jump-to-error-maybe buffer err)
(unless (cider--show-error-buffer-p buffer)
(message "%s" err)))
Copy link
Member

Choose a reason for hiding this comment

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

The problem is that you think of this as the exception message, but it's actually ANY error output. The current concept is that people can use the output-destination defcustom to customize this, which is preferable to sprinkling message calls everywhere. I'd suggest taking this out of that PR so we can discuss it separately.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Ok, I have dropped that part. I don't mind how it is implemented as long as I see the message;)

@bbatsov
Copy link
Member

bbatsov commented Aug 4, 2014

Overall the code looks good now. I just have a few minor stylistic remarks. You'll do well to use M-x checkdoc to make sure your code conforms to the established Emacs Lisp style.

@vspinu
Copy link
Contributor Author

vspinu commented Aug 4, 2014

Ok. I have corrected the doc issues. Didn't know about M-x checkdoc.

There are quite some other pre-existing issues that checkdoc complains about. Not all of them are real errors, but it makes the checks harder.

bbatsov added a commit that referenced this pull request Aug 4, 2014
Three related patches on error handling.
@bbatsov bbatsov merged commit 6c39b34 into clojure-emacs:master Aug 4, 2014
@bbatsov
Copy link
Member

bbatsov commented Aug 4, 2014

👍

@vspinu vspinu deleted the truename branch August 1, 2017 10:47
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

Successfully merging this pull request may close these issues.

2 participants