X-Git-Url: http://cgit.sxemacs.org/?a=blobdiff_plain;f=lisp%2Fgnus-soup.el;h=2a910e31736544c2e70b266e0f0bc0d4703eb47d;hb=c7ddfabc9445e0a7a30d301f05d43f2b03d3f9b5;hp=0acb1f22f09eb5f30efc7082887b11afb9dbd485;hpb=b36b862ca27ad784cbad9cdb36e9d1a97b0c0b97;p=gnus diff --git a/lisp/gnus-soup.el b/lisp/gnus-soup.el index 0acb1f22f..2a910e317 100644 --- a/lisp/gnus-soup.el +++ b/lisp/gnus-soup.el @@ -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)