Subject: Re: bug#47832: 28.0.50; define-fringe-bitmap and emacs --daemon

From: Eli Zaretskii <[email-masked]>
Date: Sat, 17 Apr 2021 09:49:03 +0300

> Date: Fri, 16 Apr 2021 22:22:35 +0000
> From: Gregory Heytings <[email-masked]>
> 
> When the init file contains define-fringe-bitmap that override default 
> fringe bitmaps, they are ignored by Emacs when it is started as a daemon. 
> This has stopped working at commit 88efc736f5, when Cairo became the 
> default backend.

That commit simply made Cairo being available by default, if found on
the system.  It didn't change any code.  Are you saying that non-Cairo
build shows this problem as well, after that commit?  Or is the
problem limited to Cairo builds on your system?

> 1. create a ~/.emacs file with:
> 
> (define-fringe-bitmap 'empty-line [ #xff ] nil nil '(top t))
> (setq-default indicate-empty-lines t)
> 
> 2. emacs ~/.emacs => the empty lines fringe bitmaps are displayed 
> correctly, with a solid black column.
> 
> 3. emacs --daemon
> 
> 4. emacsclient -c ~/.emacs => the empty line fringe bitmaps are the 
> default ones, which are 4x1 pixel horizontal black lines.

In general, display features that need GUI framework should be turned
on from after-make-frame-functions or server-after-make-frame-hook to
work reliably in daemon-based sessions.  However, if this used to
work, it would be good to understand which change broke it.  But I
doubt that the commit you identified is the culprit: I see the same
behavior on MS-Windows, where Cairo and the commit you pointed to have
no effect whatsoever.