info-gnus-english
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Adding "face" in conjunction with gnus-posting-styles


From: Hadron
Subject: Re: Adding "face" in conjunction with gnus-posting-styles
Date: Mon, 30 Jul 2007 17:26:05 +0200

David Z Maze <dmaze@mit.edu> writes:

> 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

I recently "upgraded" my posting styles to use "rx". Much easier. I now
have:

(setq gnus-posting-styles
      `(

        (
         ,(rx(or "linux" "ubuntu" "ecb" "emacs" ))
         (name "Hadron")(address "hadronquark@googlemail.com")
         (x-face-file "~/.xfaces/hadron.xface")
         (organization "http://en.wikipedia.org/wiki/Quark";)
         (face (gnus-face-from-file "~/.xfaces/quark.jpg"))
         (eval (setq pgg-gpg-user-id "********"))
         )

;; *snip other clauses*

        )

)


reply via email to

[Prev in Thread] Current Thread [Next in Thread]