DarthFennec / highlight-indent-guides

Emacs minor mode to highlight indentation
566 stars 27 forks source link

Not working with emacsclient + emacs daemon mode except 'character mode for emacs 27.1 #100

Closed zw963 closed 3 years ago

zw963 commented 3 years ago

After update to 27.1, i notice all my highlight indent guides config is not take effect anymore.

I tried with following minimum config, and test it on a coffee field, and i can confirm, it works when i run like emacs /some/path/some_coffee.coffee, but not work if i start a daemon first with emacs --daemon, and then use emacsclient connect to it.

following is some clue:

  1. it works well when i use emacs 26.3
  2. if use 'character, it always work. Following is all my config:
(require 'server)
(setq server-use-tcp t) ;使用 `tcp-ip连接' 代替本地 `socket链接'.
(setq server-port 9299)

(setq inhibit-startup-screen t)    ;关闭启动帮助画面
(setq initial-scratch-message "
(setq default-directory \"/home/zw963/Dropbox/common/.emacs.d\")
(normal-top-level-add-subdirs-to-load-path)")

(require 'highlight-indent-guides)

(dolist (hook '(coffee-mode-hook
                feature-mode-hook
                yaml-mode-hook
                python-mode-hook
                slim-mode-hook))
  (add-hook hook 'highlight-indent-guides-mode))

Thank you.


BTW: i test highlight-indentation.el too, it is working, so, i guess it maybe this package issue.

DarthFennec commented 3 years ago

Hm ... I'd try to reproduce this, but my emacs daemon crashes as soon as I start a client, which is obviously unhelpful. I'll have to look deeper into this when I can spare the time. To clarify, is this specific to coffeescript or is it the same in all modes?

zw963 commented 3 years ago

I test it on yaml-mode, not works too, so, i guess same in all modes.

thank you,

agreselin commented 3 years ago

@zw963 Have you tried putting your config inside a server-after-make-frame-hook?

zw963 commented 3 years ago

@agreselin , i tested, it not work.

anyway, i use highlight-indentation.el instead, it works quite well no frame hook needed.

Thank you.