*** empty log message ***
[gnus] / lisp / gnus-soup.el
index 0acb1f2..2a910e3 100644 (file)
@@ -57,6 +57,9 @@ The SOUP packet file name will be inserted at the %s.")
 (defvar gnus-soup-packet-regexp "Soupin"
   "*Regular expression matching SOUP REPLIES packets in `gnus-soup-packet-directory'.")
 
+(defvar gnus-soup-ignored-headers "^Xref:"
+  "*Regexp to match headers to be removed when brewing SOUP packets.")
+
 ;;; Internal Variables:
 
 (defvar gnus-soup-encoding-type ?n
@@ -140,6 +143,9 @@ move those articles instead."
          (set-buffer tmp-buf)
          (when (gnus-request-article-this-buffer 
                 (car articles) gnus-newsgroup-name)
+           (save-restriction
+             (message-narrow-to-headers)
+             (message-remove-header gnus-soup-ignored-headers t))
            (gnus-soup-store gnus-soup-directory prefix headers
                             gnus-soup-encoding-type 
                             gnus-soup-index-type)
@@ -271,19 +277,19 @@ If NOT-ALL, don't pack ticked articles."
                   (gnus-range-length (cdr (assq 'tick (gnus-info-marks 
                                                        (nth 2 entry)))))))
       (when (gnus-summary-read-group group nil t)
-       (let ((gnus-newsgroup-processable
+       (setq gnus-newsgroup-processable
+             (reverse
               (if (not not-all)
-                  (reverse (append gnus-newsgroup-marked
-                                   gnus-newsgroup-unreads))
-                (reverse gnus-newsgroup-unreads))))
-         (gnus-soup-add-article nil))
+                  (append gnus-newsgroup-marked gnus-newsgroup-unreads)
+                gnus-newsgroup-unreads)))
+       (gnus-soup-add-article nil)
        (gnus-summary-exit)))))
 
 (defun gnus-soup-insert-idx (offset header)
   ;; [number subject from date id references chars lines xref]
   (goto-char (point-max))
   (insert
-   (format "%d\t%s\t%s\t%s\t%s\t%s\t%d\t%s\t%s\t\n"
+   (format "%d\t%s\t%s\t%s\t%s\t%s\t%d\t%s\t\t\n"
           offset
           (or (mail-header-subject header) "(none)")
           (or (mail-header-from header) "(nobody)")
@@ -295,8 +301,7 @@ If NOT-ALL, don't pack ticked articles."
                        (current-time) "-")))
           (or (mail-header-references header) "")
           (or (mail-header-chars header) 0) 
-          (or (mail-header-lines header) "0") 
-          (or (mail-header-xref header) ""))))
+          (or (mail-header-lines header) "0"))))
 
 (defun gnus-soup-save-areas ()
   (gnus-soup-write-areas)
@@ -533,12 +538,12 @@ Return whether the unpacking was successful."
                (message "Sending news message to %s..."
                         (mail-fetch-field "newsgroups"))
                (sit-for 1)
-               (gnus-inews-article))
+               (funcall message-send-news-function))
               ((string= (gnus-soup-reply-kind (car replies)) "mail")
                (message "Sending mail to %s..."
                         (mail-fetch-field "to"))
                (sit-for 1)
-               (gnus-mail-send-and-exit))
+               (funcall message-send-mail-function))
               (t
                (error "Unknown reply kind")))
              (set-buffer msg-buf)