fxbois / web-mode

web template editing mode for emacs
https://web-mode.org
GNU General Public License v3.0
1.63k stars 262 forks source link

Whenever I try to use web-mode, I get an "Error in post-command-hook" #318

Closed jonnay closed 9 years ago

jonnay commented 10 years ago

Full error is:

 Error in post-command-hook (global-font-lock-mode-check-buffers): (wrong-type-argument stringp nil)
fxbois commented 9 years ago

@jonnay could you post the output of web-mode-debug Could you also describe a complete testcase to trigger the bug please

jonnay commented 9 years ago

I'll start with web-mode-debug:

--- WEB-MODE DEBUG BEG ---
versions: emacs(24.3) web-mode("9.0.78")
vars: engine("erb") content-type("html") file("/Users/jarkell/projects/ova/opadmin/opadmin/app/views/ops/device_updates/index.html.erb")
system: window(mac) config("x86_64-apple-darwin12.3.0")
colors: fg(nil) bg(nil) 
minor modes: (line-number-mode column-number-mode size-indication-mode auto-compression-mode auto-encryption-mode auto-composition-mode blink-cursor-mode font-lock-mode global-font-lock-mode file-name-shadow-mode mac-mouse-wheel-mode tooltip-mode recentf-mode show-paren-mode semantic-mode global-semantic-decoration-mode global-semantic-idle-summary-mode global-semantic-idle-scheduler-mode global-semantic-idle-completions-mode global-semanticdb-minor-mode which-function-mode shell-dirtrack-mode flyspell-lazy-mode global-auto-complete-mode undo-tree-mode global-undo-tree-mode git-gutter-mode global-git-gutter-mode global-edit-server-edit-mode volatile-highlights-mode global-hl-line-mode savehist-mode helm-occur-match-plugin-mode helm-match-plugin-mode helm-mode global-flycheck-mode erefactor-check-eval-mode rainbow-delimiters-mode global-rainbow-delimiters-mode diff-auto-refine-mode magit-auto-revert-mode)
--- WEB-MODE DEBUG END ---

I'll spend the next couple of days trying to find a consistent test case.

fxbois commented 9 years ago

@jonnay perhaps it is related to a conflicting minor mode. Could you test with a very light .emacs and see if the issue occurs? Thank you in advance

therik commented 9 years ago

I'm getting the same error after today's update. I found out that it only breaks with rainbow-delimiters-mode, but it does seem to be problem with web-mode.

Rainbow delimiters fails on (looking-at comment-start-skip), comment-start-skip being nil, in rainbow-delimiters-char-ineligible-p function.

But rainbow-delimiters seems to be working fine with other modes, and although rainbow-delimiters changed recently too, it did rely on comment-start-skip variable before as well. Seems like rainbow-delimiters doesn't check the validity there and maybe web-mode ceased to provide value for it..?

Good luck, looking forward for quick fix :)

fxbois commented 9 years ago

@therik @jonnay indeed I do not set this value because I can't Could you contact the rainbow-delimiters-mode maintainer ?

fxbois commented 9 years ago

@therik I ve reported an issue

jonnay commented 9 years ago

Issue is here, in case anyone was wondering. https://github.com/jlr/rainbow-delimiters/issues/36

fxbois commented 9 years ago

@jonnay @therik should be fixed with last version of rainbow-delimiters Reopen the issue if needed

jonnay commented 9 years ago

Thank you! Works like a charm now.