From 997ebef3267991f88df4495dc24821113fd0377e Mon Sep 17 00:00:00 2001 From: yamaoka Date: Thu, 2 Oct 2003 23:35:08 +0000 Subject: [PATCH] Synch to Gnus 200310022323. --- contrib/starttls.el | 7 ++++--- lisp/ChangeLog | 15 +++++++++++++++ lisp/mm-decode.el | 14 +++++++++++++- lisp/spam.el | 1 + texi/ChangeLog | 10 ++++++++++ texi/emacs-mime.texi | 11 ++++++++++- texi/gnus-ja.texi | 14 ++++++++++++++ texi/gnus.texi | 13 +++++++++++++ 8 files changed, 80 insertions(+), 5 deletions(-) diff --git a/contrib/starttls.el b/contrib/starttls.el index 8005b8d..229daf1 100644 --- a/contrib/starttls.el +++ b/contrib/starttls.el @@ -27,6 +27,8 @@ ;; This package implements a simple wrapper around the GNU TLS command ;; line application "gnutls-cli" to make Emacs support STARTTLS. ;; +;; This package require GNUTLS 0.9.8 (released 2003-10-02) or later. +;; ;; Usage is similar to `open-network-stream', i.e.: ;; ;; (setq tmp (open-starttls-stream "test" (current-buffer) "cyrus.andrew.cmu.edu" 143)) @@ -136,7 +138,7 @@ The default is what GNUTLS's \"gnutls-cli\" outputs." This should typically only be done once. It typically return a multi-line informational message with information about the handshake, or NIL on failure." - (let (buffer response old-max done-ok done-bad) + (let (buffer info old-max done-ok done-bad) (if (null (setq buffer (process-buffer process))) ;; XXX how to remove/extract the TLS negotiation junk? (signal-process (process-id process) 'SIGALRM) @@ -187,8 +189,7 @@ specifying a port number to connect to." "-p" (if (integerp service) (int-to-string service) service) - starttls-extra-args)) - response) + starttls-extra-args))) (process-kill-without-query process) (while (and process (memq (process-status process) '(open run)) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index bfe4b8c..583a994 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,18 @@ +2003-10-03 Jesper Harder + + * mm-decode.el (mm-file-name-delete-control) + (mm-file-name-delete-gotchas): New functions. + (mm-file-name-rewrite-functions): Use them. + +2003-10-02 Reiner Steib + + * spam.el (spam-install-hooks-function): Added Autoload cookie. + +2003-10-02 Jesper Harder + + * pgg-def.el (pgg-default-keyserver-address): Change to + subkeys.pgp.net. From Michael Shields + 2003-10-01 Simon Josefsson * message.el (message-idna-to-ascii-rhs-1): RHS can be terminated diff --git a/lisp/mm-decode.el b/lisp/mm-decode.el index 90701b6..f2abc4d 100644 --- a/lisp/mm-decode.el +++ b/lisp/mm-decode.el @@ -323,11 +323,14 @@ to: :type 'boolean :group 'mime-display) -(defvar mm-file-name-rewrite-functions nil +(defvar mm-file-name-rewrite-functions + '(mm-file-name-delete-control mm-file-name-delete-gotchas) "*List of functions used for rewriting file names of MIME parts. Each function takes a file name as input and returns a file name. Ready-made functions include +`mm-file-name-delete-control' +`mm-file-name-delete-gotchas' `mm-file-name-delete-whitespace', `mm-file-name-trim-whitespace', `mm-file-name-collapse-whitespace', @@ -1023,6 +1026,15 @@ string if you do not like underscores." (setq file-name (replace-match s t t file-name)))) file-name) +(defun mm-file-name-delete-control (filename) + "Delete control characters from FILENAME." + (gnus-replace-in-string filename "[\x00-\x1f\x7f]" "")) + +(defun mm-file-name-delete-gotchas (filename) + "Delete shell gotchas from FILENAME." + (setq filename (gnus-replace-in-string filename "[<>|]" "")) + (gnus-replace-in-string filename "^[.-]*" "")) + (defun mm-save-part (handle) "Write HANDLE to a file." (let* ((name (mail-content-type-get (mm-handle-type handle) 'name)) diff --git a/lisp/spam.el b/lisp/spam.el index 38ea176..a12d45e 100644 --- a/lisp/spam.el +++ b/lisp/spam.el @@ -1219,6 +1219,7 @@ Uses `gnus-newsgroup-name' if category is nil (for ham registration)." ;;;; Hooks +;;;###autoload (defun spam-install-hooks-function () "Install the spam.el hooks" (interactive) diff --git a/texi/ChangeLog b/texi/ChangeLog index fe8dc6e..afb90be 100644 --- a/texi/ChangeLog +++ b/texi/ChangeLog @@ -1,3 +1,13 @@ +2003-10-03 Jesper Harder + + * emacs-mime.texi (Files and Directories): Update. + +2003-10-02 Teodor Zlatanov + + * gnus.texi (Filtering Spam Using The Spam ELisp Package): added + spam-process-ham-in-spam-groups and + spam-process-ham-in-nonham-groups variable descriptions + 2003-10-01 Jesper Harder * message.texi (Various Message Variables): Typo. diff --git a/texi/emacs-mime.texi b/texi/emacs-mime.texi index 4e359b2..15df635 100644 --- a/texi/emacs-mime.texi +++ b/texi/emacs-mime.texi @@ -430,6 +430,16 @@ parts. Each function is applied successively to the file name. Ready-made functions include @table @code +@item mm-file-name-delete-control +@findex mm-file-name-delete-control +Delete all control characters. + +@item mm-file-name-delete-gotchas +@findex mm-file-name-delete-gotchas +Delete characters that could have unintended consequences when used +with flawed shell scripts, i.e. @samp{|}, @samp{>} and @samp{<}; and +@samp{-}, @samp{.} as the first character. + @item mm-file-name-delete-whitespace @findex mm-file-name-delete-whitespace Remove all whitespace. @@ -448,7 +458,6 @@ Collapse multiple whitespace characters. Replace whitespace with underscores. Set the variable @code{mm-file-name-replace-whitespace} to any other string if you do not like underscores. - @end table The standard Emacs functions @code{capitalize}, @code{downcase}, diff --git a/texi/gnus-ja.texi b/texi/gnus-ja.texi index 2f9c4a4..b0c8761 100644 --- a/texi/gnus-ja.texi +++ b/texi/gnus-ja.texi @@ -21586,6 +21586,20 @@ Spam $B%0%k!<%W$G$O!"%G%#%U%)%k%H$G$9$Y$F$N%a%C%;!<%8$,(B spam $B$G$"$k$H2rl9g$O(B @code{t} $B$K$7$F2<$5$$!#DL>o$3$l$O9T$J$o$l$^$;$s!#$"(B +$B$J$?$,<+J,$G(B ham $B5-;v$r(B ham $B%0%k!<%W$KAw$C$F!"$=$3$G=hM}$9$k$3$H$,4|BT$5(B +$B$l$F$$$^$9!#(B + +@vindex spam-process-ham-in-nonham-groups +$BJQ?t(B @code{spam-process-ham-in-nonham-groups} $B$O%G%#%U%)%k%H$G(B +$B$O(B @code{nil} $B$G$9!#(BHam $B$G$O$J$$(B (spam $B$^$?$OL$J,N`$N(B) $B%0%k!<%W$G8+$D$+$C(B +$B$?(B ham $B$,%W%m%;%C%5!<$KAw$i$l$k$h$&$K$7$?$$>l9g$O(B @code{t} $B$K$7$F2<$5$$!#(B +$BDL>o$3$l$O9T$J$o$l$^$;$s!#$"$J$?$,<+J,$G(B ham $B5-;v$r(B ham $B%0%k!<%W$KAw$C$F!"(B +$B$=$3$G=hM}$9$k$3$H$,4|BT$5$l$F$$$^$9!#(B + @vindex gnus-spam-process-destinations @emph{Ham} $B$^$?$O(B @emph{$BL$J,N`(B} $B%0%k!<%W$rH4$1$k$H$-$K!"$9$Y$F(B $B$N(B @strong{spam} $B5-;v$O!"(B@code{spam-process-destination} $B%0%k!<%W%Q%i%a!<(B diff --git a/texi/gnus.texi b/texi/gnus.texi index e0ee090..22b72cf 100644 --- a/texi/gnus.texi +++ b/texi/gnus.texi @@ -22452,6 +22452,19 @@ set, the ham articles are marked as unread before being moved. When you leave a @emph{ham} group, all ham-marked articles are sent to a ham processor, which will study these as non-spam samples. +@vindex spam-process-ham-in-spam-groups +By default the variable @code{spam-process-ham-in-spam-groups} is +nil. Set it to t if you want ham found in spam groups to be +processed. Normally this is not done, you are expected instead to +send your ham to a ham group and process it there. + +@vindex spam-process-ham-in-nonham-groups +By default the variable @code{spam-process-ham-in-nonham-groups} is +nil. Set it to t if you want ham found in non-ham (spam or +unclassified) groups to be processed. Normally this is not done, you +are expected instead to send your ham to a ham group and process it +there. + @vindex gnus-spam-process-destinations When you leave a @emph{ham} or @emph{unclassified} group, all @strong{spam} articles are moved to a location determined by either -- 1.7.10.4