bbatsov/prelude

Emacsclient (in daemon mode) doesn't start after adding prelude-helm-everywhere

aviav opened this issue · 1 comments

Expected behavior

After I uncomment prelude-helm-everywhere, start Emacs in daemon mode, and enter emacsclient -t on the terminal, Emacs Prelude starts.

Actual behavior

Entering emacsclient -t just leads to an empty shell prompt, without persistent output on the terminal. Doing emacsclient -t 2> tmp-1, I see the following error in the file: *ERROR*: ‘which-key-mode’ can’t be used with ‘helm-descbinds-mode’.

This is fixed by commenting out in .emacs.d/core/prelude-ui.el

(if (daemonp)                                                                                                                                                                                                                          
    (add-hook 'server-after-make-frame-hook 'which-key-mode)                                                                                                                                                                           
  (which-key-mode +1))

and then killall emacs. After then restarting emacs in daemon mode I can open a client on the terminal as expected.

Note that starting emacs without daemon mode with emacs works without any issue for me, in any case.

There seem to have been changes related to the error in helm-descbinds four months ago. The issue first occurred for me after I updated Prelude today, which I don't do that often.

Steps to reproduce the problem

  • Backup and delete pre-existing .emacs.d
  • Install Emacs Prelude using curl -L https://git.io/epre | sh
  • Using a different editor, uncomment (require 'prelude-helm-everywhere) in .emacs.d/personal/prelude-modules.el
  • Run /usr/bin/emacs --daemon
  • Run emacsclient -t

Environment & Version information

Emacs version

GNU Emacs 29.3 (build 1, x86_64-pc-linux-gnu)

Operating system

Arch Linux

spacemacs apparently has workarounds to try and handle this but in prelude this causes startup issues and odd unresponsive commands e.g. when using magit and emacsclient as git's EDITOR emacs seems to terminate the client causing git and magit to desync, it also prevents buffers invoked from emacsclient (either new ones or revisiting of files open in existing buffers) to rise to the top, leading to a very strange and frustrating experience.

For SEO purposes, the specific error I got is

which-key-mode can't be used with helm-descbinds-mode

in the magit commands buffer, which led me to the same solution of disabling which-key before finding this issue.

The issue first occurred for me after I updated Prelude today, which I don't do that often.

Similar story here, I replaced my laptop, redid my setup, and updated prelude while at it, took me some time to figure out this issue as I initially chalked the odd behaviours up to trying out flatpak emacs (turns out this was not its fault)