[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: What's wrong with my face?
From: |
Tassilo Horn |
Subject: |
Re: What's wrong with my face? |
Date: |
Sat, 15 May 2004 13:48:56 +0200 |
User-agent: |
Gnus/5.110003 (No Gnus v0.3) Emacs/21.3.50 (gnu/linux) |
jesse@phiwumbda.org (Jesse F. Hughes) writes:
> Damn. It used to work. I wonder how I can find where the error
> lies. Any diagnostic help?
No dignostic help, but I use this code to insert a random face from
the JPG files (48x48 pixels) directory ~/.faces/.
(defun random-face-header-insert ()
(let* ((faces (directory-files "~/.faces" t "\\.jpg\\(\\.0\\)?$"))
(face (nth (random (length faces)) faces)))
(save-excursion
(goto-char (point-min))
(insert "Face: " (gnus-face-from-file face) "\n")
(when (string-match "0$" face)
(insert "Face: "
(gnus-face-from-file (replace-match face "0$" "1"))
"\n")))))
(add-hook 'message-send-hook 'random-face-header-insert)
HTH,
Tassilo
--
Microsoft isn't the answer. Microsoft is the question, and the answer is NO.