unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
* bug#57459: Customisation before enabling display-fill-column-indicator-mode
@ 2022-08-28 13:13 wilnerthomas--- via Bug reports for GNU Emacs, the Swiss army knife of text editors
  2022-08-28 14:14 ` Eli Zaretskii
       [not found] ` <83pmgkxxo6.fsf@gnu.org-NAZnbll----2>
  0 siblings, 2 replies; 6+ messages in thread
From: wilnerthomas--- via Bug reports for GNU Emacs, the Swiss army knife of text editors @ 2022-08-28 13:13 UTC (permalink / raw)
  To: 57459


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.

It would help if the customisation behaviour is made consistent such that one can 
customise the fill-column-indicator properties before enabling the mode.  With 
the customisation remaining effective when the mode is disabled.





^ permalink raw reply	[flat|nested] 6+ messages in thread

* bug#57459: Customisation before enabling display-fill-column-indicator-mode
  2022-08-28 13:13 bug#57459: Customisation before enabling display-fill-column-indicator-mode wilnerthomas--- via Bug reports for GNU Emacs, the Swiss army knife of text editors
@ 2022-08-28 14:14 ` Eli Zaretskii
       [not found] ` <83pmgkxxo6.fsf@gnu.org-NAZnbll----2>
  1 sibling, 0 replies; 6+ messages in thread
From: Eli Zaretskii @ 2022-08-28 14:14 UTC (permalink / raw)
  To: wilnerthomas; +Cc: 57459

> 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" <bug-gnu-emacs@gnu.org>
> 
> 
> 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.





^ permalink raw reply	[flat|nested] 6+ messages in thread

* bug#57459: Customisation before enabling display-fill-column-indicator-mode
       [not found] ` <83pmgkxxo6.fsf@gnu.org-NAZnbll----2>
@ 2022-08-28 14:38   ` wilnerthomas--- via Bug reports for GNU Emacs, the Swiss army knife of text editors
  2022-08-28 15:02     ` Eli Zaretskii
       [not found]     ` <83ler8xvgv.fsf@gnu.org-NAZyNBn----2>
  0 siblings, 2 replies; 6+ messages in thread
From: wilnerthomas--- via Bug reports for GNU Emacs, the Swiss army knife of text editors @ 2022-08-28 14:38 UTC (permalink / raw)
  To: Eli Zaretskii; +Cc: 57459

Aug 28, 2022, 14:14 by eliz@gnu.org:

>> 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" <bug-gnu-emacs@gnu.org>
>>
>>
>> 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))






^ permalink raw reply	[flat|nested] 6+ messages in thread

* bug#57459: Customisation before enabling display-fill-column-indicator-mode
  2022-08-28 14:38   ` wilnerthomas--- via Bug reports for GNU Emacs, the Swiss army knife of text editors
@ 2022-08-28 15:02     ` Eli Zaretskii
  2022-08-29 15:24       ` Lars Ingebrigtsen
       [not found]     ` <83ler8xvgv.fsf@gnu.org-NAZyNBn----2>
  1 sibling, 1 reply; 6+ messages in thread
From: Eli Zaretskii @ 2022-08-28 15:02 UTC (permalink / raw)
  To: wilnerthomas; +Cc: 57459

> Date: Sun, 28 Aug 2022 16:38:55 +0200 (CEST)
> From: wilnerthomas@tutanota.com
> Cc: 57459@debbugs.gnu.org
> 
> Aug 28, 2022, 14:14 by eliz@gnu.org:
> 
> > 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))

It's the same issue as with fill-column:
display-fill-column-indicator-character is a variable that
automatically becomes buffer-local when set (see its doc string).  So
your setq is in effect only for a single buffer: the one in which
Emacs loads and evaluates the init file.

You should use setq-default instead.

This is not a bug.





^ permalink raw reply	[flat|nested] 6+ messages in thread

* bug#57459: Customisation before enabling display-fill-column-indicator-mode
       [not found]     ` <83ler8xvgv.fsf@gnu.org-NAZyNBn----2>
@ 2022-08-28 15:06       ` wilnerthomas--- via Bug reports for GNU Emacs, the Swiss army knife of text editors
  0 siblings, 0 replies; 6+ messages in thread
From: wilnerthomas--- via Bug reports for GNU Emacs, the Swiss army knife of text editors @ 2022-08-28 15:06 UTC (permalink / raw)
  To: Eli Zaretskii; +Cc: 57459

Aug 28, 2022, 15:02 by eliz@gnu.org:

>> Date: Sun, 28 Aug 2022 16:38:55 +0200 (CEST)
>> From: wilnerthomas@tutanota.com
>> Cc: 57459@debbugs.gnu.org
>>
>> Aug 28, 2022, 14:14 by eliz@gnu.org:
>>
>> > 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))
>>
>
> It's the same issue as with fill-column:
> display-fill-column-indicator-character is a variable that
> automatically becomes buffer-local when set (see its doc string).  So
> your setq is in effect only for a single buffer: the one in which
> Emacs loads and evaluates the init file.
>
> You should use setq-default instead.
>
> This is not a bug.
>



Thusly I have the same problem because for setq-default,  the new value is seen in buffers that do not have their own values for the variable.

But I want to change the value even if buffer has its own value.






^ permalink raw reply	[flat|nested] 6+ messages in thread

* bug#57459: Customisation before enabling display-fill-column-indicator-mode
  2022-08-28 15:02     ` Eli Zaretskii
@ 2022-08-29 15:24       ` Lars Ingebrigtsen
  0 siblings, 0 replies; 6+ messages in thread
From: Lars Ingebrigtsen @ 2022-08-29 15:24 UTC (permalink / raw)
  To: Eli Zaretskii; +Cc: wilnerthomas, 57459

Eli Zaretskii <eliz@gnu.org> writes:

> This is not a bug.

So I'm closing this bug report.






^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2022-08-29 15:24 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-08-28 13:13 bug#57459: Customisation before enabling display-fill-column-indicator-mode wilnerthomas--- via Bug reports for GNU Emacs, the Swiss army knife of text editors
2022-08-28 14:14 ` Eli Zaretskii
     [not found] ` <83pmgkxxo6.fsf@gnu.org-NAZnbll----2>
2022-08-28 14:38   ` wilnerthomas--- via Bug reports for GNU Emacs, the Swiss army knife of text editors
2022-08-28 15:02     ` Eli Zaretskii
2022-08-29 15:24       ` Lars Ingebrigtsen
     [not found]     ` <83ler8xvgv.fsf@gnu.org-NAZyNBn----2>
2022-08-28 15:06       ` wilnerthomas--- via Bug reports for GNU Emacs, the Swiss army knife of text editors

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).