Announcements and discussions for Gnus, the GNU Emacs Usenet newsreader
 help / color / mirror / Atom feed
From: Hadron <hadronquark@googlemail.com>
To: info-gnus-english@gnu.org
Subject: Re: User agent highlighting in gnus
Date: Mon, 20 Aug 2007 16:43:17 +0200	[thread overview]
Message-ID: <igwsvqxo56.fsf@homelinux.net> (raw)
In-Reply-To: <v9tzqvxjw0.fsf@marauder.physik.uni-ulm.de>

Reiner Steib <reinersteib+gmane@imap.cc> writes:

> On Sun, Aug 19 2007, Hadron wrote:
>
>> Could you explain this block. Not being a lisp programmer I can't really
>> see how to set a nice "loud" face for all User-Agent or X-Newsreader with
>> "Mutt" in and another font for either with "Gnus"  in and another for
>> either with any other face again.
>
> (add-to-list
>  'gnus-header-face-alist
>  (list (concat
> 	"^"
> 	(regexp-opt '("User-Agent" "X-Mailer" "Newsreader" "X-Newsreader") t)
> 	":.*Mutt")
>        nil your-mutt-face))
>
> (add-to-list
>  'gnus-header-face-alist
>  (list (concat
> 	"^"
> 	(regexp-opt '("User-Agent" "X-Mailer" "Newsreader" "X-Newsreader") t)
> 	":.*Gnus")
>        nil your-gnus-face))
>
> (add-to-list
>  'gnus-header-face-alist
>  (list (concat
> 	"^"
> 	(regexp-opt '("User-Agent" "X-Mailer" "Newsreader" "X-Newsreader") t)
> 	":.*") ;; other
>        nil your-other-reader-face))
>
> You need to defface your-*-face.  I'm not sure if the order works in
> this way.  You may have to change it or add the APPEND argument of
> `add-to-list'.
>
> Bye, Reiner.

Just for google completion:

Other way around - here I hilite gnus and Outlook type and used quoting
for the face names available from list-faces-display from the facemenu+
library from drew adams.

,----
| (add-to-list
|  'gnus-header-face-alist
|  (list (concat
| 	"^"
| 	(regexp-opt '("User-Agent" "X-Mailer" "Newsreader" "X-Newsreader") t)
| 	":.*") ;; other
|        nil font-lock-comment-face))
| 
| (add-to-list
|  'gnus-header-face-alist
|  (list (concat
| 	"^"
| 	(regexp-opt '("User-Agent" "X-Mailer" "Newsreader" "X-Newsreader") t)
| 	":.*Outlook.*")
|        nil 'gnus-emphasis-highlight-words))
| 
| (add-to-list
|  'gnus-header-face-alist
|  (list (concat
| 	"^"
| 	(regexp-opt '("User-Agent" "X-Mailer" "Newsreader" "X-Newsreader") t)
| 	":.*Gnus.*")
|        nil 'gnus-server-opened))
| 
`----

  reply	other threads:[~2007-08-20 14:43 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <fa7ov3$1kjv$1@talisker.lacave.net>
2007-08-19  9:08 ` Reiner Steib
2007-08-19 14:01   ` Xavier Maillard
2007-08-19 16:23     ` Reiner Steib
2007-08-19 16:38   ` Hadron
2007-08-19 22:02     ` Reiner Steib
2007-08-20 14:43       ` Hadron [this message]
2007-08-21 14:38         ` Steffen Schwigon
2007-08-21 14:52           ` Simias
2007-08-22 12:38             ` Steffen Schwigon
2007-08-21 15:39           ` Hadron

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=igwsvqxo56.fsf@homelinux.net \
    --to=hadronquark@googlemail.com \
    --cc=info-gnus-english@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).