nano-emacs icon indicating copy to clipboard operation
nano-emacs copied to clipboard

Bug: nano interferes with web-mode (TSX)

Open hermann-p opened this issue 2 years ago • 13 comments

When switching to web-mode, it breaks with Error (prog-mode-hook): Error running hook "highlight-indent-guides-mode" because: (wrong-number-of-arguments #<subr quote> 0) and stays in fundamental mode.

Reproduce:

  • emacs -q -l nano.el
  • install web-mode with install-package
  • open up a TSX-file (did not test html ones yet)
  • M-x web-mode

Let me know if I can help debugging, but remember my elisp-fu is near to non-existent.

hermann-p avatar Jun 08 '22 14:06 hermann-p

Could you try to use nano-modeline instead (which is on ELPA)?

rougier avatar Jun 21 '22 08:06 rougier

Not sure what you mean? Instead of what?

hermann-p avatar Jun 22 '22 14:06 hermann-p

Sorry for not being clear. There is now a dedicated package (nano-modeline) that is available on ELPA. You can install it from Emacs and then test is by typing M-x: nano-modeline (from a "regular" Emacs session, not nano).

rougier avatar Jun 23 '22 05:06 rougier

I got that part, just was confused about the "instead" part. So just the modeline instead of the whole nano package.

  • open a fresh Emacs emacs -q
  • installed nano-modeline and web-mode
  • opened the same .tsx-file as before
  • M-x nano-modeline
  • M-x web-mode

Works just fine. Works also if I load the modeline before opening the file.

hermann-p avatar Jun 23 '22 09:06 hermann-p

Sorry for late answer. Does that mean it is working properly now?

rougier avatar Jul 11 '22 09:07 rougier

It means I can run nano-modeline, but still not nano in web-mode. Should I try updating nano-emacs? I don't see any recent commits, though.

hermann-p avatar Jul 12 '22 07:07 hermann-p

I need to update nano-emacs to reflect the change but the story is that I split it in independent packages (nano-theme and nano-modeline) such that people are free to use this or that part. In the meantime, I've also developped several packages that go along the idea of nano emacs. You can have a look at my configuration here: https://github.com/rougier/dotemacs

rougier avatar Jul 13 '22 16:07 rougier

Thank you for your time, and please don't feel pushed. I am aware of the other packages, and I mostly use doom emacs with nano-theme.

On a side note: I feel like the decluttering of colours together with the font hints removes a lot of distraction while still adding visual structure. It helps to focus on complex source code, so, great work!

hermann-p avatar Jul 14 '22 08:07 hermann-p

Thanks. Coming back to your problem, does that mean that nano-theme + nano-modeline works as expected now?

rougier avatar Jul 25 '22 20:07 rougier

I was able to resolve the issue by commenting out this line: https://github.com/rougier/nano-emacs/blob/c313957b5945e197c7d9cab1115190a339ee856c/nano-defaults.el#L57

nhunzaker avatar Feb 08 '23 01:02 nhunzaker

Oh, that's surprising and I wonder how you found the problem. Do you want to make a PR (to just comment it by default) ?

rougier avatar Feb 14 '23 10:02 rougier

Oh, that's surprising and I wonder how you found the problem.

When it stopped working, I just started poking around with the settings to see how all of this actually worked and suspected this might be a font locking issue.

Oh, that's surprising and I wonder how you found the problem.

Sure thing!

nhunzaker avatar Feb 18 '23 15:02 nhunzaker

Do you want to make a PR?

rougier avatar Feb 27 '23 14:02 rougier