Subject: bug#43396: 27.1; Customized "cursor" face has no effect in daemon mode

From: Teemu Likonen <[email-masked]>
Date: Mon, 14 Sep 2020 16:23:39 +0300

The "cursor" face's background attribute can be customized to change
text cursor's color. However, customized cursor does not have any effect
in Emacs session which is started with "emacs --daemon" in KDE Plasma
desktop system.

I can reliably reproduce this with these steps:

 1. Create Emacs init file ("~/.emacs.el") with the following content:

        (custom-set-faces
         '(cursor ((t (:background "#0f0")))))

 2. Start "emacs" in normal mode to see that the cursor is green (#0f0).
    Close this Emacs session.

 3. Start Emacs in daemon mode and open a client session:

        $ emacs --daemon=test
        $ emacsclient -c -s test

    This client session has black cursor, not green. (Stop the
    session: M-x kill-emacs RET)

I would expect to see green (#0f0) cursor in Emacs daemon's client
sessions too.

In GNU Emacs 27.1 (build 1, x86_64-pc-linux-gnu, GTK+ Version 3.24.5)
 of 2020-08-09 built on mithlond
Repository revision: 86d8d76aa36037184db0b2897c434cdaab1a9ae8
Repository branch: emacs-27
Windowing system distributor 'The X.Org Foundation', version 11.0.12004000
System Description: Debian GNU/Linux 10 (buster)

Recent messages:
Loading /home/dtw/.emacs.d/omat/asetukset/org-kalenteri.el (source)...done
Loading /home/dtw/.emacs.d/omat/asetukset/posti.el (source)...done
Loading /home/dtw/.emacs.d/omat/asetukset/wcheck.el (source)...done
Loading /home/dtw/.emacs.d/omat/asetukset/latex.el (source)...done
Loading /home/dtw/.emacs.d/omat/asetukset/tulostus.el (source)...done
Loading /home/dtw/.emacs.d/omat/asetukset/sekalaiset.el (source)...done
Loading /home/dtw/.emacs.d/omat/asetukset/funktiot.el (source)...done
Loading /home/dtw/.emacs.d/omat/asetukset/korjauksia.el (source)...done
Starting Emacs daemon.
When done with this frame, type C-x 5 0

Configured using:
 'configure --prefix=/usr/local --with-x-toolkit=gtk3 --with-xwidgets
 --with-wide-int --without-compress-install'

Configured features:
XPM JPEG TIFF GIF PNG RSVG SOUND DBUS GSETTINGS GLIB NOTIFY INOTIFY
LIBSELINUX GNUTLS LIBXML2 FREETYPE HARFBUZZ M17N_FLT LIBOTF XFT ZLIB
TOOLKIT_SCROLL_BARS GTK3 X11 XDBE XIM MODULES THREADS XWIDGETS
LIBSYSTEMD PDUMPER LCMS2 GMP

Important settings:
  value of $LANG: fi_FI.UTF-8
  value of $XMODIFIERS: @im=none
  locale-coding-system: utf-8-unix

Major mode: Text

Minor modes in effect:
  winner-mode: t
  show-paren-mode: t
  global-undo-tree-mode: t
  undo-tree-mode: t
  icomplete-mode: t
  fido-mode: t
  cl-old-struct-compat-mode: t
  tooltip-mode: t
  global-eldoc-mode: t
  electric-indent-mode: t
  mouse-wheel-mode: t
  file-name-shadow-mode: t
  global-font-lock-mode: t
  font-lock-mode: t
  window-divider-mode: t
  auto-composition-mode: t
  auto-encryption-mode: t
  auto-compression-mode: t
  column-number-mode: t
  line-number-mode: t
  visual-line-mode: t
  transient-mark-mode: t

Load-path shadows:
~/.emacs.d/omat/elisp/loaddefs hides /usr/local/share/emacs/27.1/lisp/loaddefs

Features:
(shadow sort mail-extr emacsbug sendmail notmuch hl-line notmuch-tree
notmuch-jump notmuch-hello wid-edit notmuch-show notmuch-print
notmuch-crypto notmuch-mua notmuch-message notmuch-draft
notmuch-maildir-fcc notmuch-address notmuch-company notmuch-parser
notmuch-wash diff-mode easy-mmode coolj notmuch-query goto-addr
thingatpt icalendar diary-lib diary-loaddefs suomalainen-kalenteri solar
cal-dst holidays hol-loaddefs cal-menu calendar cal-loaddefs notmuch-tag
crm notmuch-lib notmuch-version notmuch-compat mm-view mml-smime smime
dig mailcap server rx message rmc puny dired dired-loaddefs format-spec
rfc822 mml mml-sec epa derived epg epg-config gnus-util rmail
rmail-loaddefs text-property-search time-date mm-decode mm-bodies
mm-encode mail-parse rfc2231 rfc2047 rfc2045 mm-util ietf-drums
mail-prsvr mailabbrev mail-utils gmm-utils mailheader edmacro kmacro
TL-theme winner ring paren undo-tree diff icomplete cus-start cus-load
tex-site slime-autoloads info package easymenu browse-url url-handlers
url-parse auth-source cl-seq eieio eieio-core cl-macs eieio-loaddefs
password-cache json subr-x map url-vars seq byte-opt gv bytecomp
byte-compile cconv cl-loaddefs cl-lib tooltip eldoc electric uniquify
ediff-hook vc-hooks lisp-float-type mwheel term/x-win x-win
term/common-win x-dnd tool-bar dnd fontset image regexp-opt fringe
tabulated-list replace newcomment text-mode elisp-mode lisp-mode
prog-mode register page tab-bar menu-bar rfn-eshadow isearch timer
select scroll-bar mouse jit-lock font-lock syntax facemenu font-core
term/tty-colors frame minibuffer cl-generic cham georgian utf-8-lang
misc-lang vietnamese tibetan thai tai-viet lao korean japanese eucjp-ms
cp51932 hebrew greek romanian slovak czech european ethiopic indian
cyrillic chinese composite charscript charprop case-table epa-hook
jka-cmpr-hook help simple abbrev obarray cl-preloaded nadvice loaddefs
button faces cus-face macroexp files text-properties overlay sha1 md5
base64 format env code-pages mule custom widget hashtable-print-readable
backquote threads dbusbind inotify lcms2 dynamic-setting
system-font-setting font-render-setting xwidget-internal move-toolbar
gtk x-toolkit x multi-tty make-network-process emacs)

Memory information:
((conses 16 112103 10686)
 (symbols 48 13029 1)
 (strings 32 36830 2633)
 (string-bytes 1 1251488)
 (vectors 16 18840)
 (vector-slots 8 236189 4680)
 (floats 8 409 365)
 (intervals 56 316 0)
 (buffers 1000 14))

-- 
/// Teemu Likonen - .-.. http://www.iki.fi/tlikonen/
// OpenPGP: 4E1055DC84E9DFF613D78557719D69D324539450