* spam.el/spam-report.el: Gmane spam reporting broken in No Gnus
@ 2005-09-08 15:07 Reiner Steib
2005-09-20 16:38 ` Ted Zlatanov
0 siblings, 1 reply; 7+ messages in thread
From: Reiner Steib @ 2005-09-08 15:07 UTC (permalink / raw)
Hi,
spam reporting for gmane.* groups is broken in the trunk. Here's a
minimal setup:
--8<---------------cut here---------------start------------->8---
(setq
spam-report-gmane-use-article-number nil
spam-report-url-ping-function 'spam-report-url-to-file)
gnus-parameters '(("^gmane\\."
(spam-process
(gnus-group-spam-exit-processor-report-gmane)))))
(spam-initialize)
--8<---------------cut here---------------end--------------->8---
To reproduce:
Enter gmane.emacs.bugs, find a spam article, mark it with `S x', quit
the group with `q'.
Expected behavior (*Messages* buffer):
,----[ v5-10 branch ]
| Exiting summary buffer and applying spam rules
| Registering 1 articles with classification spam, check spam-use-gmane
| Reporting spam article 3981 to spam.gmane.org...
| Reporting spam through URL http://spam.gmane.org/gmane.emacs.bugs/12939...
`----
Current behavior (*Messages* buffer):
,----[ No Gnus ]
| Exiting summary buffer and applying spam rules
| Registering 1 specific articles as spam using backend spam-use-move
| 1 spam messages were registered by backend spam-use-move.
`----
It's an NNTP group, so "move" makes no sense. No report URL is put
into `spam-report-requests-file'. The function `spam-report-gmane' is
not called at all.
I guess the problem is related to the changes WRT
`spam-summary-exit-behavior' and `spam-group-processor-p'. But I
don't grok how it's supposed to work.
I found out, that the Gmane entry has been removed from
`spam-list-of-processors' ("The OBSOLETE `spam-list-of-processors'
list."), but re-adding it didn't help:
--8<---------------cut here---------------start------------->8---
--- spam.el 26 Aug 2005 14:10:04 +0200 7.72
+++ spam.el 08 Sep 2005 16:13:37 +0200
@@ -1237,7 +1237,8 @@
(defvar spam-list-of-processors
;; note the nil processors are not defined in gnus.el
- '((gnus-group-spam-exit-processor-bogofilter spam spam-use-bogofilter)
+ '((gnus-group-spam-exit-processor-report-gmane spam spam-use-gmane)
+ (gnus-group-spam-exit-processor-bogofilter spam spam-use-bogofilter)
(gnus-group-spam-exit-processor-bsfilter spam spam-use-bsfilter)
(gnus-group-spam-exit-processor-blacklist spam spam-use-blacklist)
(gnus-group-spam-exit-processor-ifile spam spam-use-ifile)
--8<---------------cut here---------------end--------------->8---
Bye, Reiner.
--
,,,
(o o)
---ooO-(_)-Ooo--- | PGP key available | http://rsteib.home.pages.de/
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: spam.el/spam-report.el: Gmane spam reporting broken in No Gnus
2005-09-08 15:07 spam.el/spam-report.el: Gmane spam reporting broken in No Gnus Reiner Steib
@ 2005-09-20 16:38 ` Ted Zlatanov
2005-09-20 18:19 ` Reiner Steib
0 siblings, 1 reply; 7+ messages in thread
From: Ted Zlatanov @ 2005-09-20 16:38 UTC (permalink / raw)
On Thu, 08 Sep 2005, reinersteib+gmane@imap.cc wrote:
> spam reporting for gmane.* groups is broken in the trunk. Here's a
> minimal setup:
>
> --8<---------------cut here---------------start------------->8---
> (setq
> spam-report-gmane-use-article-number nil
> spam-report-url-ping-function 'spam-report-url-to-file)
> gnus-parameters '(("^gmane\\."
> (spam-process
> (gnus-group-spam-exit-processor-report-gmane)))))
> (spam-initialize)
> --8<---------------cut here---------------end--------------->8---
Again, sorry for the late response.
Can you try to use (spam spam-use-gmane) instead of
gnus-group-spam-exit-processor-report-gmane?
> To reproduce:
>
> Enter gmane.emacs.bugs, find a spam article, mark it with `S x', quit
> the group with `q'.
>
> Expected behavior (*Messages* buffer):
>
> ,----[ v5-10 branch ]
>| Exiting summary buffer and applying spam rules
>| Registering 1 articles with classification spam, check spam-use-gmane
>| Reporting spam article 3981 to spam.gmane.org...
>| Reporting spam through URL http://spam.gmane.org/gmane.emacs.bugs/12939...
> `----
>
> Current behavior (*Messages* buffer):
>
> ,----[ No Gnus ]
>| Exiting summary buffer and applying spam rules
>| Registering 1 specific articles as spam using backend spam-use-move
>| 1 spam messages were registered by backend spam-use-move.
> `----
>
> It's an NNTP group, so "move" makes no sense.
By default we do spam-use-move (to move spam out of the group, if
there are spam-process-destinations) and it knows that if a group is
read-only, a copy should be done instead.
> No report URL is put into `spam-report-requests-file'. The function
> `spam-report-gmane' is not called at all.
>
> I guess the problem is related to the changes WRT
> `spam-summary-exit-behavior' and `spam-group-processor-p'. But I
> don't grok how it's supposed to work.
>
> I found out, that the Gmane entry has been removed from
> `spam-list-of-processors' ("The OBSOLETE `spam-list-of-processors'
> list."), but re-adding it didn't help:
>
> --8<---------------cut here---------------start------------->8---
> --- spam.el 26 Aug 2005 14:10:04 +0200 7.72
> +++ spam.el 08 Sep 2005 16:13:37 +0200
> @@ -1237,7 +1237,8 @@
>
> (defvar spam-list-of-processors
> ;; note the nil processors are not defined in gnus.el
> - '((gnus-group-spam-exit-processor-bogofilter spam spam-use-bogofilter)
> + '((gnus-group-spam-exit-processor-report-gmane spam spam-use-gmane)
> + (gnus-group-spam-exit-processor-bogofilter spam spam-use-bogofilter)
> (gnus-group-spam-exit-processor-bsfilter spam spam-use-bsfilter)
> (gnus-group-spam-exit-processor-blacklist spam spam-use-blacklist)
> (gnus-group-spam-exit-processor-ifile spam spam-use-ifile)
> --8<---------------cut here---------------end--------------->8---
If you can test as I showed above, that would help me determine if the
bug is in the Gmane reporting or just the backwards compatibility.
Thanks
Ted
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: spam.el/spam-report.el: Gmane spam reporting broken in No Gnus
2005-09-20 16:38 ` Ted Zlatanov
@ 2005-09-20 18:19 ` Reiner Steib
2005-09-21 14:45 ` Ted Zlatanov
0 siblings, 1 reply; 7+ messages in thread
From: Reiner Steib @ 2005-09-20 18:19 UTC (permalink / raw)
On Tue, Sep 20 2005, Ted Zlatanov wrote:
> On Thu, 08 Sep 2005, reinersteib+gmane@imap.cc wrote:
[...]
> Can you try to use (spam spam-use-gmane) instead of
> gnus-group-spam-exit-processor-report-gmane?
Then it works:
--8<---------------cut here---------------start------------->8---
(setq
gnus-verbose 10
spam-report-gmane-use-article-number nil
spam-report-url-ping-function 'spam-report-url-to-file
gnus-parameters '(("^gmane\\."
(spam-process
((spam spam-use-gmane))))))
(spam-initialize)
--8<---------------cut here---------------end--------------->8---
>> I found out, that the Gmane entry has been removed from
>> `spam-list-of-processors' ("The OBSOLETE `spam-list-of-processors'
>> list."), but re-adding it didn't help:
[...]
> If you can test as I showed above, that would help me determine if the
> bug is in the Gmane reporting or just the backwards compatibility.
It seems it's in the backwards compatibility. With this patch [1],
`spam-report-url-to-file' still is not called using this settings:
--8<---------------cut here---------------start------------->8---
(setq
spam-report-gmane-use-article-number nil
spam-report-url-ping-function 'spam-report-url-to-file
gnus-parameters '(("^gmane\\."
(spam-process
(gnus-group-spam-exit-processor-report-gmane)))))
(spam-initialize)
--8<---------------cut here---------------end--------------->8---
I'm a little confused about the obsolescence: In [v5-10]/lisp/spam.el
`spam-list-of-processors' does not seem to be obsolete (CMIIW,
please). But in the manual, there is:
,----[ [v5-10]/texi/gnus.texi ]
| @emph{WARNING}
|
| Instead of the obsolete
| @code{gnus-group-spam-exit-processor-report-gmane}, it is recommended
| that you use @code{'(spam spam-use-gmane)}. Everything will work the
| same way, we promise.
`----
While at it: In the v5-10 branch, there's the following comment:
,----[ [v5-10]/lisp/spam.el ]
| ;; note that spam-use-gmane is not a legitimate check
| (spam-use-gmane nil
| spam-report-gmane-register-routine
| ;; does Gmane support unregistration?
| nil
| nil)
`----
Gmane supports unregistration: You can reverse the report
http://spam.gmane.org/gmane.foo.bar:1234 with
http://unspam.gmane.org/gmane.foo.bar:1234
Bye, Reiner.
[1]
,----[ <f1> v spam-list-of-processors RET ]
| spam-list-of-processors is a variable defined in `spam'.
| Its value is shown below.
|
| [...]
|
| Value:
| ((gnus-group-spam-exit-processor-report-gmane spam spam-use-gmane)
| (gnus-group-spam-exit-processor-bogofilter spam spam-use-bogofilter)
| [...]
| (gnus-group-ham-exit-processor-spamoracle ham spam-use-spamoracle))
`----
--
,,,
(o o)
---ooO-(_)-Ooo--- | PGP key available | http://rsteib.home.pages.de/
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: spam.el/spam-report.el: Gmane spam reporting broken in No Gnus
2005-09-20 18:19 ` Reiner Steib
@ 2005-09-21 14:45 ` Ted Zlatanov
2005-09-21 16:51 ` Reiner Steib
0 siblings, 1 reply; 7+ messages in thread
From: Ted Zlatanov @ 2005-09-21 14:45 UTC (permalink / raw)
On Tue, 20 Sep 2005, reinersteib+gmane@imap.cc wrote:
On Tue, Sep 20 2005, Ted Zlatanov wrote: > On Thu, 08 Sep 2005, reinersteib+gmane@imap.cc wrote:
> [...]
>> Can you try to use (spam spam-use-gmane) instead of
>> gnus-group-spam-exit-processor-report-gmane?
>
> Then it works:
Great. I'm debating whether I should complete remove the old-style
gnus-group-*-exit-processor-* variables. I say yes. If I do that, I
won't have to fix this bug :)
> I'm a little confused about the obsolescence: In [v5-10]/lisp/spam.el
> `spam-list-of-processors' does not seem to be obsolete (CMIIW,
> please).
Well, the variable's docstring has as the first line:
"The OBSOLETE `spam-list-of-processors' list.
Should I mark it obsolete in some other way? I recall Emacs Lisp has
some properties for that...
> While at it: In the v5-10 branch, there's the following comment:
>
> ,----[ [v5-10]/lisp/spam.el ]
> | ;; note that spam-use-gmane is not a legitimate check
> | (spam-use-gmane nil
> | spam-report-gmane-register-routine
> | ;; does Gmane support unregistration?
> | nil
> | nil)
> `----
>
> Gmane supports unregistration: You can reverse the report
> http://spam.gmane.org/gmane.foo.bar:1234 with
> http://unspam.gmane.org/gmane.foo.bar:1234
Thanks, I didn't know that. I just added the support to spam.el and
spam-report.el. I assume that registering as spam is the same as
unregistering as ham, and vice versa; if that's not the case let me
know and I'll correct the backend registration. Please test the
reporting, if you have a chance.
Thanks
Ted
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: spam.el/spam-report.el: Gmane spam reporting broken in No Gnus
2005-09-21 14:45 ` Ted Zlatanov
@ 2005-09-21 16:51 ` Reiner Steib
2005-09-22 12:20 ` Reiner Steib
0 siblings, 1 reply; 7+ messages in thread
From: Reiner Steib @ 2005-09-21 16:51 UTC (permalink / raw)
On Wed, Sep 21 2005, Ted Zlatanov wrote:
> On Tue, 20 Sep 2005, reinersteib+gmane@imap.cc wrote:
[...]
> Great. I'm debating whether I should complete remove the old-style
> gnus-group-*-exit-processor-* variables. I say yes. If I do that, I
> won't have to fix this bug :)
Which released version do have the old-style variables? The whole
5.10.x series upto 5.10.6, I think? And v5-10 doesn't have the new
style?
IMHO, Step 1 should be to update (info "(gnus)Spam ELisp Package
Configuration Examples") (in No Gnus) to the new syntax.
[ FYI: My settings described in "Using `spam.el' on an IMAP server
with a statistical filter on the server" still work correctly
(AFAICS); both with v5-10 (Gnus 5.11) and trunk (No Gnus). ]
Step 2: I'd suggest to change the manual as follows. Don't describe
the obsolete stuff *first* and the say it's obsolete:
,----[ (info "(gnus)Blacklists and Whitelists") ]
| -- Variable: gnus-group-spam-exit-processor-blacklist
| Add this symbol to a group's `spam-process' parameter by
| customizing the group parameters or the
| `gnus-spam-process-newsgroups' variable. When this symbol is
| added to a group's `spam-process' parameter, the senders of
| spam-marked articles will be added to the blacklist.
|
| _WARNING_
|
| Instead of the obsolete
| `gnus-group-spam-exit-processor-blacklist', it is recommended that
| you use `(spam spam-use-blacklist)'. Everything will work the
| same way, we promise.
`----
*First* describe the new recommended syntax. I don't know if it makes
more sense to create a section "old-style vs. new-style" or to mention
the old-style after each "Variable:".
Step 3: `G c' probably should not offer the obsolete form.
[ Step 4: Remove the backward compatibility. ]
>> I'm a little confused about the obsolescence: In [v5-10]/lisp/spam.el
>> `spam-list-of-processors' does not seem to be obsolete (CMIIW,
>> please).
>
> Well, the variable's docstring has as the first line:
>
> "The OBSOLETE `spam-list-of-processors' list.
But *not* in the v5-10 branch: v5-10/texi/gnus.el says that it's
obsolete, but v5-10/lisp/spam*.el doesn't!
,----
| -*- mode: grep; default-directory: ".../v5-10/lisp/" -*-
| Grep started at Wed Sep 21 18:04:46
|
| grep -nH -ie obsolete spam*.el
|
| Grep finished with no matches found at Wed Sep 21 18:04:46
`----
> Should I mark it obsolete in some other way? I recall Emacs Lisp has
> some properties for that...
`make-obsolete-variable'? I don't know if this is suitable here.
> I just added the support to spam.el and spam-report.el. I assume
> that registering as spam is the same as unregistering as ham, and
> vice versa; if that's not the case let me know and I'll correct the
> backend registration. Please test the reporting, if you have a
> chance.
Would you mind the following change? I don't think we changing the
syntax of the (previously) interactive function `spam-report-gmane' is
a good idea.
--8<---------------cut here---------------start------------->8---
--- spam-report.el 21 Sep 2005 18:39:41 +0200 7.23
+++ spam-report.el 21 Sep 2005 18:42:59 +0200
@@ -119,15 +119,17 @@
"Report ARTICLES as not-spam (unregister) through Gmane."
(interactive (gnus-summary-work-articles current-prefix-arg))
(dolist (article articles)
- (spam-report-gmane t article)))
+ (spam-report-gmane-internal t article)))
(defun spam-report-gmane-spam (&rest articles)
"Report ARTICLES as spam through Gmane."
(interactive (gnus-summary-work-articles current-prefix-arg))
(dolist (article articles)
- (spam-report-gmane nil article)))
+ (spam-report-gmane-internal nil article)))
-(defun spam-report-gmane (unspam article)
+(defalias 'spam-report-gmane 'spam-report-gmane-spam)
+
+(defun spam-report-gmane-internal (unspam article)
"Report ARTICLE as spam or not-spam through Gmane, depending on UNSPAM."
(when (and gnus-newsgroup-name
(or (null spam-report-gmane-regex)
--8<---------------cut here---------------end--------------->8---
Bye, Reiner.
--
,,,
(o o)
---ooO-(_)-Ooo--- | PGP key available | http://rsteib.home.pages.de/
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: spam.el/spam-report.el: Gmane spam reporting broken in No Gnus
2005-09-21 16:51 ` Reiner Steib
@ 2005-09-22 12:20 ` Reiner Steib
2005-10-04 18:18 ` Ted Zlatanov
0 siblings, 1 reply; 7+ messages in thread
From: Reiner Steib @ 2005-09-22 12:20 UTC (permalink / raw)
On Wed, Sep 21 2005, Reiner Steib wrote:
> Would you mind the following change? I don't think we changing the
> syntax of the (previously) interactive function `spam-report-gmane' is
> a good idea.
I noticed that spam-report-gmane-* should be autoloaded. And the
"unspam" feature should look at "X-Report-Unspam". I renamed
`spam-report-gmane-unspam' to `spam-report-gmane-ham' because
everywhere else in `spam{,-report}.el' we use "ham".
Please let me know if you think something is wrong with these changes.
Bye, Reiner.
--
,,,
(o o)
---ooO-(_)-Ooo--- | PGP key available | http://rsteib.home.pages.de/
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: spam.el/spam-report.el: Gmane spam reporting broken in No Gnus
2005-09-22 12:20 ` Reiner Steib
@ 2005-10-04 18:18 ` Ted Zlatanov
0 siblings, 0 replies; 7+ messages in thread
From: Ted Zlatanov @ 2005-10-04 18:18 UTC (permalink / raw)
On Thu, 22 Sep 2005, reinersteib+gmane@imap.cc wrote:
On Wed, Sep 21 2005, Reiner Steib wrote:
>
>> Would you mind the following change? I don't think we changing the
>> syntax of the (previously) interactive function `spam-report-gmane' is
>> a good idea.
>
> I noticed that spam-report-gmane-* should be autoloaded. And the
> "unspam" feature should look at "X-Report-Unspam". I renamed
> `spam-report-gmane-unspam' to `spam-report-gmane-ham' because
> everywhere else in `spam{,-report}.el' we use "ham".
>
> Please let me know if you think something is wrong with these changes.
No problems. I appreciate all your help with the Gmane functionality
and others. I've been really busy lately :)
Ted
^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2005-10-04 18:18 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2005-09-08 15:07 spam.el/spam-report.el: Gmane spam reporting broken in No Gnus Reiner Steib
2005-09-20 16:38 ` Ted Zlatanov
2005-09-20 18:19 ` Reiner Steib
2005-09-21 14:45 ` Ted Zlatanov
2005-09-21 16:51 ` Reiner Steib
2005-09-22 12:20 ` Reiner Steib
2005-10-04 18:18 ` Ted Zlatanov
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).