]> code.delx.au - gnu-emacs/commitdiff
Merge from gnus--devo--0
authorMiles Bader <miles@gnu.org>
Mon, 23 Feb 2009 05:06:26 +0000 (05:06 +0000)
committerMiles Bader <miles@gnu.org>
Mon, 23 Feb 2009 05:06:26 +0000 (05:06 +0000)
Revision: emacs@sv.gnu.org/emacs--devo--0--patch-1552

doc/misc/ChangeLog
doc/misc/gnus.texi
lisp/gnus/ChangeLog
lisp/gnus/gnus-nocem.el

index 4b234b85bb25a9605e67e61366e26d237688e12e..0917c0d96ba0585fd521f97a054460abb9dc2fef 100644 (file)
@@ -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):
 2009-02-20  Juanma Barranquero  <lekktu@gmail.com>
 
        * ada-mode.texi (Project files, Automatic Casing):
index 9d2faf02509c28fb2f84d1658f1bf9d2541478d5..102d049e88375ccd5dfb6e7d6e90554f2b7a7ff0 100644 (file)
@@ -23833,7 +23833,8 @@ away.
 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
 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.
 
 Gnus can read and parse the messages in this group automatically, and
 this will make spam disappear.
@@ -23851,28 +23852,34 @@ In that case, Gnus scans NoCeM messages when checking new news if this
 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
 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
 
 @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
 @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
+people you want to listen to.  The default is:
+
 @lisp
 @lisp
-("Automoose-1" "clewis@@ferret.ocunix.on.ca"
- "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")
 @end lisp
 @end lisp
-fine, upstanding citizens all of them.
 
 Known despammers that you can put in this list are listed at@*
 @uref{http://www.xs4all.nl/~rosalind/nocemreg/nocemreg.html}.
 
 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 @@ The specs are applied left-to-right.
 
 @item gnus-nocem-verifyer
 @vindex gnus-nocem-verifyer
 
 @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
 @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
 
 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
 
 @item gnus-nocem-directory
 @vindex gnus-nocem-directory
@@ -23941,7 +23951,8 @@ issuers.
 @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
 @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
 
 
 @end table
 
index 0488b23ae6b61a479a3de9cca8e3454a3aad0cf4..57239349d5111987fc4ad3fe864e45a56e337034 100644 (file)
@@ -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.
 2009-02-15  Reiner Steib  <Reiner.Steib@gmx.de>
 
        * gnus-art.el (gnus-button-alist): Recognize Konqueror info links.
index 709ca538493b691593ec4cf32fc765dba08302cd..ba7d167315ede23096aa105c8d22d195813e77a7 100644 (file)
   :group 'gnus-score)
 
 (defcustom gnus-nocem-groups
   :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
   "*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
   :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.
   "*List of NoCeM issuers to pay attention to.
 
 This can also be a list of `(ISSUER CONDITION ...)' elements.
@@ -58,7 +61,34 @@ See <URL:http://www.xs4all.nl/~rosalind/nocemreg/nocemreg.html> for an
 issuer registry."
   :group 'gnus-nocem
   :link '(url-link "http://www.xs4all.nl/~rosalind/nocemreg/nocemreg.html")
 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/")
 
 (defcustom gnus-nocem-directory
   (nnheader-concat gnus-article-save-directory "NoCeM/")
@@ -71,14 +101,24 @@ issuer registry."
   :group 'gnus-nocem
   :type 'integer)
 
   :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.
   "*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
   :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-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.
 
 (defcustom gnus-nocem-liberal-fetch nil
   "*If t try to fetch all messages which have @@NCM in the subject.
@@ -392,6 +432,21 @@ valid issuer, which is much faster if you are selective about the issuers."
   (and gnus-nocem-hashtb
        (gethash id gnus-nocem-hashtb)))
 
   (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
 (provide 'gnus-nocem)
 
 ;; arch-tag: 0e0c74ea-2f8e-4f3e-8fff-09f767c1adef