diff options
| author | Katsumi Yamaoka | 2010-10-07 12:31:39 +0000 |
|---|---|---|
| committer | Katsumi Yamaoka | 2010-10-07 12:31:39 +0000 |
| commit | fcf2d385f2b91b9cd24821ec8bf55fbfacd51ee7 (patch) | |
| tree | 490aeef94aaa16e70265cfe10726da07acf06085 | |
| parent | a7dcc87b1b2ce2c4d8c4d26a95cbdb3df1b67a20 (diff) | |
| download | emacs-fcf2d385f2b91b9cd24821ec8bf55fbfacd51ee7.tar.gz emacs-fcf2d385f2b91b9cd24821ec8bf55fbfacd51ee7.zip | |
[Gnus] Introduce gnus-gravatar-too-ugly.
gnus-gravatar.el (gnus-gravatar-too-ugly): New user option.
gnus-gravatar.el (gnus-gravatar-transform-address): Don't show avatars of people of which mail addresses match gnus-gravatar-too-ugly.
gnus.texi (Gravatars): Document gnus-gravatar-too-ugly.
| -rw-r--r-- | doc/misc/ChangeLog | 4 | ||||
| -rw-r--r-- | doc/misc/gnus.texi | 7 | ||||
| -rw-r--r-- | lisp/gnus/ChangeLog | 6 | ||||
| -rw-r--r-- | lisp/gnus/gnus-gravatar.el | 21 |
4 files changed, 34 insertions, 4 deletions
diff --git a/doc/misc/ChangeLog b/doc/misc/ChangeLog index 22208f6763d..2971701b1f2 100644 --- a/doc/misc/ChangeLog +++ b/doc/misc/ChangeLog | |||
| @@ -1,3 +1,7 @@ | |||
| 1 | 2010-10-07 Katsumi Yamaoka <yamaoka@jpl.org> | ||
| 2 | |||
| 3 | * gnus.texi (Gravatars): Document gnus-gravatar-too-ugly. | ||
| 4 | |||
| 1 | 2010-10-06 Julien Danjou <julien@danjou.info> | 5 | 2010-10-06 Julien Danjou <julien@danjou.info> |
| 2 | 6 | ||
| 3 | * sieve.texi (Manage Sieve API): Document sieve-manage-authenticate. | 7 | * sieve.texi (Manage Sieve API): Document sieve-manage-authenticate. |
diff --git a/doc/misc/gnus.texi b/doc/misc/gnus.texi index bc2adb87a35..1f78e8c563f 100644 --- a/doc/misc/gnus.texi +++ b/doc/misc/gnus.texi | |||
| @@ -827,6 +827,7 @@ Image Enhancements | |||
| 827 | * Smileys:: Show all those happy faces the way they were | 827 | * Smileys:: Show all those happy faces the way they were |
| 828 | meant to be shown. | 828 | meant to be shown. |
| 829 | * Picons:: How to display pictures of what you're reading. | 829 | * Picons:: How to display pictures of what you're reading. |
| 830 | * Gravatars:: Display the avatar of people you read. | ||
| 830 | * XVarious:: Other XEmacsy Gnusey variables. | 831 | * XVarious:: Other XEmacsy Gnusey variables. |
| 831 | 832 | ||
| 832 | Thwarting Email Spam | 833 | Thwarting Email Spam |
| @@ -23195,6 +23196,12 @@ number for the size is enough. | |||
| 23195 | @vindex gnus-gravatar-properties | 23196 | @vindex gnus-gravatar-properties |
| 23196 | List of image properties applied to Gravatar images. | 23197 | List of image properties applied to Gravatar images. |
| 23197 | 23198 | ||
| 23199 | @item gnus-gravatar-too-ugly | ||
| 23200 | @vindex gnus-gravatar-too-ugly | ||
| 23201 | Regexp that matches mail addresses or names of people of which avatars | ||
| 23202 | should not be displayed, or @code{nil}. It default to the value of | ||
| 23203 | @code{gnus-article-x-face-too-ugly} (@pxref{X-Face}). | ||
| 23204 | |||
| 23198 | @end table | 23205 | @end table |
| 23199 | 23206 | ||
| 23200 | If you want to see them in the From field, set: | 23207 | If you want to see them in the From field, set: |
diff --git a/lisp/gnus/ChangeLog b/lisp/gnus/ChangeLog index bb3d1ccacb6..2e07fa8798e 100644 --- a/lisp/gnus/ChangeLog +++ b/lisp/gnus/ChangeLog | |||
| @@ -1,3 +1,9 @@ | |||
| 1 | 2010-10-07 Katsumi Yamaoka <yamaoka@jpl.org> | ||
| 2 | |||
| 3 | * gnus-gravatar.el (gnus-gravatar-too-ugly): New user option. | ||
| 4 | (gnus-gravatar-transform-address): Don't show avatars of people of | ||
| 5 | which mail addresses match gnus-gravatar-too-ugly. | ||
| 6 | |||
| 1 | 2010-10-07 Lars Magne Ingebrigtsen <larsi@gnus.org> | 7 | 2010-10-07 Lars Magne Ingebrigtsen <larsi@gnus.org> |
| 2 | 8 | ||
| 3 | * shr.el (shr-table-widths): Expand TD elements to fill available | 9 | * shr.el (shr-table-widths): Expand TD elements to fill available |
diff --git a/lisp/gnus/gnus-gravatar.el b/lisp/gnus/gnus-gravatar.el index ecd9f753f5e..e974e9a8a89 100644 --- a/lisp/gnus/gnus-gravatar.el +++ b/lisp/gnus/gnus-gravatar.el | |||
| @@ -42,6 +42,13 @@ | |||
| 42 | :version "24.1" | 42 | :version "24.1" |
| 43 | :group 'gnus-gravatar) | 43 | :group 'gnus-gravatar) |
| 44 | 44 | ||
| 45 | (defcustom gnus-gravatar-too-ugly (if (boundp 'gnus-article-x-face-too-ugly) | ||
| 46 | gnus-article-x-face-too-ugly) | ||
| 47 | "Regexp matching posters whose avatar shouldn't be shown automatically." | ||
| 48 | :type '(choice regexp (const nil)) | ||
| 49 | :version "24.1" | ||
| 50 | :group 'gnus-gravatar) | ||
| 51 | |||
| 45 | (defun gnus-gravatar-transform-address (header category) | 52 | (defun gnus-gravatar-transform-address (header category) |
| 46 | (gnus-with-article-headers | 53 | (gnus-with-article-headers |
| 47 | (let ((addresses | 54 | (let ((addresses |
| @@ -55,10 +62,16 @@ | |||
| 55 | (mail-fetch-field header))))) | 62 | (mail-fetch-field header))))) |
| 56 | (let ((gravatar-size gnus-gravatar-size)) | 63 | (let ((gravatar-size gnus-gravatar-size)) |
| 57 | (dolist (address addresses) | 64 | (dolist (address addresses) |
| 58 | (gravatar-retrieve | 65 | (unless (and gnus-gravatar-too-ugly |
| 59 | (car address) | 66 | (or (string-match gnus-gravatar-too-ugly |
| 60 | 'gnus-gravatar-insert | 67 | (car address)) |
| 61 | (list header address category))))))) | 68 | (and (cdr address) |
| 69 | (string-match gnus-gravatar-too-ugly | ||
| 70 | (cdr address))))) | ||
| 71 | (gravatar-retrieve | ||
| 72 | (car address) | ||
| 73 | 'gnus-gravatar-insert | ||
| 74 | (list header address category)))))))) | ||
| 62 | 75 | ||
| 63 | (defun gnus-gravatar-insert (gravatar header address category) | 76 | (defun gnus-gravatar-insert (gravatar header address category) |
| 64 | "Insert GRAVATAR for ADDRESS in HEADER in current article buffer. | 77 | "Insert GRAVATAR for ADDRESS in HEADER in current article buffer. |