colours lost

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

colours lost

Madhu

* [posted on gnu.emacs.help 2019-01-06]
  <[hidden email]>

I'm running an X toolkit build (master from around november) and very
recently I am losing all colours both under X and tty. Typically I start
emacs via --daemon and attach to it via both X and tty.

What I mean is eg. M-x list-colors-display shows a buffer in which all
the the lines are displayed with foreground colour set to the default
foreground, background colour to the default background, and font set to
the default-font.  Same with happens M-x list-faces-display.  colours
set via font-lock still work.  Emacs starts off ok but somewhere this
gets triggered and I can't think of what I've been doing recently that
causes this.  Where do I start looking for the code which handles this?
---Madhu

Reply | Threaded
Open this post in threaded view
|

Re: colours lost

Eli Zaretskii
> From: Madhu <[hidden email]>
> Date: Thu, 14 Feb 2019 12:40:58 +0530
>
> I'm running an X toolkit build (master from around november) and very
> recently I am losing all colours both under X and tty. Typically I start
> emacs via --daemon and attach to it via both X and tty.
>
> What I mean is eg. M-x list-colors-display shows a buffer in which all
> the the lines are displayed with foreground colour set to the default
> foreground, background colour to the default background, and font set to
> the default-font.  Same with happens M-x list-faces-display.  colours
> set via font-lock still work.  Emacs starts off ok but somewhere this
> gets triggered and I can't think of what I've been doing recently that
> causes this.  Where do I start looking for the code which handles this?

Does "M-x list-faces-display" also show all the faces the same, both
colors and fonts?  If so, it sounds like something is redefining all
the faces, and you should look at your customizations related to
faces.

Thinking a bit more about this: if all the colors are suddenly lost,
you should see it happening immediately, and so the last thing you did
is a good starting point for looking for the culprit.

Reply | Threaded
Open this post in threaded view
|

Re: colours lost

Madhu-8

* Eli Zaretskii <[hidden email]> :
Wrote on Thu, 14 Feb 2019 16:35:08 +0200:

>> From: Madhu <[hidden email]>
>> Date: Thu, 14 Feb 2019 12:40:58 +0530
>>
>> I'm running an X toolkit build (master from around november) and very
>> recently I am losing all colours both under X and tty. Typically I start
>> emacs via --daemon and attach to it via both X and tty.
>>
>> What I mean is eg. M-x list-colors-display shows a buffer in which all
>> the the lines are displayed with foreground colour set to the default
>> foreground, background colour to the default background, and font set to
>> the default-font.  Same with happens M-x list-faces-display.  colours
>> set via font-lock still work.  Emacs starts off ok but somewhere this
>> gets triggered and I can't think of what I've been doing recently that
>> causes this.  Where do I start looking for the code which handles this?
>
> Does "M-x list-faces-display" also show all the faces the same, both
> colors and fonts?

Yes

> If so, it sounds like something is redefining all the faces, and you
> should look at your customizations related to faces.
>
> Thinking a bit more about this: if all the colors are suddenly lost,
> you should see it happening immediately, and so the last thing you did
> is a good starting point for looking for the culprit.

I haven't figured out what triggers the problem yet, but the clue is it
is related to global-font-lock-mode.

When the problem described occurs, global-font-lock-mode is t.

C-u C-x = on a piece of text which shows the bold face in the *Faces*
buffer shows:
,----
| There are text properties here:
|   button               (t)
|   category             help-face-button
|   fontified            t
|   help-args            (bold)
|   read-face-name       bold
`----

After setting (global-font-lock-mode -1) and reverting *Faces* restores
the list-faces-display as expected.

Now C-u C-x = shows
,----
| There are text properties here:
|   button               (t)
|   category             help-face-button
|   face                 bold
|   help-args            (bold)
|   read-face-name       bold
`----

So When the problem occurs all text is "fontified" and faces seem to
be ignored.

Still looking for another clue..
---Madhu


Reply | Threaded
Open this post in threaded view
|

Re: colours lost

Noam Postavsky
On Wed, 15 May 2019 at 09:15, Madhu <[hidden email]> wrote:

> I haven't figured out what triggers the problem yet, but the clue is it
> is related to global-font-lock-mode.
>
> When the problem described occurs, global-font-lock-mode is t.
>
> C-u C-x = on a piece of text which shows the bold face in the *Faces*
> buffer shows:
> ,----
> | There are text properties here:
> |   button               (t)
> |   category             help-face-button
> |   fontified            t
> |   help-args            (bold)
> |   read-face-name       bold
> `----
>
> After setting (global-font-lock-mode -1) and reverting *Faces* restores
> the list-faces-display as expected.
>
> Now C-u C-x = shows
> ,----
> | There are text properties here:
> |   button               (t)
> |   category             help-face-button
> |   face                 bold
> |   help-args            (bold)
> |   read-face-name       bold
> `----
>
> So When the problem occurs all text is "fontified" and faces seem to
> be ignored.

Sounds like it could be another instance of Bug#35481. Maybe you are
enabling some minor mode which calls font-lock-add-keywords or
similar?

See https://debbugs.gnu.org/35481 and also https://debbugs.gnu.org/35044.