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

flymake-grammarly makes the emacs daemon hang during the startup #8

Open
algor512 opened this issue Nov 15, 2022 · 5 comments
Open

Comments

@algor512
Copy link

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.

@jcs090218
Copy link
Member

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?

@algor512
Copy link
Author

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?

@jcs090218
Copy link
Member

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?

@algor512
Copy link
Author

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))

@jcs090218
Copy link
Member

It's weird, this package does nothing in the root level. It only registers the grammarly callbacks and it should be safe!...

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

No branches or pull requests

2 participants