flymake-grammarly
flymake-grammarly copied to clipboard
flymake-grammarly makes the emacs daemon hang during the startup
I use GNU Emacs 28.2
A minimal init file init-debug.el to reproduce the bug:
(add-to-list 'load-path "/home/algor/.config/emacs/straight/build/flymake-grammarly")
(add-to-list 'load-path "/home/algor/.config/emacs/straight/build/grammarly")
(add-to-list 'load-path "/home/algor/.config/emacs/straight/build/request")
(add-to-list 'load-path "/home/algor/.config/emacs/straight/build/websocket")
(require 'flymake-grammarly)
(add-hook 'text-mode-hook 'flymake-grammarly-load)
Running /bin/emacs -q -l ~/.config/emacs/init-debug.el --bg-daemon the startup freezes, daemon doesn't start.
Thanks for reporting this issue to us!
Is there an error log for this? It's hard to guess what's going on without any error popping out. Maybe try load it after you have started the daemon?
There are no errors in logs, unfortunately....
After starting the daemon with the line (add-hook 'text-mode-hook 'flymake-grammarly-load) removed, I can run it by hand without any problems. Also I can launch Emacs daemon via running emacs and M-x server-start, it also doesn't lead to any problems.
Possibly emacs, running as a daemon from a terminal, is trying to open something in text mode (without an actual frame), so it runs the flymake-grammarly-load hook and for some reason this causes a freeze?
Maybe try flymake-grammarly-maybe-load instead? Don't know if that would make any differences. I think the cause is this package get activated (sending grammarly requests) right after some buffers without the correct setup.
I usually wrap it with with-eval-after-load 'flymake, then do the following. Hope that would work?
I've just noticed that it hangs even with the following init file...
(add-to-list 'load-path "/home/algor/.config/emacs/straight/build/flymake-grammarly")
(add-to-list 'load-path "/home/algor/.config/emacs/straight/build/grammarly")
(add-to-list 'load-path "/home/algor/.config/emacs/straight/build/request")
(add-to-list 'load-path "/home/algor/.config/emacs/straight/build/websocket")
(require 'flymake-grammarly)
;;(with-eval-after-load 'flymake
;; (add-hook 'text-mode-hook 'flymake-grammarly-maybe-load))
It's weird, this package does nothing in the root level. It only registers the grammarly callbacks and it should be safe!...