[ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
X-Face
headers describe a 48x48 pixel black-and-white (1 bit
depth) image that's supposed to represent the author of the message.
It seems to be supported by an ever-growing number of mail and news
readers.
Decoding an X-Face
header either requires an Emacs that has
`compface' support (which most XEmacs versions has), or that you
have `compface' installed on your system. If either is true,
Gnus will default to displaying X-Face
headers.
The variable that controls this is the
gnus-article-x-face-command
variable. If this variable is a
string, this string will be executed in a sub-shell. If it is a
function, this function will be called with the face as the argument.
If the gnus-article-x-face-too-ugly
(which is a regexp) matches
the From
header, the face will not be shown.
The default action under Emacs 20 is to fork off the display
program(3) to
view the face.
Under XEmacs or Emacs 21+ with suitable image support, the default
action is to display the face before the From
header. (It's
nicer if XEmacs has been compiled with X-Face
support--that
will make display somewhat faster. If there's no native X-Face
support, Gnus will try to convert the X-Face
header using
external programs from the pbmplus
package and
friends.(4))
(Note: x-face
is used in the variable/function names, not
xface
).
Gnus provides a few convenience functions and variables to allow easier insertion of X-Face headers in outgoing messages.
gnus-random-x-face
goes through all the `pbm' files in
gnus-x-face-directory
and picks one at random, and then
converts it to the X-Face format by using the
gnus-convert-pbm-to-x-face-command
shell command. The
`pbm' files should be 48x48 pixels big. It returns the X-Face
header data as a string.
gnus-insert-random-x-face-header
calls
gnus-random-x-face
and inserts a `X-Face' header with the
randomly generated data.
gnus-x-face-from-file
takes a GIF file as the parameter, and then
converts the file to X-Face format by using the
gnus-convert-image-to-x-face-command
shell command.
Here's how you would typically use the first function. Put something like the following in your `~/.gnus.el' file:
(setq message-required-news-headers (nconc message-required-news-headers (list '(X-Face . gnus-random-x-face)))) |
Using the last function would be something like this:
(setq message-required-news-headers (nconc message-required-news-headers (list '(X-Face . (lambda () (gnus-x-face-from-file "~/My-face.gif")))))) |
[ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |