Subject: Re: bug#57459: Customisation before enabling display-fill-column-indicator-mode

From: [email-masked]
Date: Sun, 28 Aug 2022 16:38:55 +0200 (CEST)

Aug 28, 2022, 14:14 by [email-masked]:

>> Date: Sun, 28 Aug 2022 15:13:27 +0200 (CEST)
>> From: wilnerthomas--- via "Bug reports for GNU Emacs,
>>  the Swiss army knife of text editors" <[email-masked]>
>>
>>
>> Seems that face attributes can be set for fill-column-indicator before calling  
>> display-fill-column-indicator-mode.  But not for display-fill-column-indicator-character.
>>
>
> Please show how you tried doing that, starting from "emacs -Q".  There
> are many possible ways of customizing face attributes, and we need to
> know which one you found not functioning in this case.
>
I made the following function

(defun indicator-attributes ()

     (setq display-fill-column-indicator-character ?\u2503)

     (set-face-attribute 'fill-column-indicator nil :background "green" :height 1.0))

I have another function to enable global-display-fill-column-indicator-mode

(defun  colum-indicator () 
     (interactive) (global-display-fill-column-indicator-mode))

If I call (indicator-attributes) in my init file, then do "M-x colum-indicator" in a buffer, I get the old character.

But if I change colum-indicator to include (indicator-attributes) after setting the global mode, I get
the correct wider character if I do "M-x colum-indicator" in a buffer.

(defun  colum-indicator ()
 
     (interactive) (global-display-fill-column-indicator-mode) (indicator-attributes))