[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Adding "face" in conjunction with gnus-posting-styles
From: |
David Z Maze |
Subject: |
Re: Adding "face" in conjunction with gnus-posting-styles |
Date: |
Tue, 24 Jul 2007 09:52:21 -0400 |
User-agent: |
Gnus/5.110006 (No Gnus v0.6) Emacs/21.4 (usg-unix-v) |
Hadron <hadronquark@googlemail.com> writes:
> I currently use the gnus-posting-styles attribute "x-face-file" which
> takes an xface file as a parameter.
>
> I wish to add a "face"
(Note that X-Face and Face are two different syntaxes; both declare a
48x48 graphic, but X-Face has a custom format for a black-and-white
bitmap, Face is a base64-encoded color PNG file.)
> Could someone help me integrate it into gnus-posting-styles so it only
> adds the face header if the group name contains "pattern".
I might do something like
(setq hq-face (gnus-face-from-file "~/.xfaces/face.jpeg"))
(setq gnus-posting-styles (("^gnu\\.emacs\\.gnus$" (face hq-face))))
Or, alternatively
(setq hq-face-file-name (expand-file-name "~/.xfaces/face.jpeg))
(setq gnus-posting-styles
'(("^gnu\\.emacs\\.gnus$"
(face (lambda () (gnus-face-from-file hq-face-file-name))))))
The first form should be more efficient in only building the face string
once (at load time); the second form will work if you change the file
name variable or contents of the file while Gnus is running. You could
also inline it into the posting styles variable itself.
info://gnus/Posting+Styles is pretty informative and has an extended
example you could probably work from.
--dzm