What did you expect to happen?
The indent-guides (highlight-indent-guides-mode) to work without visual glitches.
What actually happened?
The indent-guides (highlight-indent-guides-mode) have a visual glitch in a newly started Emacs Daemon: the guides have incorrect color (white, see screenshot below). If unlucky, then the guide becomes a real character when inserting text (e.g., inserting a comment before it _can_ make it part of the comment).
Additional details:
indent-guides in $DOOMDIR/init.el.doctor reports no errors (except of course #2284).
Steps to reproduce:
emacsclient -cna "",System information:
emacs version 26.3
features XPM JPEG TIFF GIF PNG RSVG IMAGEMAGICK SOUND GPM DBUS GLIB NOTIFY ACL GNUTLS LIBXML2 FREETYPE M17N_FLT LIBOTF XFT ZLIB TOOLKIT_SCROLL_BARS LUCID X11 XDBE XIM MODULES THREADS LIBSYSTEMD LCMS2
build sep 20, 2019
buildopts (--prefix=/usr --sysconfdir=/etc --libexecdir=/usr/lib --localstatedir=/var --with-x-toolkit=lucid --with-xft --without-gconf --without-gsettings --with-modules '--program-transform-name=s/^ctags$/ctags.emacs/' 'CFLAGS=-march=x86-64 -mtune=generic -O2 -pipe -fstack-protector-strong -fno-plt' CPPFLAGS=-D_FORTIFY_SOURCE=2 LDFLAGS=-Wl,-O1,--sort-common,--as-needed,-z,relro,-z,now)
windowsys x
daemonp daemon
doom version 2.0.9
build HEAD -> develop, origin/develop, origin/HEAD ed2fb6836 2020-03-03 23:33:53 -0500
dir ~/.doom.d/
system type gnu/linux
config x86_64-pc-linux-gnu
shell /bin/bash
uname Linux 5.4.23-1-MANJARO #1 SMP PREEMPT Fri Feb 28 22:45:29 UTC 2020 x86_64
path (~/.local/bin ~/.emacs.d/bin ~/.local/bin /bin /usr/bin /usr/local/bin /usr/local/sbin /usr/lib/jvm/default/bin /usr/bin/site_perl /usr/bin/vendor_perl /usr/bin/core_perl /usr/lib/emacs/26.3/x86_64-pc-linux-gnu/)
config envfile envvar-file
elc-files 0
modules (:completion company ivy :ui doom doom-dashboard doom-quit hl-todo indent-guides modeline nav-flash ophints (popup +defaults) vc-gutter vi-tilde-fringe window-select workspaces :editor (evil +everywhere) file-templates fold snippets :emacs dired electric vc :checkers syntax :tools (eval +overlay) lookup magit :lang data emacs-lisp markdown (org +dragndrop +present) sh :config (default +bindings +smartparens))
packages (n/a)
unpin (n/a)
elpa (n/a)
((emacs
(version . "26.3")
(features . "XPM JPEG TIFF GIF PNG RSVG IMAGEMAGICK SOUND GPM DBUS GLIB NOTIFY ACL GNUTLS LIBXML2 FREETYPE M17N_FLT LIBOTF XFT ZLIB TOOLKIT_SCROLL_BARS LUCID X11 XDBE XIM MODULES THREADS LIBSYSTEMD LCMS2")
(build . "sep 20, 2019")
(buildopts "--prefix=/usr --sysconfdir=/etc --libexecdir=/usr/lib --localstatedir=/var --with-x-toolkit=lucid --with-xft --without-gconf --without-gsettings --with-modules '--program-transform-name=s/^ctags$/ctags.emacs/' 'CFLAGS=-march=x86-64 -mtune=generic -O2 -pipe -fstack-protector-strong -fno-plt' CPPFLAGS=-D_FORTIFY_SOURCE=2 LDFLAGS=-Wl,-O1,--sort-common,--as-needed,-z,relro,-z,now")
(windowsys . batch)
(daemonp . server-running))
(doom
(version . "2.0.9")
(build . "HEAD -> develop, origin/develop, origin/HEAD ed2fb6836 2020-03-03 23:33:53 -0500")
(dir . "~/.doom.d/"))
(system
(type . gnu/linux)
(config . "x86_64-pc-linux-gnu")
(shell . "/bin/bash")
(uname . "Linux 5.4.23-1-MANJARO #1 SMP PREEMPT Fri Feb 28 22:45:29 UTC 2020 x86_64")
(path "~/.local/bin" "~/.emacs.d/bin" "~/.local/bin" "/bin" "/usr/bin" "/usr/local/bin" "/usr/local/sbin" "/usr/lib/jvm/default/bin" "/usr/bin/site_perl" "/usr/bin/vendor_perl" "/usr/bin/core_perl" "/usr/lib/emacs/26.3/x86_64-pc-linux-gnu"))
(config
(envfile . envvar-file)
(elc-files . 0)
(modules :completion company ivy :ui doom doom-dashboard doom-quit hl-todo indent-guides modeline nav-flash ophints (popup +defaults) vc-gutter vi-tilde-fringe window-select workspaces :editor (evil +everywhere) file-templates fold snippets :emacs dired electric vc :checkers syntax :tools (eval +overlay) lookup magit :lang data emacs-lisp markdown (org +dragndrop +present) sh :config (default +bindings +smartparens))
(packages "n/a")
(unpin "n/a")
(elpa "n/a")))
I see the same
I seem to have found a workaround, added this to my config (source):
(after! highlight-indent-guides
(highlight-indent-guides-auto-set-faces))
@hlissner Could you please check to see if this could be made into a real solution rather than just a workaround? Thanks!
For me, this workaround fixed face color of highlight-indent-guides-top-character-face, but not highlight-indent-guides-character-face.
(It has different color if I rerun 'highlight-indent-guides-auto-set-faces' in the new frame again).
Looking at the code in ui/indent-guides/config.el:
:config
(add-hook 'focus-in-hook #'highlight-indent-guides-auto-set-faces)
I expect when I examine focus-in-hook, I should see the auto-set-faces function to be present in my daemon. But, it's not in reality. This could be the root cause of this issue.
EDIT:
The only function on the focus-in-hook for me when I go and examine this, is flycheck-display-error-at-point-soon
Not sure if flycheck has anything to do with this...
EDIT2:
Disabled syntax checker module, now I can see ~10 functions on focus-in-hook now.
As of 5775714 this issue should hopefully be resolved. Let me know if that isn't the case and I'll reopen it. Thanks for bringing it to my attention!
For me, it's not resolved. The face color still looks wrong. I will do some digging and report back.
Haven't had time to test this until now.
Unfortunately this still persists.
Using default doom install and config with only indent-guides commented out in init.el. Further, the glitch is _no longer corrected_ if the window loses focus by the WM.
its not only in doom emacs, it seems !