+2003-03-12 Paul Jarc <prj@po.cwru.edu>
+
+ * 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 <Reiner.Steib@gmx.de>
+
+ * 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 <larsi@gnus.org>
+ * 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.
(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)
(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")
,(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)
`(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)))
(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.
(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)))))))
(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
`((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
(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 . "^--.*$")
(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)
(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))
+2003-03-17 Reiner Steib <Reiner.Steib@gmx.de>
+
+ * gnus.texi (Using MIME): Added gnus-mime-delete-part.
+
2003-03-17 Lars Magne Ingebrigtsen <larsi@gnus.org>
* gnus.texi (Required Back End Functions): Add.