From: yamaoka Date: Mon, 17 Mar 2003 22:34:39 +0000 (+0000) Subject: Synch to Oort Gnus 200303171913. X-Git-Tag: t-gnus-6_15_17-00-quimby~1 X-Git-Url: http://git.chise.org/gitweb/?a=commitdiff_plain;h=4acd890922b58aaf459d74b8927c31fc93b9bca6;p=elisp%2Fgnus.git- Synch to Oort Gnus 200303171913. --- diff --git a/lisp/ChangeLog b/lisp/ChangeLog index d9927ad..77be1fc 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,10 +1,36 @@ +2003-03-12 Paul Jarc + + * nnmail.el (nnmail-cache-primary-mail-backend): Not all + 'respool-able backends define a global nnchoke-get-new-mail + variable. + +2003-03-17 Reiner Steib + + * gnus-art.el (gnus-mime-delete-part): New function. + (gnus-mime-action-alist, gnus-mime-button-commands): Use it. + 2003-03-17 Lars Magne Ingebrigtsen + * message.el (message-check-news-header-syntax): Don't push + groups twice onto list of unknown groups. + + * nndoc.el (nndoc-type-alist): Move exim-bounce a bit further + back. + + * nnheader.el (nnheader-find-etc-directory): Doc fix. + + * gnus-msg.el (gnus-inews-add-send-actions): Don't restore window + config unless the summary buffer exists. + + * gnus-sum.el (gnus-summary-next-group): Semi-exit group first to + that target group is computed correctly when articles are marked + as read by Xref handling. + * mail-source.el (mail-source-fetch-imap): Pass buffer-name to imap-open. * message.el (message-send-mail): Add courtesy string to Bcc's, - too. + too. * gnus-cite.el (gnus-cited-line-p): New function. diff --git a/lisp/gnus-art.el b/lisp/gnus-art.el index d4b6777..f1ad33d 100644 --- a/lisp/gnus-art.el +++ b/lisp/gnus-art.el @@ -866,6 +866,7 @@ used." (defcustom gnus-mime-action-alist '(("save to file" . gnus-mime-save-part) ("save and strip" . gnus-mime-save-part-and-strip) + ("delete part" . gnus-mime-delete-part) ("display as text" . gnus-mime-inline-part) ("view the part" . gnus-mime-view-part) ("pipe to command" . gnus-mime-pipe-part) @@ -4098,6 +4099,7 @@ General format specifiers can also be used. See Info node (gnus-mime-view-part-as-charset "C" "View As charset...") (gnus-mime-save-part "o" "Save...") (gnus-mime-save-part-and-strip "\C-o" "Save and Strip") + (gnus-mime-delete-part "d" "Delete part") (gnus-mime-copy-part "c" "View As Text, In Other Buffer") (gnus-mime-inline-part "i" "View As Text, In This Buffer") (gnus-mime-view-part-internally "E" "View Internally") @@ -4242,6 +4244,87 @@ General format specifiers can also be used. See Info node ,(gnus-group-read-only-p) ,gnus-summary-buffer no-highlight)))))) +(defun gnus-mime-delete-part () + "Delete the MIME part under point. +Replace it with some information about the removed part." + (interactive) + (gnus-article-check-buffer) + (let* ((data (get-text-property (point) 'gnus-data)) + (handles gnus-article-mime-handles) + (none "(none)") + (description + (or + (mail-decode-encoded-word-string (or (mm-handle-description data) + none)))) + (filename + (or (mail-content-type-get (mm-handle-disposition data) 'filename) + none)) + (type (mm-handle-media-type data))) + (if (mm-multiple-handles gnus-article-mime-handles) + (error "This function is not implemented")) + (with-current-buffer (mm-handle-buffer data) + (let ((bsize (format "%s" (buffer-size)))) + (erase-buffer) + (insert + (concat + "<#part type=text/plain nofile=yes disposition=attachment" + " description=\"Deleted attachment (" bsize " Byte)\">" + ",----\n" + "| The following attachment has been deleted:\n" + "|\n" + "| Type: " type "\n" + "| Filename: " filename "\n" + "| Size (encoded): " bsize " Byte\n" + "| Description: " description "\n" + "`----\n" + "<#/part>")) + (setcdr data + (cdr (mm-make-handle nil `("text/plain")))))) + (set-buffer gnus-summary-buffer) + ;; FIXME: maybe some of the following code (borrowed from + ;; `gnus-mime-save-part-and-strip') isn't necessary? + (gnus-article-edit-article + `(lambda () + (erase-buffer) + (let ((mail-parse-charset (or gnus-article-charset + ',gnus-newsgroup-charset)) + (mail-parse-ignored-charsets + (or gnus-article-ignored-charsets + ',gnus-newsgroup-ignored-charsets)) + (mbl mml-buffer-list)) + (setq mml-buffer-list nil) + (insert-buffer gnus-original-article-buffer) + (mime-to-mml ',handles) + (setq gnus-article-mime-handles nil) + (let ((mbl1 mml-buffer-list)) + (setq mml-buffer-list mbl) + (set (make-local-variable 'mml-buffer-list) mbl1)) + ;; LOCAL argument of add-hook differs between GNU Emacs + ;; and XEmacs. make-local-hook makes sure they are local. + (make-local-hook 'kill-buffer-hook) + (add-hook 'kill-buffer-hook 'mml-destroy-buffers t t))) + `(lambda (no-highlight) + (let ((mail-parse-charset (or gnus-article-charset + ',gnus-newsgroup-charset)) + (message-options message-options) + (message-options-set-recipient) + (mail-parse-ignored-charsets + (or gnus-article-ignored-charsets + ',gnus-newsgroup-ignored-charsets))) + (mml-to-mime) + (mml-destroy-buffers) + (remove-hook 'kill-buffer-hook + 'mml-destroy-buffers t) + (kill-local-variable 'mml-buffer-list)) + (gnus-summary-edit-article-done + ,(or (mail-header-references gnus-current-headers) "") + ,(gnus-group-read-only-p) + ,gnus-summary-buffer no-highlight)))) + ;; Not in `gnus-mime-save-part-and-strip': + (gnus-article-edit-done) + (gnus-summary-expand-window) + (gnus-summary-show-article)) + (defun gnus-mime-save-part () "Save the MIME part under point." (interactive) diff --git a/lisp/gnus-msg.el b/lisp/gnus-msg.el index 77ee13c..ae0185f 100644 --- a/lisp/gnus-msg.el +++ b/lisp/gnus-msg.el @@ -561,9 +561,11 @@ Gcc: header for archiving purposes." `(lambda (arg) (gnus-post-method arg ,gnus-newsgroup-name))) (setq message-user-agent (gnus-extended-version)) - (when (not message-use-multi-frames) + (unless message-use-multi-frames (message-add-action - `(set-window-configuration ,winconf) 'exit 'postpone 'kill)) + `(if (gnus-buffer-exists-p ,buffer) + (set-window-configuration ,winconf)) + 'exit 'postpone 'kill)) (let ((to-be-marked (cond (yanked yanked) (article (if (listp article) article (list article))) diff --git a/lisp/gnus-sum.el b/lisp/gnus-sum.el index 9eaa163..5cc2b95 100644 --- a/lisp/gnus-sum.el +++ b/lisp/gnus-sum.el @@ -6723,6 +6723,10 @@ previous group instead." (let ((current-group gnus-newsgroup-name) (current-buffer (current-buffer)) entered) + ;; First we semi-exit this group to update Xrefs and all variables. + ;; We can't do a real exit, because the window conf must remain + ;; the same in case the user is prompted for info, and we don't + ;; want the window conf to change before that... (gnus-summary-exit t) (while (not entered) ;; Then we find what group we are supposed to enter. @@ -6748,20 +6752,10 @@ previous group instead." (let ((unreads (gnus-group-group-unread))) (if (and (or (eq t unreads) (and unreads (not (zerop unreads)))) - (progn - ;; Now we semi-exit this group to update Xrefs - ;; and all variables. We can't do a real exit, - ;; because the window conf must remain the same - ;; in case the user is prompted for info, and we - ;; don't want the window conf to change before - ;; that... - (when (gnus-buffer-live-p current-buffer) - (set-buffer current-buffer) - (gnus-summary-exit t)) - (gnus-summary-read-group - target-group nil no-article - (and (buffer-name current-buffer) current-buffer) - nil backward))) + (gnus-summary-read-group + target-group nil no-article + (and (buffer-name current-buffer) current-buffer) + nil backward)) (setq entered t) (setq current-group target-group target-group nil))))))) diff --git a/lisp/message.el b/lisp/message.el index 1a1ed57..7abec7f 100644 --- a/lisp/message.el +++ b/lisp/message.el @@ -4499,8 +4499,9 @@ Otherwise, generate and save a value for `canlock-password' first." (gnus-groups-from-server method))) errors) (while groups - (unless (or (equal (car groups) "poster") - (member (car groups) known-groups)) + (when (and (not (equal (car groups) "poster")) + (not (member (car groups) known-groups)) + (not (member (car groups) errors))) (push (car groups) errors)) (pop groups)) (cond diff --git a/lisp/nndoc.el b/lisp/nndoc.el index 3599ff3..7de053d 100644 --- a/lisp/nndoc.el +++ b/lisp/nndoc.el @@ -58,9 +58,6 @@ from the document.") `((mmdf (article-begin . "^\^A\^A\^A\^A\n") (body-end . "^\^A\^A\^A\^A\n")) - (exim-bounce - (article-begin . "^------ This is a copy of the message, including all the headers. ------\n\n") - (body-end-function . nndoc-exim-bounce-body-end-function)) (nsmail (article-begin . "^From - ")) (news @@ -76,6 +73,9 @@ from the document.") (body-end . "\^_") (body-begin-function . nndoc-babyl-body-begin) (head-begin-function . nndoc-babyl-head-begin)) + (exim-bounce + (article-begin . "^------ This is a copy of the message, including all the headers. ------\n\n") + (body-end-function . nndoc-exim-bounce-body-end-function)) (rfc934 (article-begin . "^--.*\n+") (body-end . "^--.*$") diff --git a/lisp/nnheader.el b/lisp/nnheader.el index 3367820..b44790b 100644 --- a/lisp/nnheader.el +++ b/lisp/nnheader.el @@ -1454,7 +1454,9 @@ without formatting." (or (nth 7 (file-attributes file)) 0)) (defun nnheader-find-etc-directory (package &optional file) - "Go through the path and find the \".../etc/PACKAGE\" directory. + "Go through `load-path' and find the \"../etc/PACKAGE\" directory. +This function will look in the parent directory of each `load-path' +entry, and look for the \"etc\" directory there. If FILE, find the \".../etc/PACKAGE\" file instead." (let ((path load-path) dir result) diff --git a/lisp/nnmail.el b/lisp/nnmail.el index 79e8415..0cdc420 100644 --- a/lisp/nnmail.el +++ b/lisp/nnmail.el @@ -1512,12 +1512,16 @@ See the documentation for the variable `nnmail-split-fancy' for details." (defun nnmail-cache-primary-mail-backend () (let ((be-list (cons gnus-select-method gnus-secondary-select-methods)) (be nil) - (res nil)) + (res nil) + (get-new-mail nil)) (while (and (null res) be-list) (setq be (car be-list)) (setq be-list (cdr be-list)) (when (and (gnus-method-option-p be 'respool) - (eval (intern (format "%s-get-new-mail" (car be))))) + (setq get-new-mail + (intern (format "%s-get-new-mail" (car be)))) + (boundp get-new-mail) + (symbol-value get-new-mail)) (setq res be))) res)) diff --git a/texi/ChangeLog b/texi/ChangeLog index 4f511a3..836dfed 100644 --- a/texi/ChangeLog +++ b/texi/ChangeLog @@ -1,3 +1,7 @@ +2003-03-17 Reiner Steib + + * gnus.texi (Using MIME): Added gnus-mime-delete-part. + 2003-03-17 Lars Magne Ingebrigtsen * gnus.texi (Required Back End Functions): Add.