+2003-02-21 Teodor Zlatanov <tzz@bwh.harvard.edu>
+
+ * gnus-sum.el (gnus-summary-move-article)
+ (gnus-summary-expire-articles): send data header for article, not
+ just article ID
+
+ * gnus-registry.el (gnus-registry-hashtb, gnus-register-action)
+ (gnus-register-spool-action): added hashtable of message ID keys
+ with message motion data
+
2003-02-21 Florian Weimer <fw@deneb.enyo.de>
From Reiner Steib <Reiner.Steib@gmx.de>.
(require 'gnus-sum)
(require 'nnmail)
-;; (defcustom gnus-summary-article-spool-hook nil
-;; "*A hook called after an article is spooled."
-;; :group 'gnus-summary
-;; :type 'hook)
-
-(defun regtest (action id from &optional to method)
- (message "Registry: article %s %s from %s to %s"
- id
- (if method "respooling" "going")
- (gnus-group-guess-full-name from)
- (if to (gnus-group-guess-full-name to) "the Bit Bucket in the sky")))
-
-(defun regtest-nnmail (id group)
- (message "Registry: article %s spooled to %s"
+(defvar gnus-registry-hashtb nil
+ "*The article registry by Message ID.")
+(setq gnus-registry-hashtb (make-hash-table
+ :size 4096
+ :test 'equal)) ; we test message ID strings equality
+
+;; sample data-header
+;; (defvar tzz-header '(49 "Re[2]: good news" "\"Jonathan Pryor\" <offerlm@aol.com>" "Mon, 17 Feb 2003 10:41:46 +-0800" "<88288020@dytqq>" "" 896 18 "lockgroove.bwh.harvard.edu spam.asian:49" nil))
+
+;; (maphash (lambda (key value) (message "key: %s value: %s" key value)) gnus-registry-hashtb)
+;; (clrhash gnus-registry-hashtb)
+
+(defun gnus-register-action (action data-header from &optional to method)
+ (let* ((id (mail-header-id data-header))
+ (hash-entry (gethash id gnus-registry-hashtb)))
+ (gnus-message 5 "Registry: article %s %s from %s to %s"
+ id
+ (if method "respooling" "going")
+ (gnus-group-guess-full-name from)
+ (if to (gnus-group-guess-full-name to) "the Bit Bucket"))
+ (unless hash-entry
+ (setq hash-entry (puthash id (list data-header) gnus-registry-hashtb)))
+ (puthash id (cons (list action from to method)
+ (gethash id gnus-registry-hashtb)) gnus-registry-hashtb)))
+
+(defun gnus-register-spool-action (id group)
+ (gnus-message 5 "Registry: article %s spooled to %s"
id
- (gnus-group-prefixed-name group gnus-internal-registry-spool-current-method t)))
-
-;;(add-hook 'gnus-summary-article-move-hook 'regtest) ; also does copy, respool, and crosspost
-;;(add-hook 'gnus-summary-article-delete-hook 'regtest)
-;;(add-hook 'gnus-summary-article-expire-hook 'regtest)
-(add-hook 'nnmail-spool-hook 'regtest-nnmail)
-
-;; TODO:
+ (gnus-group-prefixed-name
+ group
+ gnus-internal-registry-spool-current-method
+ t)))
+
+(add-hook 'gnus-summary-article-move-hook 'gnus-register-action) ; also does copy, respool, and crosspost
+(add-hook 'gnus-summary-article-delete-hook 'gnus-register-action)
+(add-hook 'gnus-summary-article-expire-hook 'gnus-register-action)
+(add-hook 'nnmail-spool-hook 'gnus-register-spool-action)
+
+;; TODO: a lot of things
+;; TODO: we have to load and save the registry through gnus-save-newsrc-file
(provide 'gnus-registry)
(nnheader-get-report (car to-method))))
((eq art-group 'junk)
(when (eq action 'move)
- (let ((id (mail-header-id (gnus-data-header
- (assoc article (gnus-data-list nil))))))
- (gnus-summary-mark-article article gnus-canceled-mark)
- (gnus-message 4 "Deleted article %s" article)
- ;; run the move/copy/crosspost/respool hook
- (run-hook-with-args 'gnus-summary-article-delete-hook
- action id gnus-newsgroup-name nil
- select-method))))
+ (gnus-summary-mark-article article gnus-canceled-mark)
+ (gnus-message 4 "Deleted article %s" article)
+ ;; run the delete hook
+ (run-hook-with-args 'gnus-summary-article-delete-hook
+ action
+ (gnus-data-header
+ (assoc article (gnus-data-list nil)))
+ gnus-newsgroup-name nil
+ select-method)))
(t
(let* ((pto-group (gnus-group-prefixed-name
(car art-group) to-method))
article gnus-newsgroup-name (current-buffer))))
;; run the move/copy/crosspost/respool hook
- (let ((id (mail-header-id (gnus-data-header
- (assoc article (gnus-data-list nil))))))
(run-hook-with-args 'gnus-summary-article-move-hook
- action id gnus-newsgroup-name to-newsgroup
- select-method)))
+ action
+ (gnus-data-header
+ (assoc article (gnus-data-list nil)))
+ gnus-newsgroup-name
+ to-newsgroup
+ select-method))
;;;!!!Why is this necessary?
(set-buffer gnus-summary-buffer)
-
+
(gnus-summary-goto-subject article)
(when (eq action 'move)
(gnus-summary-mark-article article gnus-canceled-mark))))
(when (and (not (memq article es))
(gnus-data-find article))
(gnus-summary-mark-article article gnus-canceled-mark)
- (let ((id (mail-header-id (gnus-data-header
- (assoc article
- (gnus-data-list nil))))))
- (run-hook-with-args 'gnus-summary-article-expire-hook
- 'delete id gnus-newsgroup-name nil
- nil)))))))
+ (run-hook-with-args 'gnus-summary-article-expire-hook
+ 'delete
+ (gnus-data-header
+ (assoc article (gnus-data-list nil)))
+ gnus-newsgroup-name
+ nil
+ nil))))))
(gnus-message 6 "Expiring articles...done")))))
(defun gnus-summary-expire-articles-now ()
+2003-02-21 Jesper Harder <harder@ifa.au.dk>
+
+ * gnus.texi (Mailing List): Fix.
+
+ * gnus.texi: Markup fixes.
+
2003-02-18 Reiner Steib <Reiner.Steib@gmx.de>
* gnus.texi (Article Washing): Mention `g'.
\e$B$G$-$^$9!#$G$b$$$/$D$+$N%Q%i%a!<%?!"Nc$($P\e(B @code{visible} \e$B$O8zNO$rH/4x$7\e(B
\e$B$^$;$s!#Nc$G$9!#\e(B
-@example
+@lisp
(setq gnus-parameters
'(("mail\\..*"
(gnus-show-threads nil)
("list\\..*"
(total-expire . t)
(broken-reply-to . t))))
-@end example
+@end lisp
\e$BJ8;zNs$NCM$O!"\e(B@code{to-group} \e$B$NNc$,<($9$h$&$K!"@55,I=8=$K$h$kCV$-49$($r\e(B
\e$B<u$1$k$3$H$,$"$j$^$9!#\e(B
@vindex nnmail-extra-headers
\e$B4XO"$7$?JQ?t$O\e(B @code{nnmail-extra-headers} \e$B$G!"\e(Boverview (@sc{nov}) \e$B%U%!\e(B
\e$B%$%k$K$$$DDI2C$N%X%C%@!<$r4^$a$k$+$r@)8f$7$^$9!#8E$$\e(B overview \e$B%U%!%$%k$,\e(B
-\e$B$"$k>l9g$O!"$3$NJQ?t$rJQ99$7$?8e$K%5!<%P!<%P%C%U%!$K\e(B `^' \e$B$GF~$C$FE,@Z$J\e(B
-\e$B%a!<%k%5!<%P!<\e(B (\e$BNc$($P\e(B nnml) \e$B$G\e(B `g' \e$B$r2!$7!":F@8@.$9$kI,MW$,$"$j$^$9!#\e(B
+\e$B$"$k>l9g$O!"$3$NJQ?t$rJQ99$7$?8e$K%5!<%P!<%P%C%U%!$K\e(B @kbd{^} \e$B$GF~$C$FE,\e(B
+\e$B@Z$J%a!<%k%5!<%P!<\e(B (\e$BNc$($P\e(B nnml) \e$B$G\e(B @kbd{g} \e$B$r2!$7!":F@8@.$9$kI,MW$,$"$j\e(B
+\e$B$^$9!#\e(B
@vindex gnus-summary-line-format
gnus \e$B$K!"\e(B@code{gnus-summary-line-format} \e$BJQ?t$N\e(B @code{%n} \e$B;EMM\e(B
@vindex gnus-thread-operation-ignore-subject
\e$B%9%l%C%I$r:n@.$9$k$H$-$KI=Bj$rL5;k$9$k$H!"<+A3$K%9%l%C%I$K$O$$$/$D$+$N0c$C\e(B
\e$B$?I=Bj$,$"$k$3$H$K$J$j$^$9!#$=$l$+\e(B
-\e$B$i\e(B `T k' (@code{gnus-summary-kill-thread}) \e$B$N$h$&$JL?Na$rH/$9$k$H$-$K!"\e(B
-\e$BA4BN$N%9%l%C%I$r:o=|$9$k$N$G$O$J$/!"8=:_$N5-;v$HF1$8I=Bj$r;}$DItJ,$@$1$r\e(B
-\e$B:o=|$7$?$$$H$-$,$"$k$+$b$7$l$^$;$s!#$b$7$3$NH/A[$,NI$$$H;W$&$N$G$"$l$P!"\e(B
-@code{gnus-thread-operation-ignore-subject} \e$B$r$$$8$/$k$3$H$,$G$-$^$9!#$3\e(B
-\e$B$l$,\e(B @code{nil} \e$B$G$J$$$H\e(B (\e$B$3$l$,%G%#%U%)%k%H$G$9$,\e(B)\e$B!"%9%l%C%I$NL?Na$r<B\e(B
-\e$B9T$7$F$$$k$H$-$KI=Bj$OL5;k$5$l$^$9!#$3$NJQ?t$,\e(B @code{fuzzy} \e$B$G$"$k$H!"$"\e(B
-\e$B$$$^$$$KEy$7$$I=Bj$r;}$D5-;v$@$1$,4^$^$l$^$9\e(B (@pxref{Fuzzy Matching})\e$B!#\e(B
+\e$B$i\e(B @kbd{T k} (@code{gnus-summary-kill-thread}) \e$B$N$h$&$JL?Na$rH/$9$k$H$-\e(B
+\e$B$K!"A4BN$N%9%l%C%I$r:o=|$9$k$N$G$O$J$/!"8=:_$N5-;v$HF1$8I=Bj$r;}$DItJ,$@\e(B
+\e$B$1$r:o=|$7$?$$$H$-$,$"$k$+$b$7$l$^$;$s!#$b$7$3$NH/A[$,NI$$$H;W$&$N$G$"$l\e(B
+\e$B$P!"\e(B@code{gnus-thread-operation-ignore-subject} \e$B$r$$$8$/$k$3$H$,$G$-$^$9!#\e(B
+\e$B$3$l$,\e(B @code{nil} \e$B$G$J$$$H\e(B (\e$B$3$l$,%G%#%U%)%k%H$G$9$,\e(B)\e$B!"%9%l%C%I$NL?Na$r\e(B
+\e$B<B9T$7$F$$$k$H$-$KI=Bj$OL5;k$5$l$^$9!#$3$NJQ?t$,\e(B @code{fuzzy} \e$B$G$"$k$H!"\e(B
+\e$B$"$$$^$$$KEy$7$$I=Bj$r;}$D5-;v$@$1$,4^$^$l$^$9\e(B (@pxref{Fuzzy Matching})\e$B!#\e(B
@node Sorting the Summary Buffer
@section \e$BJB$SBX$(\e(B
\e$BO"A[%j%9%H\e(B @code{gnus-split-methods} \e$B$K@55,I=8=$rJ|$j9~$`;v$K$h$C$F!"\e(B
gnus \e$B$K5-;v$rJ]B8$9$k>l=j$rDs0F$9$k;v$,$G$-$^$9!#Nc$($P!"\e(Bgnus \e$B$K4XO"$7$?\e(B
\e$B5-;v$r%U%!%$%k\e(B @file{gnus-stuff} \e$B$K!"\e(BVM \e$B$K4XO"$7$?5-;v\e(B
-\e$B$r\e(B @code{vm-stuff} \e$BJ]B8$7$?$1$l$P!"$3$NJQ?t$r0J2<$N$h$&$K$9$k;v$,$G$-$^\e(B
+\e$B$r\e(B @file{vm-stuff} \e$BJ]B8$7$?$1$l$P!"$3$NJQ?t$r0J2<$N$h$&$K$9$k;v$,$G$-$^\e(B
\e$B$9\e(B:
@lisp
@vindex gnus-uu-user-view-rules
@cindex sox
\e$B$3$NJQ?t$O%U%!%$%k$r1\Mw$9$k$H$-$K:G=i$KD4$Y$i$l$^$9!#Nc$($P!"$b\e(B
-\e$B$7\e(B @samp{.au} \e$B2;%U%!%$%k$rJQ49$9$k$?$a$K\e(B @code{sox} \e$B$r;H$$$?$$$H$-$O!"<!\e(B
+\e$B$7\e(B @file{.au} \e$B2;%U%!%$%k$rJQ49$9$k$?$a$K\e(B @code{sox} \e$B$r;H$$$?$$$H$-$O!"<!\e(B
\e$B$N$h$&$K$G$-$^$9\e(B:
@lisp
@kindex A M (\e$B35N,\e(B)
@findex gnus-mailing-list-insinuate
Gnus \e$B$O\e(B RFC 2369 \e$B$G4{Dj$5$l$?3F<o$N%a!<%j%s%0%j%9%H$G;H$o$l$k%U%#!<%k%I\e(B
-\e$B$rM}2r$7$^$9!#$3$l$rM-8z$K$9$k$K$O\e(B `to-list' \e$B%0%k!<%W%Q%i%a!<\e(B
+\e$B$rM}2r$7$^$9!#$3$l$rM-8z$K$9$k$K$O\e(B @code{to-list} \e$B%0%k!<%W%Q%i%a!<\e(B
\e$B%?\e(B (@pxref{Group Parameters}) \e$B$rDI2C$7$F!"35N,%P%C%U%!\e(B
-\e$B$G\e(B @kbd{A M} (@code{gnus-mailing-list-insinuate}) \e$B$r;H$&$+\e(B
-
-@lisp
-(add-hook 'gnus-summary-mode-hook 'turn-on-gnus-mailing-list-mode)
-@end lisp
+\e$B$G\e(B @kbd{A M} (@code{gnus-mailing-list-insinuate}) \e$B$r;H$C$F2<$5$$!#\e(B
-\e$B$r>'$($l$PNI$$$G$7$g$&!#$3$l$K$h$C$F35N,%P%C%U%!$G$N0J2<$NL?Na$,;H$($k$h\e(B
-\e$B$&$K$J$j$^$9!#\e(B
+\e$B$3$l$K$h$C$F35N,%P%C%U%!$G$N0J2<$NL?Na$,;H$($k$h$&$K$J$j$^$9!#\e(B
@table @kbd
@item C-c C-n h
\e$B:#$d!"<!$K\e(B gnus \e$B$r5/F0$7$?$H$-$K$O!"$3$N%P%C%/%(%s%I$O?7$7$$5-;v$r5a$a!"\e(B
\e$B$=$l$O$"$J$?$N%9%W!<%k%U%!%$%k$+$iA4$F$N%a%C%;!<%8$r%G%#%l%/%H%j!<!"%G%#\e(B
-\e$B%U%)%k%H$G$O\e(B @code{~/Mail/} \e$B$K0\F0$7$^$9!#:n@.$5$l$??7$7$$%0%k!<\e(B
+\e$B%U%)%k%H$G$O\e(B @file{~/Mail/} \e$B$K0\F0$7$^$9!#:n@.$5$l$??7$7$$%0%k!<\e(B
\e$B%W\e(B (@samp{mail.misc}) \e$B$,9XFI$5$l!"B>$N%0%k!<%W$HF1$8$h$&$KFI$`;v$,$G$-$^\e(B
\e$B$9!#\e(B
@table @code
@item :path
\e$B%a!<%k$,J]B8$5$l$k%G%#%l%/%H%j!<$NL>A0$G$9!#=i4|CM$O4D6-JQ\e(B
-\e$B?t\e(B @code{MAILDIR} \e$B$+$i<hF@$7$?CM$+!"$^$?$O\e(B @samp{~/Maildir/} \e$B$G$9!#\e(B
+\e$B?t\e(B @code{MAILDIR} \e$B$+$i<hF@$7$?CM$+!"$^$?$O\e(B @file{~/Maildir/} \e$B$G$9!#\e(B
@item :subdirs
Maildir \e$B$N%5%V%G%#%l%/%H%j$G$9!#=i4|CM$O\e(B @samp{("new" "cur")} \e$B$G$9!#\e(B
@item :program
:stream \e$B$K\e(B `shell' \e$B$,@_Dj$5$l$F$$$k$H$-$O!"$3$NCM$,JQ\e(B
-\e$B?t\e(B `imap-shell-program' \e$B$K3d$jEv$F$i$l$^$9!#$3$l$O\e(B @code{format} \e$B$U$&$N\e(B
-\e$BJ8;zNs\e(B (\e$B$^$?$OJ8;zNs$N%j%9%H\e(B) \e$B$G$J$1$l$P$J$j$^$;$s!#Nc$r<($7$^$7$g$&!#\e(B
+\e$B?t\e(B @code{imap-shell-program} \e$B$K3d$jEv$F$i$l$^$9!#$3$l$O\e(B @code{format} \e$B$U\e(B
+\e$B$&$NJ8;zNs\e(B (\e$B$^$?$OJ8;zNs$N%j%9%H\e(B) \e$B$G$J$1$l$P$J$j$^$;$s!#Nc$r<($7$^$7$g$&!#\e(B
@example
ssh %s imapd
\e$B%5!<%P!<$NL>A0!#\e(B
@item l
-`imap-default-user' \e$B$G@_Dj$5$l$?%f!<%6L>!#\e(B
+@code{imap-default-user} \e$B$G@_Dj$5$l$?%f!<%6L>!#\e(B
@item p
\e$B%5!<%P!<$N%]!<%HHV9f!#\e(B
@item nnml-directory
@vindex nnml-directory
\e$BA4$F$N\e(B @code{nnml} \e$B%G%#%l%/%H%j!<$O$3$N%G%#%l%/%H%j!<$N2<$KCV$+$l$^$9!#\e(B
-\e$B4{DjCM$O\e(B `message-directory' \e$B$NCM\e(B (\e$B$=$N4{DjCM$O\e(B @file{~/Mail}) \e$B$G$9!#\e(B
+\e$B4{DjCM$O\e(B @code{message-directory} \e$B$NCM\e(B (\e$B$=$N4{DjCM$O\e(B @file{~/Mail}) \e$B$G$9!#\e(B
@item nnml-active-file
@vindex nnml-active-file
@item nnfolder
\e$B4pK\E*$K\e(B @code{nnfolder} \e$B$N8z2L$O%0%k!<%WKh$N\e(B @code{nnmbox} (\e$B>e$G@bL@$5\e(B
-\e$B$l$F$$$k:G=i$NJ}K!\e(B) \e$B$G$9!#$9$J$o$A!"\e(B@code{nnmbox} \e$B<+?H$O\e(B *\e$BA4$F\e(B* \e$B$N%a!<%k\e(B
-\e$B$r0l$D$N%U%!%$%k$KF~$l$^$9\e(B; @code{nnfolder} \e$B$O%a!<%k%0%k!<%W$=$l$>$l\e(B
-\e$B$,\e(B Unix mail box \e$B%U%!%$%k$r;}$D$h$&$K>/$7:GE,2=$r$7$^$9!#\e(B
+\e$B$l$F$$$k:G=i$NJ}K!\e(B) \e$B$G$9!#$9$J$o$A!"\e(B@code{nnmbox} \e$B<+?H$O\e(B @emph{\e$BA4$F\e(B} \e$B$N\e(B
+\e$B%a!<%k$r0l$D$N%U%!%$%k$KF~$l$^$9\e(B; @code{nnfolder} \e$B$O%a!<%k%0%k!<%W$=$l$>\e(B
+\e$B$l$,\e(B Unix mail box \e$B%U%!%$%k$r;}$D$h$&$K>/$7:GE,2=$r$7$^$9!#\e(B
@code{nnmobx} \e$B$h$j$b!"$=$l$>$l$N%0%k!<%W$rJL$K2r@O$9$k$N$GB.$/!"$=$N$&$(\e(B
\e$B%a!<%k$r0\F0$5$;$k$N$K:G>.8B$NO+NO$rMW5a$9$kC1=c$J\e(B Unix mail box \e$B7A<0$r\e(B
\e$BDs6!$7$^$9!#2C$($F!"\e(Bgnus \e$B$,$=$l$>$l$NJL$N%0%k!<%W$K$I$N$/$i$$$N%a%C%;!<\e(B
@item nnslashdot-directory
@vindex nnslashdot-directory
@code{nnslashdot} \e$B$,%U%!%$%k$rJ]B8$9$k>l=j$G$9!#=i4|CM\e(B
-\e$B$O\e(B @samp{~/News/slashdot/} \e$B$G$9!#\e(B
+\e$B$O\e(B @file{~/News/slashdot/} \e$B$G$9!#\e(B
@item nnslashdot-active-url
@vindex nnslashdot-active-url
@item nnultimate-directory
@vindex nnultimate-directory
@code{nnultimate} \e$B$,%U%!%$%k$rJ]B8$9$k%G%#%l%/%H%j!<$G$9!#=i4|CM\e(B
-\e$B$O\e(B @samp{~/News/ultimate/} \e$B$G$9!#\e(B
+\e$B$O\e(B @file{~/News/ultimate/} \e$B$G$9!#\e(B
@end table
@node Web Archive
@item nnwarchive-directory
@vindex nnwarchive-directory
@code{nnwarchive} \e$B$,%U%!%$%k$rJ]B8$9$k%G%#%l%/%H%j!<$G$9!#=i4|CM\e(B
-\e$B$O\e(B @samp{~/News/warchive} \e$B$G$9!#\e(B
+\e$B$O\e(B @file{~/News/warchive} \e$B$G$9!#\e(B
@item nnwarchive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j$^$9\e(B}\e$B!#\e(B
@itemize @bullet
@item
\e$BB?$/$N%3%^%s%I$O%W%m%;%9\e(B/\e$B@\F,0z?t$N=,47$r;H$$$^$;$s!#$H$$$&$3$H$O!"$3$N\e(B
\e$B%^%K%e%"%k$G$O$C$-$j$H=R$Y$F$$$^$9!#%W%m%;%9\e(B/\e$B@\F,0z?t$N=,47$r;H$o$J$$%3\e(B
\e$B%^%s%I$KE,MQ$9$k$K$O!"\e(B@kbd{M-&} \e$B%3%^%s%I$r;H$$$^$7$g$&!#Nc$($P!"$=$N%0%k!<\e(B
-\e$B%W$N$9$Y$F$N5-;v$r4|8B@Z$l:o=|2DG=$H$7$F0u$rIU$1$k$K$O\e(B `M P b M-& E' \e$B$H\e(B
-\e$B$7$^$9!#\e(B
+\e$B%W$N$9$Y$F$N5-;v$r4|8B@Z$l:o=|2DG=$H$7$F0u$rIU$1$k$K\e(B
+\e$B$O\e(B @kbd{M P b M-& E} \e$B$H$7$^$9!#\e(B
@node Interactive
@section \e$BBPOCE*\e(B
@item
\e$B%3!<%I\e(B
-@example
+@lisp
(defvar spam-use-blackbox nil
"Blackbox \e$B$r;H$&$H$-$O\e(B t \e$B$K$9$k!#\e(B")
-@end example
+@end lisp
@code{spam-list-of-checks} \e$B$K\e(B
@example
Blackbox \e$B$,\e(B spam \e$B$^$?$O\e(B ham \e$B$N=hM}$r%5%]!<%H$9$k>l9g$@$1!"$=$l$i$rMQ0U$7\e(B
\e$B$F2<$5$$!#\e(B
-@example
+@lisp
(defvar gnus-group-spam-exit-processor-blackbox "blackbox"
"\e$B35N,$r=P$k$H$-$K8F$P$l$k\e(B blackbox \e$B$N\e(B spam \e$B%W%m%;%C%5!<!#\e(B
Spam \e$B%0%k!<%W$@$1$KE,MQ$5$l$k!#\e(B")
"\e$B35N,$r=P$k$H$-$K8F$P$l$k\e(B blackbox \e$B$N\e(B ham \e$B%W%m%;%C%5!<!#\e(B
Spam \e$B$G$O$J$$\e(B (\e$BL$J,N`$^$?$O\e(B ham) \e$B%0%k!<%W$@$1$KE,MQ$5$l$k!#\e(B")
-@end example
+@end lisp
@item
\e$B4X?t\e(B
-@example
+@lisp
(defun spam-blackbox-register-spam-routine ()
(spam-generic-register-routine
;; spam \e$BMQ$N4X?t\e(B
(let ((from (spam-fetch-field-from-fast article)))
(when (stringp from)
(blackbox-do-something-with-this-ham-sender from))))))
-@end example
+@end lisp
\e$B4X?t\e(B @code{blackbox-do-something-with-this-ham-sender} \e$B$*$h\e(B
\e$B$S\e(B @code{blackbox-do-something-with-this-spammer} \e$B$r=q$$$F2<$5$$!#%a%C%;!<\e(B
@code{spam-stat} \e$B$r;H$C$F%a!<%k$rJ,3d$9$k$?$a$K!"\e(B@file{~/.gnus} \e$B%U%!%$%k\e(B
\e$B$K0J2<$rDI2C$9$kI,MW$,$"$j$^$9!#\e(B
-@example
+@lisp
(require 'spam-stat)
(spam-stat-load)
-@end example
+@end lisp
\e$B$3$l$OI,MW$J\e(B gnus \e$B$N%3!<%I$H$"$J$?$,:n$C$?<-=q$r\e(B load \e$B$7$^$9!#\e(B
\e$B$,\e(B @samp{mail.misc} \e$B$K9T$/$Y$-$@$H8@$C$F$$$^$9!#$b$7\e(B spam \e$B$@$C$?\e(B
\e$B$i\e(B @code{spam-stat-split-fancy} \e$B$O\e(B @samp{mail.spam} \e$B$rJV$7$^$9!#\e(B
-@example
+@lisp
(setq nnmail-split-fancy
`(| (: spam-stat-split-fancy)
"mail.misc"))
-@end example
+@end lisp
@defvar spam-stat-split-fancy-spam-group
Spam \e$BMQ$N%0%k!<%W$G$9!#%G%#%U%)%k%H$O\e(B @samp{mail.spam} \e$B$G$9!#\e(B
\e$B2<$N<0$r;H$C$F2<$5$$!#@55,I=8=$K9gCW$7$J$$%a!<%k$@$1$r\e(B spam \e$B$+$b$7$l$J$$\e(B
\e$B$H9M$($^$9!#\e(B
-@example
+@lisp
(setq nnmail-split-fancy
`(| ("Subject" "\\bspam-stat\\b" "mail.emacs")
(: spam-stat-split-fancy)
"mail.misc"))
-@end example
+@end lisp
\e$B:G=i$K\e(B spam \e$B$N_I2a$r$7$?$$>l9g!"<-=q$r:n$k$H$-$K==J,$KCm0U$7$J$1$l$P$J$j\e(B
\e$B$^$;$s!#\e(B
\e$B$-$NHs\e(B-spam \e$B%3%l%/%7%g%s$KN>J}$H$bF~$C$F$$$J$1$l$P$J$i$J$$$3$H$KCm0U$7$F\e(B
\e$B2<$5$$!#\e(B
-@example
+@lisp
(setq nnmail-split-fancy
`(| (: spam-stat-split-fancy)
("Subject" "\\bspam-stat\\b" "mail.emacs")
"mail.misc"))
-@end example
+@end lisp
\e$B$3$l$rEAE}E*$J_I2a$HAH$_9g$o$;$k$3$H$b$G$-$^$9!#$3$3$G$O2f!9$O$9$Y$F\e(B
\e$B$N\e(B HTML \e$B$@$1$N%a!<%k$r\e(B @samp{mail.spam.filtered} \e$B%0%k!<%W$KF~$l$k$b$N$H\e(B
\e$B<-=q$r:n$k$H$-$K!"\e(B@samp{mail.spam.filtered} \e$B$N%a!<%k$,\e(B spam \e$B$^$?$O\e(B
\e$BHs\e(B-spam \e$B%3%l%/%7%g%s$N$I$A$i$K$bF~$k$Y$-$G$O$J$$$3$H$KCm0U$7$F2<$5$$\e(B!
-@example
+@lisp
(setq nnmail-split-fancy
`(| ("Content-Type" "text/html" "mail.spam.filtered")
(: spam-stat-split-fancy)
("Subject" "\\bspam-stat\\b" "mail.emacs")
"mail.misc"))
-@end example
+@end lisp
@node Low-level interface to the spam-stat dictionary
@subsubsection spam-\e$BE}7W\e(B (spam-stat) \e$B<-=q$X$NDc3,AX%$%s%?!<%U%'!<%9\e(B
\e$B$=$l$r;H$&A0$K!"I,$:<-=q$,\e(B load \e$B$5$l$F$$$k$h$&$K$7$F2<$5$$!#$3$l$K\e(B
\e$B$O\e(B @file{~/.gnus} \e$B%U%!%$%k$K0J2<$,I,MW$G$9\e(B:
-@example
+@lisp
(require 'spam-stat)
(spam-stat-load)
-@end example
+@end lisp
\e$BBeI=E*$J%F%9%H$O0J2<$N4X?t8F=P$7$rI,MW$H$7$^$9\e(B:
\e$B$3$N%^%/%m$O!"$[$H$s$IA4It$N%P%C%/%(%s%I$,;}$D$Y$-6&DL4X?t$r$$$/$D$+Dj5A\e(B
\e$B$7$^$9!#\e(B
-@example
+@lisp
(nnoo-define-basics nndir)
-@end example
+@end lisp
@item deffoo
\e$B$3$N%^%/%m$O$^$5$K\e(B @code{defun} \e$B$N$h$&$J$b$N$G!"F10l$N0z?t$r<h$j$^$9!#DL\e(B
\e$B$3$N%^%/%m$O8=:_$N%P%C%/%(%s%I$N4X?t$+$i?F%P%C%/%(%s%I$N4X?t$X$NCV$-49$(\e(B
\e$B$r9T$J$($k$h$&$K$7$^$9!#\e(B
-@example
+@lisp
(nnoo-map-functions nndir
(nnml-retrieve-headers 0 nndir-current-group 0 0)
(nnmh-request-article 0 nndir-current-group 0 0))
-@end example
+@end lisp
\e$B$3$l$O\e(B @code{nndir-retrieve-headers} \e$B$,8F$S=P$5$l$?$H$-!"0lHVL\!";0HVL\!"\e(B
\e$B;MHVL\$N0z?t$,\e(B @code{nnml-retrieve-headers} \e$B$KEO$5$l!"0lJ}!"FsHVL\$N0z?t\e(B
\e$B$l$F$$$J$$4X?t$rDj5A$9$k$@$1$J$N$G!"%=!<%9%U%!%$%k$N:G8e$N=hM}$H$7$F=q$+\e(B
\e$B$J$1$l$P$J$j$^$;$s!#\e(B
-@example
+@lisp
(nnoo-import nndir
(nnmh
nnmh-request-list
nnmh-request-newgroups)
(nnml))
-@end example
+@end lisp
\e$B$3$l$O!"\e(B@code{nndir-request-list} \e$B$X$N8F$S=P$7$OC1\e(B
\e$B$K\e(B @code{nnmh-request-list} \e$B$K0z$-EO$5$l!"0lJ}!"\e(B@code{nnml} \e$B$N8x3+4X?t$G\e(B
But some variables, such as @code{visible}, have no effect. For
example:
-@example
+@lisp
(setq gnus-parameters
'(("mail\\..*"
(gnus-show-threads nil)
("list\\..*"
(total-expire . t)
(broken-reply-to . t))))
-@end example
+@end lisp
String value of parameters will be subjected to regexp substitution, as
the @code{to-group} example shows.
@vindex nnmail-extra-headers
A related variable is @code{nnmail-extra-headers}, which controls when
-to include extra headers when generating overview (@sc{nov}) files. If
-you have old overview files, you should regenerate them after changing
-this variable, by entering the server buffer using `^', and then `g' on
-the appropriate mail server (e.g. nnml) to cause regeneration.
+to include extra headers when generating overview (@sc{nov}) files.
+If you have old overview files, you should regenerate them after
+changing this variable, by entering the server buffer using @kbd{^},
+and then @kbd{g} on the appropriate mail server (e.g. nnml) to cause
+regeneration.
@vindex gnus-summary-line-format
You also have to instruct Gnus to display the data by changing the
@vindex gnus-thread-operation-ignore-subject
If you ignore subject while threading, you'll naturally end up with
threads that have several different subjects in them. If you then issue
-a command like `T k' (@code{gnus-summary-kill-thread}) you might not
+a command like @kbd{T k} (@code{gnus-summary-kill-thread}) you might not
wish to kill the entire thread, but just those parts of the thread that
have the same subject as the current article. If you like this idea,
you can fiddle with @code{gnus-thread-operation-ignore-subject}. If it
You can have gnus suggest where to save articles by plonking a regexp into
the @code{gnus-split-methods} alist. For instance, if you would like to
save articles related to gnus in the file @file{gnus-stuff}, and articles
-related to VM in @code{vm-stuff}, you could set this variable to something
+related to VM in @file{vm-stuff}, you could set this variable to something
like:
@lisp
@vindex gnus-uu-user-view-rules
@cindex sox
This variable is consulted first when viewing files. If you wish to use,
-for instance, @code{sox} to convert an @samp{.au} sound file, you could
+for instance, @code{sox} to convert an @file{.au} sound file, you could
say something like:
@lisp
(setq gnus-uu-user-view-rules
@kindex A M (summary)
@findex gnus-mailing-list-insinuate
Gnus understands some mailing list fields of RFC 2369. To enable it,
-either add a `to-list' group parameter (@pxref{Group Parameters}),
+add a @code{to-list} group parameter (@pxref{Group Parameters}),
possibly using @kbd{A M} (@code{gnus-mailing-list-insinuate}) in the
-summary buffer, or say:
-
-@lisp
-(add-hook 'gnus-summary-mode-hook 'turn-on-gnus-mailing-list-mode)
-@end lisp
+summary buffer.
That enables the following commands to the summary buffer:
@vindex nntp-via-rlogin-command-switches
List of strings to be used as the switches to
@code{nntp-via-rlogin-command}. The default is @code{nil}. If you use
-@samp{ssh} for `nntp-via-rlogin-command', you may set this to
+@samp{ssh} for @code{nntp-via-rlogin-command}, you may set this to
@samp{("-C")} in order to compress all data connections, otherwise set
this to @samp{("-t")} or @samp{("-C" "-t")} if the telnet command
requires a pseudo-tty allocation on an intermediate host.
Now, the next time you start Gnus, this back end will be queried for new
articles, and it will move all the messages in your spool file to its
-directory, which is @code{~/Mail/} by default. The new group that will
+directory, which is @file{~/Mail/} by default. The new group that will
be created (@samp{mail.misc}) will be subscribed, and you can read it
like any other group.
@item :path
The name of the directory where the mails are stored. The default is
taken from the @code{MAILDIR} environment variable or
-@samp{~/Maildir/}.
+@file{~/Maildir/}.
@item :subdirs
The subdirectories of the Maildir. The default is
@samp{("new" "cur")}.
@item :program
When using the `shell' :stream, the contents of this variable is
-mapped into the `imap-shell-program' variable. This should be a
+mapped into the @code{imap-shell-program} variable. This should be a
@code{format}-like string (or list of strings). Here's an example:
@example
The name of the server.
@item l
-User name from `imap-default-user'.
+User name from @code{imap-default-user}.
@item p
The port number of the server.
@table @code
@item nnml-directory
@vindex nnml-directory
-All @code{nnml} directories will be placed under this directory.
-The default is the value of `message-directory' (whose default value is
-@file{~/Mail}).
+All @code{nnml} directories will be placed under this directory. The
+default is the value of @code{message-directory} (whose default value
+is @file{~/Mail}).
@item nnml-active-file
@vindex nnml-active-file
Basically the effect of @code{nnfolder} is @code{nnmbox} (the first
method described above) on a per-group basis. That is, @code{nnmbox}
-itself puts *all* one's mail in one file; @code{nnfolder} provides a
+itself puts @emph{all} one's mail in one file; @code{nnfolder} provides a
little bit of optimization to this so that each of one's mail groups has
a Unix mail box file. It's faster than @code{nnmbox} because each group
can be parsed separately, and still provides the simple Unix mail box
@item nnslashdot-directory
@vindex nnslashdot-directory
Where @code{nnslashdot} will store its files. The default is
-@samp{~/News/slashdot/}.
+@file{~/News/slashdot/}.
@item nnslashdot-active-url
@vindex nnslashdot-active-url
@item nnultimate-directory
@vindex nnultimate-directory
The directory where @code{nnultimate} stores its files. The default is
-@samp{~/News/ultimate/}.
+@file{~/News/ultimate/}.
@end table
@item nnwarchive-directory
@vindex nnwarchive-directory
The directory where @code{nnwarchive} stores its files. The default is
-@samp{~/News/warchive/}.
+@file{~/News/warchive/}.
@item nnwarchive-login
@vindex nnwarchive-login
@item nnrss-directory
@vindex nnrss-directory
The directory where @code{nnrss} stores its files. The default is
-@samp{~/News/rss/}.
+@file{~/News/rss/}.
@end table
manipulate mails stored on the @sc{imap} server. This is the kind of
usage explained in this section.
-A server configuration in @code{~/.gnus} with a few @sc{imap} servers
+A server configuration in @file{~/.gnus} with a few @sc{imap} servers
might look something like the following. (Note that for SSL/TLS, you
need external programs and libraries, see below.)
always a reliable indication of when it was posted. Hell, some people
just don't give a damn.
-The above predicates apply to *all* the groups which belong to the
+The above predicates apply to @emph{all} the groups which belong to the
category. However, if you wish to have a specific predicate for an
individual group within a category, or you're just too lazy to set up a
new category, you can enter a group's individual predicate in it's group
@item
Agent score file
-These score files must *only* contain the permitted scoring keywords
-stated above.
+These score files must @emph{only} contain the permitted scoring
+keywords stated above.
example:
These directives in either the category definition or a group's
parameters will cause the agent to read in all the applicable score
-files for a group, *filtering out* those sections that do not
+files for a group, @emph{filtering out} those sections that do not
relate to one of the permitted subset of scoring keywords.
@itemize @bullet
@item If I read an article while plugged, and the article already exists in the Agent, will it get downloaded once more?
-@strong{No}, unless @code{gnus-agent-cache} is `nil'.
+@strong{No}, unless @code{gnus-agent-cache} is @code{nil}.
@end table
that do explicitly say so in this manual. To apply the process/prefix
convention to commands that do not use it, you can use the @kbd{M-&}
command. For instance, to mark all the articles in the group as
-expirable, you could say `M P b M-& E'.
+expirable, you could say @kbd{M P b M-& E}.
@node Interactive
@item
code
-@example
+@lisp
(defvar spam-use-blackbox nil
"True if blackbox should be used.")
-@end example
+@end lisp
Add
@example
Note you don't have to provide a spam or a ham processor. Only
provide them if Blackbox supports spam or ham processing.
-@example
+@lisp
(defvar gnus-group-spam-exit-processor-blackbox "blackbox"
"The Blackbox summary exit spam processor.
Only applicable to spam groups.")
"The whitelist summary exit ham processor.
Only applicable to non-spam (unclassified and ham) groups.")
-@end example
+@end lisp
@item
functionality
-@example
+@lisp
(defun spam-blackbox-register-spam-routine ()
(spam-generic-register-routine
;; the spam function
(let ((from (spam-fetch-field-from-fast article)))
(when (stringp from)
(blackbox-do-something-with-this-ham-sender from))))))
-@end example
+@end lisp
Write the @code{blackbox-do-something-with-this-ham-sender} and
@code{blackbox-do-something-with-this-spammer} functions. You can add
In order to use @code{spam-stat} to split your mail, you need to add the
following to your @file{~/.gnus} file:
-@example
+@lisp
(require 'spam-stat)
(spam-stat-load)
-@end example
+@end lisp
This will load the necessary Gnus code, and the dictionary you
created.
spam or it should go into @samp{mail.misc}. If it is spam, then
@code{spam-stat-split-fancy} will return @samp{mail.spam}.
-@example
+@lisp
(setq nnmail-split-fancy
`(| (: spam-stat-split-fancy)
"mail.misc"))
-@end example
+@end lisp
@defvar spam-stat-split-fancy-spam-group
The group to use for spam. Default is @samp{mail.spam}.
the following expression. Only mails not matching the regular
expression are considered potential spam.
-@example
+@lisp
(setq nnmail-split-fancy
`(| ("Subject" "\\bspam-stat\\b" "mail.emacs")
(: spam-stat-split-fancy)
"mail.misc"))
-@end example
+@end lisp
If you want to filter for spam first, then you must be careful when
creating the dictionary. Note that @code{spam-stat-split-fancy} must
non-spam, therefore both should be in your collection of non-spam
mails, when creating the dictionary!
-@example
+@lisp
(setq nnmail-split-fancy
`(| (: spam-stat-split-fancy)
("Subject" "\\bspam-stat\\b" "mail.emacs")
"mail.misc"))
-@end example
+@end lisp
You can combine this with traditional filtering. Here, we move all
HTML-only mails into the @samp{mail.spam.filtered} group. Note that since
nor in your collection of non-spam mails, when creating the
dictionary!
-@example
+@lisp
(setq nnmail-split-fancy
`(| ("Content-Type" "text/html" "mail.spam.filtered")
(: spam-stat-split-fancy)
("Subject" "\\bspam-stat\\b" "mail.emacs")
"mail.misc"))
-@end example
+@end lisp
@node Low-level interface to the spam-stat dictionary
Make sure you load the dictionary before using it. This requires the
following in your @file{~/.gnus} file:
-@example
+@lisp
(require 'spam-stat)
(spam-stat-load)
-@end example
+@end lisp
Typical test will involve calls to the following functions:
This macro defines some common functions that almost all back ends should
have.
-@example
+@lisp
(nnoo-define-basics nndir)
-@end example
+@end lisp
@item deffoo
This macro is just like @code{defun} and takes the same parameters. In
This macro allows mapping of functions from the current back end to
functions from the parent back ends.
-@example
+@lisp
(nnoo-map-functions nndir
(nnml-retrieve-headers 0 nndir-current-group 0 0)
(nnmh-request-article 0 nndir-current-group 0 0))
-@end example
+@end lisp
This means that when @code{nndir-retrieve-headers} is called, the first,
third, and fourth parameters will be passed on to
last thing in the source file, since it will only define functions that
haven't already been defined.
-@example
+@lisp
(nnoo-import nndir
(nnmh
nnmh-request-list
nnmh-request-newgroups)
(nnml))
-@end example
+@end lisp
This means that calls to @code{nndir-request-list} should just be passed
on to @code{nnmh-request-list}, while all public functions from