(function :format "%v" nnmail-)
string))
-(defcustom nnmail-fancy-expiry-targets nil
+(defcustom nnmail-fancy-expiry-targets nil
"Determine expiry target based on articles using fancy techniques.
This is a list of (\"HEADER\" \"REGEXP\" \"TARGET\") entries. If
:type '(repeat (list (choice :tag "Match against"
(string :tag "Header")
(const to-from))
- regexp
- (string :tag "Target group format string"))))
+ regexp
+ (string :tag "Target group format string"))))
(defcustom nnmail-cache-accepted-message-ids nil
"If non-nil, put Message-IDs of Gcc'd articles into the duplicate cache.
:type 'hook)
(defcustom nnmail-large-newsgroup 50
- "*The number of the articles which indicates a large newsgroup.
+ "*The number of the articles which indicates a large newsgroup or nil.
If the number of the articles is greater than the value, verbose
messages will be shown to indicate the current status."
:group 'nnmail-various
- :type 'integer)
+ :type '(choice (const :tag "infinite" nil)
+ (number :tag "count")))
(defcustom nnmail-split-fancy "mail.misc"
"Incoming mail can be split according to this fancy variable.
junk: Mail will be deleted. Use with care! Do not submerge in water!
Example:
(setq nnmail-split-fancy
- '(| (\"Subject\" \"MAKE MONEY FAST\" junk)
- ...other.rules.omitted...))
+ '(| (\"Subject\" \"MAKE MONEY FAST\" junk)
+ ...other.rules.omitted...))
FIELD must match a complete field name. VALUE must match a complete
word according to the `nnmail-split-fancy-syntax-table' syntax table.
:group 'nnmail
:type 'integer)
+(defcustom nnmail-mail-splitting-charset nil
+ "Default charset to be used when splitting incoming mail."
+ :group 'nnmail
+ :type 'symbol)
+
;;; Internal variables.
(defvar nnmail-article-buffer " *nnmail incoming*"
(erase-buffer)
;; Copy the headers into the work buffer.
(insert-buffer-substring obuf beg end)
+ ;; Decode MIME headers and charsets.
+ (let ((mail-parse-charset nnmail-mail-splitting-charset))
+ (mail-decode-encoded-word-region (point-min) (point-max)))
;; Fold continuation lines.
(goto-char (point-min))
(while (re-search-forward "\\(\r?\n[ \t]+\\)+" nil t)
(or (funcall nnmail-split-methods)
'("bogus"))
(error
- (nnheader-message 5
- "Error in `nnmail-split-methods'; using `bogus' mail group")
+ (nnheader-message
+ 5 "Error in `nnmail-split-methods'; using `bogus' mail group")
(sit-for 1)
'("bogus")))))
(setq split (gnus-remove-duplicates split))
(nnheader-set-temp-buffer "*Split Trace*")
(gnus-add-buffer)
(dolist (trace (nreverse nnmail-split-trace))
- (insert trace "\n"))
+ (prin1 trace (current-buffer))
+ (insert "\n"))
(goto-char (point-min))
(gnus-configure-windows 'split-trace)
(set-buffer restore)))
;; A group name. Do the \& and \N subs into the string.
((stringp split)
(when nnmail-split-tracing
- (push (format "\"%s\"" split) nnmail-split-trace))
+ (push split nnmail-split-trace))
(list (nnmail-expand-newtext split)))
;; Junk the message.
(while (and (goto-char end-point)
(re-search-backward (cdr cached-pair) nil t))
(when nnmail-split-tracing
- (push (cdr cached-pair) nnmail-split-trace))
+ (push split nnmail-split-trace))
(let ((split-rest (cddr split))
(end (match-end 0))
;; The searched regexp is \(\(FIELD\).*\)\(VALUE\).
(let ((value (nth 1 split)))
(if (symbolp value)
(setq value (cdr (assq value nnmail-split-abbrev-alist))))
- ;; Someone might want to do a \N sub on this match, so get the
+ ;; Someone might want to do a \N sub on this match, so get the
;; correct match positions.
(re-search-backward value start-of-value))
(dolist (sp (nnmail-split-it (car split-rest)))
(defvar group)
(defvar group-art-list)
(defvar group-art)
-(defun nnmail-cache-insert (id)
+(defun nnmail-cache-insert (id &optional grp)
(when nnmail-treat-duplicates
;; Store some information about the group this message is written
;; to. This function might have been called from various places.
;; the car of a pair is a group name. Should we check that the
;; length of the list is equal to 1? -- kai
(let ((g nil))
- (cond ((and (boundp 'group) group)
+ (cond (grp
+ (setq g grp))
+ ((and (boundp 'group) group)
(setq g group))
((and (boundp 'group-art-list) group-art-list
(listp group-art-list))