Skip to content
New issue

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

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

Already on GitHub? # to your account

No comment syntax defined on *cider-error* buffer #1779

Closed
johnbendi opened this issue Jun 6, 2016 · 11 comments
Closed

No comment syntax defined on *cider-error* buffer #1779

johnbendi opened this issue Jun 6, 2016 · 11 comments

Comments

@johnbendi
Copy link

johnbendi commented Jun 6, 2016

I keep getting this message anytime the *cider-error* buffer pops up

cider-version => 0.13.0snapshot (package: 20160602.809)

@johnbendi
Copy link
Author

I'm using this hack for now:

(add-hook 'cider-stacktrace-mode-hook
          (lambda ()
            (set (make-local-variable 'comment-start) ";;")
            (set (make-local-variable 'comment-end) "\n")))

@Malabarba
Copy link
Member

  1. Do M-x toggle-debug-on-error.
  2. Reproduce the problem

You'll get a backtrace you can paste here.

@johnbendi
Copy link
Author

@Malabarba toggling debug-on-error does not produce any backtrace and I don't think it should. I'm going to attach a screenshot to help you see the issue as it appears to me:

cider_no_comment_syntax_defined

@Malabarba
Copy link
Member

Right, sorry, I should've paid more attention.
Instead, do this:

  1. Do M-x toggle-debug-on-quit.
  2. Reproduce the problem.
  3. Hit C-g on that prompt.

You'll get a backtrace you can paste here.

@johnbendi
Copy link
Author

Okay thanks. This one was a bit tricky though. I had to C-g like 20 times before I could get a backtrace and the prompt still persists even after quiting the backtrace. But looking at it I think the backtrace info should be helpful:

 Debugger entered--Lisp error: (quit)
  redisplay_internal\ \(C\ function\)()
  read-string("No comment syntax is defined.  Use: ")
  comment-normalize-vars()
  clojure--looking-at-non-logical-sexp()
  clojure-forward-logical-sexp(1)
  #[0 "\300\301!\207" [clojure-forward-logical-sexp 1] 2 "\n\n(fn)"]()
  funcall(#[0 "\300\301!\207" [clojure-forward-logical-sexp 1] 2 "\n\n(fn)"])
  cider--update-locals-for-region(336 861)
  #[642 "\306 \307\211��\307�\310\211��\310��\311\312\313\314\315\316��!\317\"\320\321%DC\216\322��\323#\210\324��\325#\210��\2036�\326��\"\210.�\210\327\300���$\207" [font-lock-default-fontify-region buffer-undo-list inhibit-read-only inhibit-modification-hooks deactivate-mark buffer-file-name buffer-modified-p t nil funcall make-byte-code 0 "\300?\205��\301\302!\207" vconcat vector [restore-buffer-modified-p nil] 2 "\n\n(fn)" remove-text-properties (cider-locals nil cider-block-dynamic-font-lock nil) add-text-properties (help-echo cider--help-echo) cider--update-locals-for-region apply buffer-file-truename cider-font-lock-dynamically] 12 "\n\n(fn BEG END &rest REST)"](336 861 nil)
  font-lock-fontify-region(336 861)
  run-hook-with-args(font-lock-fontify-region 336 861)
  #[0 "\302\303\300\242\301\242#\207" [(336) (861) run-hook-with-args jit-lock-functions] 4 "\n\n(fn)"]()
  funcall(#[0 "\302\303\300\242\301\242#\207" [(336) (861) run-hook-with-args jit-lock-functions] 4 "\n\n(fn)"])
  jit-lock-fontify-now(336 836)
  jit-lock-function(336)
  redisplay_internal\ \(C\ function\)()

@Malabarba
Copy link
Member

Thanks. That's still a bit misterious, but it gives me something to look for. :-)

@Malabarba
Copy link
Member

@johnbendi What's the value of font-lock-fontify-region-function for you in the cider-error buffer?
It looks like this variable is being set to a value that does some special clojure fontification, but that's only supposed to happen in cider-mode, it shouldn't happen in cider-stacktrace-mode.

@johnbendi
Copy link
Author

@Malabarba sorry I have been away. This is what I get:

#[642 "\306 \307\211��\307�\310\211��\310��\311\312\313\314\315\316��!\317\"\320\321%DC\216\322��\323#\210\324��\325#\210��\2036�\326��\"\210.�\210\327\300���$\207"
      [font-lock-default-fontify-region buffer-undo-list inhibit-read-only inhibit-modification-hooks deactivate-mark buffer-file-name buffer-modified-p t nil funcall make-byte-code 0 "\300?\205��\301\302!\207" vconcat vector
                                        [restore-buffer-modified-p nil]
                                        2 "\n\n(fn)" remove-text-properties
                                        (cider-locals nil cider-block-dynamic-font-lock nil)
                                        add-text-properties
                                        (help-echo cider--help-echo)
                                        cider--update-locals-for-region apply buffer-file-truename cider-font-lock-dynamically]
      12 "\n\n(fn BEG END &rest REST)"]

I used with-current-buffer to get the value. Hope the values makes some sense.

@bbatsov
Copy link
Member

bbatsov commented Oct 6, 2016

Do you have cider-mode enabled in cider-stacktrace-mode buffers?

@johnbendi
Copy link
Author

I think I did. But I have a fresh install now. So users may still want to check so if they encounter this error.

@bbatsov
Copy link
Member

bbatsov commented Oct 15, 2016

I'm guessing cider-mode messed up the stacktrace buffer. Can't imagine anything else happening. cider-mode is definitely not meant to be enabled for such buffers. I guess I can close this now.

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

No branches or pull requests

3 participants