Mercurial > emacs
changeset 102204:cbe2949923c1
Merge from gnus--devo--0
Revision: emacs@sv.gnu.org/emacs--devo--0--patch-1552
author | Miles Bader <miles@gnu.org> |
---|---|
date | Mon, 23 Feb 2009 05:06:26 +0000 |
parents | fa34dcb3d716 |
children | 0f4ba7f17aa0 |
files | doc/misc/ChangeLog doc/misc/gnus.texi lisp/gnus/ChangeLog lisp/gnus/gnus-nocem.el |
diffstat | 4 files changed, 116 insertions(+), 33 deletions(-) [+] |
line wrap: on
line diff
--- a/doc/misc/ChangeLog Mon Feb 23 01:37:34 2009 +0000 +++ b/doc/misc/ChangeLog Mon Feb 23 05:06:26 2009 +0000 @@ -1,3 +1,12 @@ +2009-02-23 Katsumi Yamaoka <yamaoka@jpl.org> + + * gnus.texi (NoCeM): Fix description of gnus-use-nocem. + +2009-02-23 Katsumi Yamaoka <yamaoka@jpl.org> + + * gnus.texi (NoCeM): Update default values for gnus-nocem-groups, + gnus-nocem-issuers, and gnus-nocem-verifyer. + 2009-02-20 Juanma Barranquero <lekktu@gmail.com> * ada-mode.texi (Project files, Automatic Casing):
--- a/doc/misc/gnus.texi Mon Feb 23 01:37:34 2009 +0000 +++ b/doc/misc/gnus.texi Mon Feb 23 05:06:26 2009 +0000 @@ -23833,7 +23833,8 @@ What use are these NoCeM messages if the articles are canceled anyway? Some sites do not honor cancel messages and some sites just honor cancels from a select few people. Then you may wish to make use of the NoCeM -messages, which are distributed in the @samp{alt.nocem.misc} newsgroup. +messages, which are distributed in the newsgroups +@samp{news.lists.filters}, @samp{alt.nocem.misc}, etc. Gnus can read and parse the messages in this group automatically, and this will make spam disappear. @@ -23851,28 +23852,34 @@ value is not exceeding a group level that you specify as the prefix argument to some commands, e.g. @code{gnus}, @code{gnus-group-get-new-news}, etc. Otherwise, Gnus does not scan -NoCeM messages if you specify a group level to those commands. For -example, if you use 1 or 2 on the mail groups and the levels on the news -groups remain the default, 3 is the best choice. +NoCeM messages if you specify a group level that is smaller than this +value to those commands. For example, if you use 1 or 2 on the mail +groups and the levels on the news groups remain the default, 3 is the +best choice. @item gnus-nocem-groups @vindex gnus-nocem-groups Gnus will look for NoCeM messages in the groups in this list. The default is @lisp -("news.lists.filters" "news.admin.net-abuse.bulletins" - "alt.nocem.misc" "news.admin.net-abuse.announce") +("news.lists.filters" "alt.nocem.misc") @end lisp @item gnus-nocem-issuers @vindex gnus-nocem-issuers There are many people issuing NoCeM messages. This list says what -people you want to listen to. The default is -@lisp -("Automoose-1" "clewis@@ferret.ocunix.on.ca" - "cosmo.roadkill" "SpamHippo" "hweede@@snafu.de") -@end lisp -fine, upstanding citizens all of them. +people you want to listen to. The default is: + +@lisp +("Adri Verhoef" + "alba-nocem@@albasani.net" + "bleachbot@@httrack.com" + "news@@arcor-online.net" + "news@@uni-berlin.de" + "nocem@@arcor.de" + "pgpmoose@@killfile.org" + "xjsppl@@gmx.de") +@end lisp Known despammers that you can put in this list are listed at@* @uref{http://www.xs4all.nl/~rosalind/nocemreg/nocemreg.html}. @@ -23907,18 +23914,21 @@ @item gnus-nocem-verifyer @vindex gnus-nocem-verifyer +@findex gnus-nocem-epg-verify @findex pgg-verify This should be a function for verifying that the NoCeM issuer is who she -says she is. The default is @code{pgg-verify}, which returns -non-@code{nil} if the verification is successful, otherwise (including -the case the NoCeM message was not signed) returns @code{nil}. If this -is too slow and you don't care for verification (which may be dangerous), -you can set this variable to @code{nil}. +says she is. This variable defaults to @code{gnus-nocem-epg-verify} if +EasyPG is available, otherwise defaults to @code{pgg-verify}. The +function should return non-@code{nil} if the verification is successful, +otherwise (including the case the NoCeM message was not signed) should +return @code{nil}. If this is too slow and you don't care for +verification (which may be dangerous), you can set this variable to +@code{nil}. Formerly the default was @code{mc-verify}, which is a Mailcrypt function. While you can still use it, you can change it into -@code{pgg-verify} running with GnuPG if you are willing to add the -@acronym{PGP} public keys to GnuPG's keyring. +@code{gnus-nocem-epg-verify} or @code{pgg-verify} running with GnuPG if +you are willing to add the @acronym{PGP} public keys to GnuPG's keyring. @item gnus-nocem-directory @vindex gnus-nocem-directory @@ -23941,7 +23951,8 @@ @item gnus-nocem-check-article-limit @vindex gnus-nocem-check-article-limit If non-@code{nil}, the maximum number of articles to check in any NoCeM -group. NoCeM groups can be huge and very slow to process. +group. @code{nil} means no restriction. NoCeM groups can be huge and +very slow to process. @end table
--- a/lisp/gnus/ChangeLog Mon Feb 23 01:37:34 2009 +0000 +++ b/lisp/gnus/ChangeLog Mon Feb 23 05:06:26 2009 +0000 @@ -1,3 +1,11 @@ +2009-02-18 Katsumi Yamaoka <yamaoka@jpl.org> + + * gnus-nocem.el (gnus-nocem-groups): Remove invalid NoCeM groups. + (gnus-nocem-issuers): List currently active issuers; fix custom type. + (gnus-nocem-verifyer): Default to gnus-nocem-epg-verify if EasyPG is + available. + (gnus-nocem-epg-verify): New function. + 2009-02-15 Reiner Steib <Reiner.Steib@gmx.de> * gnus-art.el (gnus-button-alist): Recognize Konqueror info links.
--- a/lisp/gnus/gnus-nocem.el Mon Feb 23 01:37:34 2009 +0000 +++ b/lisp/gnus/gnus-nocem.el Mon Feb 23 05:06:26 2009 +0000 @@ -38,18 +38,21 @@ :group 'gnus-score) (defcustom gnus-nocem-groups - '("news.lists.filters" "news.admin.net-abuse.bulletins" - "alt.nocem.misc" "news.admin.net-abuse.announce") + '("news.lists.filters" "alt.nocem.misc") "*List of groups that will be searched for NoCeM messages." :group 'gnus-nocem + :version "23.1" :type '(repeat (string :tag "Group"))) (defcustom gnus-nocem-issuers - '("AutoMoose-1" ; CancelMoose[tm] - "clewis@ferret.ocunix" ; Chris Lewis - "cosmo.roadkill" - "SpamHippo" - "hweede@snafu.de") + '("Adri Verhoef" + "alba-nocem@albasani.net" + "bleachbot@httrack.com" + "news@arcor-online.net" + "news@uni-berlin.de" + "nocem@arcor.de" + "pgpmoose@killfile.org" + "xjsppl@gmx.de") "*List of NoCeM issuers to pay attention to. This can also be a list of `(ISSUER CONDITION ...)' elements. @@ -58,7 +61,34 @@ issuer registry." :group 'gnus-nocem :link '(url-link "http://www.xs4all.nl/~rosalind/nocemreg/nocemreg.html") - :type '(repeat (choice string sexp))) + :version "23.1" + :type '(repeat (cons :format "%v" (string :tag "Issuer") + (repeat :tag "Condition" + (group (checklist :inline t (const not)) + (regexp :tag "Type" :value ".*"))))) + :get (lambda (symbol) + (mapcar (lambda (elem) + (if (consp elem) + (cons (car elem) + (mapcar (lambda (elt) + (if (consp elt) elt (list elt))) + (cdr elem))) + (list elem))) + (default-value symbol))) + :set (lambda (symbol value) + (custom-set-default + symbol + (mapcar (lambda (elem) + (if (consp elem) + (if (cdr elem) + (mapcar (lambda (elt) + (if (consp elt) + (if (cdr elt) elt (car elt)) + elt)) + elem) + (car elem)) + elem)) + value)))) (defcustom gnus-nocem-directory (nnheader-concat gnus-article-save-directory "NoCeM/") @@ -71,14 +101,24 @@ :group 'gnus-nocem :type 'integer) -(defcustom gnus-nocem-verifyer 'pgg-verify +(defcustom gnus-nocem-verifyer (if (locate-library "epg") + 'gnus-nocem-epg-verify + 'pgg-verify) "*Function called to verify that the NoCeM message is valid. -One likely value is `pgg-verify'. If the function in this variable -isn't bound, the message will be used unconditionally." +If the function in this variable isn't bound, the message will be used +unconditionally." :group 'gnus-nocem - :type '(radio (function-item pgg-verify) + :version "23.1" + :type '(radio (function-item gnus-nocem-epg-verify) + (function-item pgg-verify) (function-item mc-verify) - (function :tag "other"))) + (function :tag "other")) + :set (lambda (symbol value) + (custom-set-default symbol + (if (and (eq value 'gnus-nocem-epg-verify) + (not (locate-library "epg"))) + 'pgg-verify + value)))) (defcustom gnus-nocem-liberal-fetch nil "*If t try to fetch all messages which have @@NCM in the subject. @@ -392,6 +432,21 @@ (and gnus-nocem-hashtb (gethash id gnus-nocem-hashtb))) +(autoload 'epg-make-context "epg") +(eval-when-compile + (autoload 'epg-verify-string "epg") + (autoload 'epg-context-result-for "epg") + (autoload 'epg-signature-status "epg")) + +(defun gnus-nocem-epg-verify () + "Return t if EasyPG verifies a signed message in the current buffer." + (let ((context (epg-make-context 'OpenPGP)) + result) + (epg-verify-string context (buffer-string)) + (and (setq result (epg-context-result-for context 'verify)) + (not (cdr result)) + (eq (epg-signature-status (car result)) 'good)))) + (provide 'gnus-nocem) ;; arch-tag: 0e0c74ea-2f8e-4f3e-8fff-09f767c1adef