Gnus development mailing list
 help / color / mirror / Atom feed
* gnus-header-face-alist overriding other faces ?
@ 2003-12-29  2:00 Xavier Maillard
  2003-12-31  1:42 ` Lars Magne Ingebrigtsen
  0 siblings, 1 reply; 4+ messages in thread
From: Xavier Maillard @ 2003-12-29  2:00 UTC (permalink / raw)


[-- Attachment #1: Type: text/plain, Size: 1769 bytes --]

Hello,

It seems to me that 'gnus-header-face-alist' prevents other faces to be
displayed as they are defined.

For example if I set 'gnus-header-face-alist' to highlight 'From', 'To'
and 'Subject' headers, then all the other headers are displayed with a
default face. I don't like this behavior *at all* since I want all my
header faces to be honored as defined.

I know the function is 'gnus-article-highlight-headers' but as I am
still quite limited with gnus internals, I am not yet able to modify it
according to your coding styles/designs. 

Any chance someone can modify it to allow to highlight the headers
according to either 'gnus-header-face-alist' and/or other faces ?

Dunno how difficult it would be but I am pretty sure that there are
competent people reading this list :)

Thank you !

zeDek

P.S: for readers, here is what the docstring says about
'gnus-header-face-alist': 

,----[ C-h v gnus-header-face-alist RET ]
| gnus-header-face-alist's value is 
| (("Date" gnus-header-name-face gnus-header-from-face)
|  ("X-GPG\\|X-PGP\\|X-Gpg" gnus-header-name-face my-gnus-gpg-face))
| 
| 
| *Controls highlighting of article headers.
| 
| An alist of the form (HEADER NAME CONTENT).
| 
| HEADER is a regular expression which should match the name of a
| header and NAME and CONTENT are either face names or nil.
| 
| The name of each header field will be displayed using the face
| specified by the first element in the list where HEADER matches
| the header name and NAME is non-nil.  Similarly, the content will
| be displayed by the first non-nil matching CONTENT face.
| 
| You can customize this variable.
| 
| Defined in `gnus-art'.
| 
| [back]
`----

-- 
  "GNU is my religion"

.O.  Xavier Maillard 
..O   Reims - France 
OOO  +33 6 62 59 68 62 


[-- Attachment #2: Type: application/pgp-signature, Size: 188 bytes --]

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

* Re: gnus-header-face-alist overriding other faces ?
  2003-12-29  2:00 gnus-header-face-alist overriding other faces ? Xavier Maillard
@ 2003-12-31  1:42 ` Lars Magne Ingebrigtsen
  2003-12-31  8:38   ` Xavier Maillard
  0 siblings, 1 reply; 4+ messages in thread
From: Lars Magne Ingebrigtsen @ 2003-12-31  1:42 UTC (permalink / raw)


Xavier Maillard <zedek@gnu-rox.org> writes:

> It seems to me that 'gnus-header-face-alist' prevents other faces to be
> displayed as they are defined.
>
> For example if I set 'gnus-header-face-alist' to highlight 'From', 'To'
> and 'Subject' headers, then all the other headers are displayed with a
> default face. I don't like this behavior *at all* since I want all my
> header faces to be honored as defined.

I don't quite follow you.  Defined where by what?

-- 
(domestic pets only, the antidote for overdose, milk.)
  larsi@gnus.org * Lars Magne Ingebrigtsen




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

* Re: gnus-header-face-alist overriding other faces ?
  2003-12-31  1:42 ` Lars Magne Ingebrigtsen
@ 2003-12-31  8:38   ` Xavier Maillard
  2004-01-02 19:56     ` Lars Magne Ingebrigtsen
  0 siblings, 1 reply; 4+ messages in thread
From: Xavier Maillard @ 2003-12-31  8:38 UTC (permalink / raw)


[-- Attachment #1: Type: text/plain, Size: 2278 bytes --]

On 31 Dec 2003, Lars Magne Ingebrigtsen<larsi@gnus.org> said:
> Xavier Maillard <zedek@gnu-rox.org> writes:
>
>> It seems to me that 'gnus-header-face-alist' prevents other faces to
>> be displayed as they are defined.
>>
>> For example if I set 'gnus-header-face-alist' to highlight 'From',
>> 'To' and 'Subject' headers, then all the other headers are displayed
>> with a default face. I don't like this behavior *at all* since I want
>> all my header faces to be honored as defined.
>
> I don't quite follow you.  Defined where by what?

Ok.

Let's say I have this as my g-h-f-a variable:

(setq gnus-header-face-alist's value is 
(("From" nil gnus-header-from-face)
 ("Newsgroups:.*," nil gnus-header-newsgroups-face)
 ("" gnus-header-name-face gnus-header-content-face)))

This would render my gnus-article with those Faces and it will show me
the different part of the headers using those faces. Here only From and
Newsgroups headers will be rendered with custom faces. The rest will
use the faces defined in the "" part.

Now let's imagine I also have something like this:

(set-face-foreground 'gnus-header-subject-face "rosy brown")
(set-face-bold-p 'gnus-header-subject-face t)

With this I can expect Gnus to display the "Subject" header with rosy
brown color and the text should be bold.

Here is the problem, the subject part won't be displayed using the face
gnus-header-subject-face but ones in the "" part of g-h-f-a.

I suspect that it is not the expected behavior and so I was asking to
have a slightly different one. That is to say respects the g-h-f-a
variable and also the possibly defined other faces.

In fact I was thinking to use g-h-f-a to add more stuff to be hilighted
(for example adding new faces to display X- headers). But AFAIK it
won't be possible with the current implementation.

I hope you will understand now. The current workaround I am using now
is to add face definitions with hooking (using
gnus-article-prepare-hook). That way I can use either
gnus-header-face-alist own face definitions and the default one with
face-spec-set.

Maybe this is the way to go normally but as I am not sure...

zeDek
-- 
Xavier Maillard
7 rue Jeanne Jugan, 51100 Reims, France
phone: +33 3 26 77 02 21, mobile: +33 6 62 59 68 62
email: zedek@gnu-rox.org


[-- Attachment #2: Type: application/pgp-signature, Size: 188 bytes --]

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

* Re: gnus-header-face-alist overriding other faces ?
  2003-12-31  8:38   ` Xavier Maillard
@ 2004-01-02 19:56     ` Lars Magne Ingebrigtsen
  0 siblings, 0 replies; 4+ messages in thread
From: Lars Magne Ingebrigtsen @ 2004-01-02 19:56 UTC (permalink / raw)


Xavier Maillard <zedek@gnu-rox.org> writes:

> (setq gnus-header-face-alist's value is 
> (("From" nil gnus-header-from-face)
>  ("Newsgroups:.*," nil gnus-header-newsgroups-face)
>  ("" gnus-header-name-face gnus-header-content-face)))
>
> This would render my gnus-article with those Faces and it will show me
> the different part of the headers using those faces. Here only From and
> Newsgroups headers will be rendered with custom faces. The rest will
> use the faces defined in the "" part.

Yes...

> Now let's imagine I also have something like this:
>
> (set-face-foreground 'gnus-header-subject-face "rosy brown")
> (set-face-bold-p 'gnus-header-subject-face t)
>
> With this I can expect Gnus to display the "Subject" header with rosy
> brown color and the text should be bold.

No, you've specified that the Subject headers should be displayed
with `gnus-header-content-face'.  If you want the Subject header to
be displayed with a different face, you have to add a rule to have
the Subject header displayed with a different face.

-- 
(domestic pets only, the antidote for overdose, milk.)
  larsi@gnus.org * Lars Magne Ingebrigtsen




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

end of thread, other threads:[~2004-01-02 19:56 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2003-12-29  2:00 gnus-header-face-alist overriding other faces ? Xavier Maillard
2003-12-31  1:42 ` Lars Magne Ingebrigtsen
2003-12-31  8:38   ` Xavier Maillard
2004-01-02 19:56     ` Lars Magne Ingebrigtsen

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 NNTP newsgroup(s).