Discussion:
Colours gone
(too old to reply)
Richmond
2020-02-18 14:32:02 UTC
Permalink
After upgrading to 27 I've lost some colour settings affecting the gnus
list of groups, list of articles. It used to show groups with unread
articles in a different colour. I am also getting error messages about
"invalid face" (a bit of a cheek!)

What can I do about these? Do I need to install faces?
Emanuel Berg
2020-02-18 15:42:49 UTC
Permalink
Post by Richmond
After upgrading to 27 I've lost some colour
settings affecting the gnus list of groups,
list of articles. It used to show groups with
unread articles in a different colour. I am
also getting error messages about "invalid
face" (a bit of a cheek!)
What can I do about these? Do I need to
install faces?
You can use this to find out what face
something is:

(defun what-face (pos)
(interactive "d")
(let((face (or (get-char-property pos 'face)
(get-char-property pos 'read-cf-name) )))
(message " Face: %s" (or face "(no face!)")) ))
(defalias 'wf #'what-face)

Then do, for example:

(modify-face 'gnus-group-mail-1 "cyan" nil nil t)

https://dataswamp.org/~incal/emacs-init/faces.el
--
underground experts united
http://user.it.uu.se/~embe8573
https://dataswamp.org/~incal
Richmond
2020-02-18 17:36:20 UTC
Permalink
Post by Emanuel Berg
Post by Richmond
After upgrading to 27 I've lost some colour
settings affecting the gnus list of groups,
list of articles. It used to show groups with
unread articles in a different colour. I am
also getting error messages about "invalid
face" (a bit of a cheek!)
What can I do about these? Do I need to
install faces?
You can use this to find out what face
(defun what-face (pos)
(interactive "d")
(let((face (or (get-char-property pos 'face)
(get-char-property pos 'read-cf-name) )))
(message " Face: %s" (or face "(no face!)")) ))
(defalias 'wf #'what-face)
(modify-face 'gnus-group-mail-1 "cyan" nil nil t)
https://dataswamp.org/~incal/emacs-init/faces.el
OK what-face says the face in question is gnus-summary-high-read-face but when
I put (modify-face 'gnus-summary-high-read-face "cyan" nil nil t) into
.gnus it says invalid face.

Debugger entered--Lisp error: (error "Invalid face" gnus-summary-high-read-face)
internal-set-lisp-face-attribute(gnus-summary-high-read-face :foreground "cyan" 0)

Maybe it has to be in the context of gnus running?

The link above was broken. But I found this, not sure what it is telling
me.

https://dataswamp.org/~incal/emacs-init/test-faces.el
Adam Sjøgren
2020-02-18 17:47:03 UTC
Permalink
Post by Richmond
OK what-face says the face in question is gnus-summary-high-read-face
That face was marked as obsolete in 2009:

commit 3d493bef43be9d2cc91152043103156d5717d33f
Author: Glenn Morris <***@gnu.org>
Date: Wed Sep 2 03:04:15 2009 +0000

Mark face aliases with "-face" in the name as obsolete.

· http://git.savannah.gnu.org/cgit/emacs.git/commit/?id=3d493bef43

I guess after 11 years it finally got removed. Yup:

commit 66d83ce01125e8029efa454ece4e39e9567805e2
Author: Glenn Morris <***@gnu.org>
Date: Wed Jan 10 15:39:06 2018 -0500

Remove Gnus face aliases obsolete since 22.1

* lisp/gnus/gnus-art.el, lisp/gnus/gnus-cite.el:
* lisp/gnus/gnus-srvr.el, lisp/gnus/gnus.el:
* lisp/gnus/spam.el: Remove face "-face" aliases, obsolete since 22.1.

· http://git.savannah.gnu.org/cgit/emacs.git/commit/?id=66d83ce011

Ok, only 8½ years later.

So you'll probably have to remove "-face" in some places in your
configuration.


Best regards,

Adam
--
"You gotta realize, you can kill somebody with Adam Sjøgren
kindness too." ***@koldfront.dk
Emanuel Berg
2020-02-18 17:52:44 UTC
Permalink
Post by Richmond
Maybe it has to be in the context of gnus running?
The link above was broken.
Thanks for telling me, now the URL is fixed.
The correct one should be:

https://dataswamp.org/~incal/emacs-init/my-faces.el
Post by Richmond
But I found this, not sure what it is
telling me.
https://dataswamp.org/~incal/emacs-init/test-faces.el
That's something else, to see how the colors
look when actually displayed.

It sounds like you have it misconfigured
somehow.

You don't need anything on these URLs, they are
just examples how it can look and what you
can do.

Just require everything, then set the faces,
byte compile, correct warnings and
errors, do it again, done. Easy.
--
underground experts united
http://user.it.uu.se/~embe8573
https://dataswamp.org/~incal
Richmond
2020-02-18 18:14:18 UTC
Permalink
Post by Emanuel Berg
Post by Richmond
Maybe it has to be in the context of gnus running?
The link above was broken.
Thanks for telling me, now the URL is fixed.
https://dataswamp.org/~incal/emacs-init/my-faces.el
Post by Richmond
But I found this, not sure what it is
telling me.
https://dataswamp.org/~incal/emacs-init/test-faces.el
That's something else, to see how the colors
look when actually displayed.
It sounds like you have it misconfigured
somehow.
You don't need anything on these URLs, they are
just examples how it can look and what you
can do.
Just require everything, then set the faces,
byte compile, correct warnings and
errors, do it again, done. Easy.
I am afraid I am completely out of my depth. I don't know where these
faces came from. I see they are in the file .gnu-emacs, but I have never
edited that file.

Here is an extract:

(add-hook 'gnus-startup-hook
'(lambda ()
(setq gnus-subscribe-newsgroup-method
'(lambda (newsgroup)
(gnus-subscribe-newsgroup newsgroup)
(gnus-kill-newsgroup newsgroup)))
(setq gnus-use-generic-from t)
;; highlighting and menu in GNUS
(if (or (and (= emacs-major-version 19) (> emacs-minor-version 29))
(> emacs-major-version 19))
(progn
(setq gnus-visual '(highlight menu))
(setq gnus-group-highlight
'(;; News.
((and (> unread 100) (not mailp)) . gnus-summary-high-ticked-face)
((and (> unread 0) (not mailp)) . gnus-summary-high-read-face)
((and (= unread 0) (not mailp)) . gnus-summary-high-ancient-face)
((not mailp) . gnus-summary-normal-ancient-face)
;; Mail.
((and (= unread 0) (eq level 1)) . gnus-group-mail-1-empty-face)
((eq level 1) . gnus-group-mail-1-face)
((and (= unread 0) (eq level 2)) . gnus-group-mail-2-empty-face)
((eq level 2) . gnus-group-mail-2-face)
((and (= unread 0) (eq level 3)) . gnus-group-mail-3-empty-face)
((eq level 3) . gnus-group-mail-3-face)
((= unread 0) . gnus-group-mail-low-empty-face)
(t . gnus-group-mail-low-face)))
)))
)
Eric Abrahamsen
2020-02-18 20:13:51 UTC
Permalink
Post by Richmond
Post by Emanuel Berg
Post by Richmond
Maybe it has to be in the context of gnus running?
The link above was broken.
Thanks for telling me, now the URL is fixed.
https://dataswamp.org/~incal/emacs-init/my-faces.el
Post by Richmond
But I found this, not sure what it is
telling me.
https://dataswamp.org/~incal/emacs-init/test-faces.el
That's something else, to see how the colors
look when actually displayed.
It sounds like you have it misconfigured
somehow.
You don't need anything on these URLs, they are
just examples how it can look and what you
can do.
Just require everything, then set the faces,
byte compile, correct warnings and
errors, do it again, done. Easy.
I am afraid I am completely out of my depth. I don't know where these
faces came from. I see they are in the file .gnu-emacs, but I have never
edited that file.
Looks like you're using this person's dotfiles:

https://github.com/clauseggers/dotfiles/blob/master/.gnu-emacs

As for why you're doing that, no one else can tell you :)

That's also the config that's doing automatic new-group subscription,
from your earlier message. If I were you I would set this code aside and
start your config from scratch. It's a bit of a pain to start with, but
will result in fewer subsequent mysteries.
Richmond
2020-02-18 20:55:44 UTC
Permalink
Post by Eric Abrahamsen
Post by Richmond
Post by Emanuel Berg
Post by Richmond
Maybe it has to be in the context of gnus running?
The link above was broken.
Thanks for telling me, now the URL is fixed.
https://dataswamp.org/~incal/emacs-init/my-faces.el
Post by Richmond
But I found this, not sure what it is
telling me.
https://dataswamp.org/~incal/emacs-init/test-faces.el
That's something else, to see how the colors
look when actually displayed.
It sounds like you have it misconfigured
somehow.
You don't need anything on these URLs, they are
just examples how it can look and what you
can do.
Just require everything, then set the faces,
byte compile, correct warnings and
errors, do it again, done. Easy.
I am afraid I am completely out of my depth. I don't know where these
faces came from. I see they are in the file .gnu-emacs, but I have never
edited that file.
https://github.com/clauseggers/dotfiles/blob/master/.gnu-emacs
As for why you're doing that, no one else can tell you :)
That's also the config that's doing automatic new-group subscription,
from your earlier message. If I were you I would set this code aside and
start your config from scratch. It's a bit of a pain to start with, but
will result in fewer subsequent mysteries.
I think this may have come from OpenSUSE. At the top of the file it
says:

Copyright 1993-2001 Werner Fink
Copyright (c) 1996-2001 SuSE Gmbh Nuernberg, Germany.
All rights reserved.

I never edit these files, neither .gnu-emacs or .gnu-emacs-custom, so I
don't know what is going on in there.
Richmond
2020-02-19 13:48:56 UTC
Permalink
Post by Richmond
I never edit these files, neither .gnu-emacs or .gnu-emacs-custom, so I
don't know what is going on in there.
This has been a voyage of discovery. I found that running emacs gnus on
the virtual console, I was not able to see some of the headers, like
From: Subject: and that when I tried to reconfigure them the cursor
vanished too! But this is only when using a virtual console in
non-graphical mode, as defined by grub. Using graphical mode it seemed
ok. The solution is to use X and reconfigure the face.

I also tried using --color=never to get around these problems but it
still uses colours.

There should perhaps be a two colour mode for emacs/gnus.

Thanks for your help!
Eric Abrahamsen
2020-02-19 17:18:45 UTC
Permalink
Post by Richmond
Post by Richmond
I never edit these files, neither .gnu-emacs or .gnu-emacs-custom, so I
don't know what is going on in there.
This has been a voyage of discovery.
Well that's really the whole point :)

Loading...