X-Git-Url: http://git.chise.org/gitweb/?a=blobdiff_plain;f=lisp%2Fnnmail.el;h=c7e37c2e48a1ad1dc5669fcfe8e19af7ee71ab4e;hb=b008f17a2c9cff5c7c0b0c669d54aba93c561a23;hp=5304d32f7406b18774065b586af03fca1c5fe0a6;hpb=8cfa576451fc393ec8ad0de58a89a0afd4343fbf;p=elisp%2Fgnus.git- diff --git a/lisp/nnmail.el b/lisp/nnmail.el index 5304d32..c7e37c2 100644 --- a/lisp/nnmail.el +++ b/lisp/nnmail.el @@ -507,8 +507,8 @@ nn*-request-list should have been called before calling this function." If SOURCE is a directory spec, try to return the group name component." (if (eq (car source) 'directory) (let ((file (file-name-nondirectory file))) - (mail-source-bind directory source - (if (string-match (concat (regexp-quote suffix "$") file)) + (mail-source-bind (directory source) + (if (string-match (concat (regexp-quote suffix) "$") file) (substring file 0 (match-beginning 0)) nil))) nil)) @@ -1245,6 +1245,13 @@ See the documentation for the variable `nnmail-split-fancy' for documentation." (t nnmail-treat-duplicates)))) group-art) + ;; We insert a line that says what the mail source is. + (let ((case-fold-search t)) + (goto-char (point-min)) + (re-search-forward "^message-id[ \t]*:" nil t) + (beginning-of-line) + (insert (format "X-Gnus-Mail-Source: %s\n" mail-source-string))) + ;; Let the backend save the article (or not). (cond ((not duplication) @@ -1307,7 +1314,8 @@ See the documentation for the variable `nnmail-split-fancy' for documentation." (list 'directory :path source)) (t (list 'file :path source))))) - (nnheader-message 3 "%s: Reading incoming mail %S..." method source) + (nnheader-message 4 "%s: Reading incoming mail from %s..." + method (car source)) (when (mail-source-fetch source `(lambda (file orig-file) @@ -1324,7 +1332,7 @@ See the documentation for the variable `nnmail-split-fancy' for documentation." (when exit-func (funcall exit-func)) (run-hooks 'nnmail-read-incoming-hook) - (nnheader-message 3 "%s: Reading incoming mail...done" method)) + (nnheader-message 4 "%s: Reading incoming mail...done" method)) ;; Close the message-id cache. (nnmail-cache-close) ;; Allow the user to hook.