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: Adding "face" in conjunction with gnus-posting-styles
Date: Mon, 30 Jul 2007 17:26:05 +0200	[thread overview]
Message-ID: <ln4pjlhq0i.fsf@googlemail.com> (raw)
In-Reply-To: <y68wswpnc2y.fsf@contents-vnder-pressvre.mit.edu>

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	other threads:[~2007-07-30 15:26 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-07-23 22:53 Hadron
2007-07-24 13:52 ` David Z Maze
2007-07-30 15:26   ` Hadron [this message]

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=ln4pjlhq0i.fsf@googlemail.com \
    --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).