Except for gnus-uu.el, it will be synchronized functionally later.
+2000-05-14 16:19:28 Shenghuo ZHU <zsh@cs.rochester.edu>
+
+ * nnmail.el (nnmail-scan-directory-mail-source-once): New variable.
+ (nnmail-get-new-mail): Use it.
+ * gnus-start.el (gnus-get-unread-articles): Ditto.
+
+2000-05-14 14:02:12 Shenghuo ZHU <zsh@cs.rochester.edu>
+
+ * gnus-sum.el (gnus-summary-edit-article): Better support for
+ nndraft:drafts.
+ * nndraft.el (nndraft-request-replace-article): New function,
+ bind nnmail-file-coding-system.
+
+2000-05-14 Dave Love <fx@gnu.org>
+
+ * nnheader.el: Replace uses of `fset' with `defalias'.
+ (jka-compr-compression-info-list): Only defvar when compiling.
+
+2000-05-14 12:30:28 Shenghuo ZHU <zsh@cs.rochester.edu>
+
+ * webmail.el (webmail-netaddress-article): Refresh redirect.
+
+2000-05-13 20:41:10 Shenghuo ZHU <zsh@cs.rochester.edu>
+
+ * mm-view.el (mm-inline-text): w3 might not recognize utf-8.
+
+2000-05-13 16:49:41 Shenghuo ZHU <zsh@cs.rochester.edu>
+
+ * webmail.el: Translate to SP.
+
+2000-05-13 13:00:17 Robin S. Socha <robin@socha.net>
+
+ * message.el (message-bounce): Doc typo.
+
+2000-05-13 12:25:21 Shenghuo ZHU <zsh@cs.rochester.edu>
+
+ * gnus-soup.el (gnus-soup-encoding-type): u is USENET news format.
+ (gnus-soup-store): Ditto.
+ (gnus-soup-send-packet): Ditto.
+ * nnsoup.el (nnsoup-replies-format-type): Ditto.
+ (nnsoup-dissect-buffer): Ditto.
+ (nnsoup-narrow-to-article): Ditto.
+ (nnsoup-make-active): Ditto
+
+2000-05-13 12:03:29 Shenghuo ZHU <zsh@cs.rochester.edu>
+
+ * message.el (message-mode): Two parameters for local-variable-p.
+
+2000-05-13 00:54:46 Shenghuo ZHU <zsh@cs.rochester.edu>
+
+ * message.el (message-strip-list-identifiers): New function.
+ (message-reply): Use it and use message-strip-subject-re.
+ (message-followup): Ditto.
+ * gnus-art.el (article-hide-list-identifiers): Remove more.
+ * gnus-sum.el (gnus-summary-remove-list-identifiers): Ditto.
+
+2000-05-12 22:28:54 Shenghuo ZHU <zsh@cs.rochester.edu>
+
+ * gnus-uu.el (gnus-uu-digest-mail-forward): Bind
+ mail-parset-charset and use non-numeric argument.
+
+2000-05-12 20:54:11 Shenghuo ZHU <zsh@cs.rochester.edu>
+
+ * mml.el (mml-buffer-list): New variable.
+ (mml-generate-new-buffer): New function.
+ (mml-destroy-buffers): Ditto.
+ (mml-insert-mime): Use them.
+ * gnus-msg.el (gnus-setup-message): mml-buffer leaks.
+ * gnus-sum.el (gnus-summary-edit-article): Ditto.
+ * message.el (message-mode): Ditto.
+ * gnus-uu.el (gnus-uu-digest-headers): Keep MIME headers.
+ (gnus-uu-save-article): Support show-as-mml.
+ * message.el (message-forward): Ditto.
+
+2000-05-12 15:15:55 Shenghuo ZHU <zsh@cs.rochester.edu>
+
+ * nndoc.el (nndoc-type-alist): mime-digest head-begin.
+ (nndoc-mime-digest-type-p): Locate article head precisely.
+ * mml.el (mml-generate-default-type): New variable.
+ (mml-generate-mime-1): Use it.
+ (mml-insert-mime-headers): Use it.
+ * gnus-uu.el (gnus-uu-digest-buffer): New variable.
+ (gnus-uu-digest-mail-forward): Use it and call message-forward
+ with argument digest.
+ (gnus-uu-save-article): Support message-forward-as-mime.
+ * message.el (message-forward): Add parameter digest.
+ * mm-decode.el (mm-dissect-default-type): New variable.
+ (mm-dissect-buffer): Use it.
+
2000-05-11 11:08:03 Shenghuo ZHU <zsh@cs.rochester.edu>
* mml.el (mml-parse-singlepart-with-multiple-charsets): Set space,
(when regexp
(goto-char (point-min))
(when (re-search-forward
- (concat "^Subject: +\\(Re: +\\)?\\(" regexp " *\\)")
+ (concat "^Subject: +\\(\\(\\(Re: +\\)?\\(" regexp
+ " *\\)\\)+\\(Re: +\\)?\\)")
nil t)
- (delete-region (match-beginning 2) (match-end 0)))))))))
+ (let ((s (or (match-string 3) (match-string 5))))
+ (delete-region (match-beginning 1) (match-end 1))
+ (when s
+ (goto-char (match-beginning 1))
+ (insert s))))))))))
(defun article-hide-pgp ()
"Remove any PGP headers and signatures in the current article."
;;; Internal Variables:
-(defvar gnus-soup-encoding-type ?n
+(defvar gnus-soup-encoding-type ?u
"*Soup encoding type.
-`n' is news format, `m' is Unix mbox format, and `M' is MMDF mailbox
+`u' is USENET news format, `m' is Unix mbox format, and `M' is MMDF mailbox
format.")
(defvar gnus-soup-index-type ?c
;; a soup header.
(setq head-line
(cond
- ((= gnus-soup-encoding-type ?n)
+ ((or (= gnus-soup-encoding-type ?u)
+ (= gnus-soup-encoding-type ?n)) ;;Gnus back compatibility.
(format "#! rnews %d\n" (buffer-size)))
((= gnus-soup-encoding-type ?m)
(while (search-forward "\nFrom " nil t)
(tmp-buf (gnus-get-buffer-create " *soup send*"))
beg end)
(cond
- ((/= (gnus-soup-encoding-format
- (gnus-soup-reply-encoding (car replies)))
- ?n)
+ ((and (/= (gnus-soup-encoding-format
+ (gnus-soup-reply-encoding (car replies)))
+ ?u)
+ (/= (gnus-soup-encoding-format
+ (gnus-soup-reply-encoding (car replies)))
+ ?n)) ;; Gnus back compatibility.
(error "Unsupported encoding"))
((null msg-buf)
t)
;; hack: `nnmail-get-new-mail' changes the mail-source depending
;; on the group, so we must perform a scan for every group
;; if the users has any directory mail sources.
- (if (and (null (assq 'directory
+ ;; hack: if `nnmail-scan-directory-mail-source-once' is non-nil,
+ ;; for it scan all spool files even when the groups are
+ ;; not required.
+ (if (and
+ (or nnmail-scan-directory-mail-source-once
+ (null (assq 'directory
(or mail-sources
(if (listp nnmail-spool-file)
nnmail-spool-file
- (list nnmail-spool-file)))))
- (member method scanned-methods))
+ (list nnmail-spool-file))))))
+ (member method scanned-methods))
(setq active (gnus-activate-group group))
(setq active (gnus-activate-group group 'scan))
(push method scanned-methods))
gnus-list-identifiers
(mapconcat 'identity gnus-list-identifiers " *\\|"))))
(dolist (header gnus-newsgroup-headers)
- (when (string-match (concat "\\(Re: +\\)?\\(" regexp " *\\)")
+ (when (string-match (concat "\\(\\(\\(Re: +\\)?\\(" regexp
+ " *\\)\\)+\\(Re: +\\)?\\)")
(mail-header-subject header))
(mail-header-set-subject
header (concat (substring (mail-header-subject header)
- 0 (match-beginning 2))
+ 0 (match-beginning 1))
+ (or
+ (match-string 3 (mail-header-subject header))
+ (match-string 5 (mail-header-subject header)))
(substring (mail-header-subject header)
- (match-end 2))))))))
+ (match-end 1))))))))
(defun gnus-select-newsgroup (group &optional read-all select-articles)
"Select newsgroup GROUP.
(autoload 'gnus-request-post "gnus-int")
(autoload 'gnus-copy-article-buffer "gnus-msg")
(autoload 'gnus-alive-p "gnus-util")
+ (autoload 'gnus-list-identifiers "gnus-sum")
(autoload 'rmail-output "rmail")
(autoload 'mu-cite-original "mu-cite"))
(and (listp form) (eq (car form) 'lambda))
(byte-code-function-p form)))
+(defun message-strip-list-identifiers (subject)
+ "Remove list identifiers in `gnus-list-identifiers'."
+ (let ((regexp (if (stringp gnus-list-identifiers)
+ gnus-list-identifiers
+ (mapconcat 'identity gnus-list-identifiers " *\\|"))))
+ (if (string-match (concat "\\(\\(\\(Re: +\\)?\\(" regexp
+ " *\\)\\)+\\(Re: +\\)?\\)") subject)
+ (concat (substring subject 0 (match-beginning 1))
+ (or (match-string 3 subject)
+ (match-string 5 subject))
+ (substring subject
+ (match-end 1)))
+ subject)))
+
(defun message-strip-subject-re (subject)
"Remove \"Re:\" from subject lines."
(if (string-match message-subject-re-regexp subject)
date (message-fetch-field "date")
from (message-fetch-field "from")
subject (or (message-fetch-field "subject") "none"))
- ;; Remove any (buggy) Re:'s that are present and make a
- ;; proper one.
- (when (string-match message-subject-re-regexp subject)
- (setq subject (substring subject (match-end 0))))
+ (if gnus-list-identifiers
+ (setq subject (message-strip-list-identifiers subject)))
(setq subject (message-make-followup-subject subject))
(when (and (setq gnus-warning (message-fetch-field "gnus-warning"))
(let ((case-fold-search t))
(string-match "world" distribution)))
(setq distribution nil))
- ;; Remove any (buggy) Re:'s that are present and make a
- ;; proper one.
+ (if gnus-list-identifiers
+ (setq subject (message-strip-list-identifiers subject)))
(setq subject (message-make-followup-subject subject))
(widen))
subject))))
;;;###autoload
-(defun message-forward (&optional news)
+(defun message-forward (&optional news digest)
"Forward the current message via mail.
-Optional NEWS will use news to forward instead of mail."
+Optional NEWS will use news to forward instead of mail.
+Optional DIGEST will use digest to forward."
(interactive "P")
(let ((cur (current-buffer))
(subject (message-make-forward-subject))
;;;###autoload
(defun message-bounce ()
"Re-mail the current message.
-This only makes sense if the current message is a bounce message than
+This only makes sense if the current message is a bounce message that
contains some mail you have written which has been bounced back to
you."
(interactive)
(defvar mm-last-shell-command "")
(defvar mm-content-id-alist nil)
+;; According to RFC2046, in particular, in a digest, the default
+;; Content-Type value for a body part is changed from "text/plain" to
+;; "message/rfc822".
+(defvar mm-dissect-default-type "text/plain")
+
;;; The functions.
(defun mm-dissect-buffer (&optional no-strict-mime)
(if (or (not ctl)
(not (string-match "/" (car ctl))))
(mm-dissect-singlepart
- '("text/plain")
+ (list mm-dissect-default-type)
(and cte (intern (downcase (mail-header-remove-whitespace
(mail-header-remove-comments
cte)))))
result
(cond
((equal type "multipart")
- (cons (car ctl) (mm-dissect-multipart ctl)))
+ (let ((mm-dissect-default-type (if (equal subtype "digest")
+ "message/rfc822"
+ "text/plain")))
+ (cons (car ctl) (mm-dissect-multipart ctl))))
(t
(mm-dissect-singlepart
ctl
(and (boundp 'w3-meta-charset-content-type-regexp)
(re-search-forward
w3-meta-charset-content-type-regexp nil t)))
- (setq charset (w3-coding-system-for-mime-charset
- (buffer-substring-no-properties
- (match-beginning 2)
- (match-end 2)))))
+ (setq charset (or (w3-coding-system-for-mime-charset
+ (buffer-substring-no-properties
+ (match-beginning 2)
+ (match-end 2)))
+ charset)))
(delete-region (point-min) (point-max))
(insert (mm-decode-string text charset))
(save-window-excursion
with unknown encoding; `multipart': always send messages with more than
one charsets.")
+(defvar mml-generate-default-type "text/plain")
+
+(defvar mml-buffer-list nil)
+
+(defun mml-generate-new-buffer (name)
+ (let ((buf (generate-new-buffer name)))
+ (push buf mml-buffer-list)
+ buf))
+
+(defun mml-destroy-buffers ()
+ (let (kill-buffer-hook)
+ (mapcar 'kill-buffer mml-buffer-list)
+ (setq mml-buffer-list nil)))
+
(defun mml-parse ()
"Parse the current buffer as an MML document."
(goto-char (point-min))
(cond
((eq (car cont) 'mml)
(let ((mml-boundary (funcall mml-boundary-function
- (incf mml-multipart-number))))
+ (incf mml-multipart-number)))
+ (mml-generate-default-type "text/plain"))
(mml-to-mime))
(let ((mm-7bit-chars (concat mm-7bit-chars "\x1b")))
;; ignore 0x1b, it is part of iso-2022-jp
(insert "\n"))
((eq (car cont) 'multipart)
(let* ((type (or (cdr (assq 'type cont)) "mixed"))
+ (mml-generate-default-type (if (equal type "digest")
+ "message/rfc822"
+ "text/plain"))
(handler (assoc type mml-generate-multipart-alist)))
(if handler
(funcall (cdr handler) cont)
cont '(name access-type expiration size permission)))
(when (or charset
parameters
- (not (equal type "text/plain")))
+ (not (equal type mml-generate-default-type)))
(when (consp charset)
(error
"Can't encode a part with several charsets."))
(unless (stringp (car handle))
(unless (setq textp (equal (mm-handle-media-supertype handle) "text"))
(save-excursion
- (set-buffer (setq buffer (generate-new-buffer " *mml*")))
+ (set-buffer (setq buffer (mml-generate-new-buffer " *mml*")))
(mm-insert-part handle)
(if (setq mmlp (equal (mm-handle-media-type handle)
"message/rfc822"))
(article-transform-function . nndoc-transform-clari-briefs))
(mime-digest
(article-begin . "")
+ (head-begin . "^ ?\n")
(head-end . "^ ?$")
(body-end . "")
(file-end . "")
nil t)
(match-beginning 1))
(setq boundary-id (match-string 1)
- b-delimiter (concat "\n--" boundary-id "[\n \t]+"))
+ b-delimiter (concat "\n--" boundary-id "[ \t]*$"))
(setq entry (assq 'mime-digest nndoc-type-alist))
(setcdr entry
(list
+ (cons 'head-begin "^ ?\n")
(cons 'head-end "^ ?$")
(cons 'body-begin "^ ?\n")
(cons 'article-begin b-delimiter)
(nnoo-parent-function 'nndraft 'nnmh-request-accept-article
(list group server last noinsert))))
+(deffoo nndraft-request-replace-article (article group buffer)
+ (nndraft-possibly-change-group group)
+ (let ((nnmail-file-coding-system
+ (if (equal group "drafts")
+ mm-auto-save-coding-system
+ mm-text-coding-system)))
+ (nnoo-parent-function 'nndraft 'nnmh-request-replace-article
+ (list article group buffer))))
+
(deffoo nndraft-request-create-group (group &optional server args)
(nndraft-possibly-change-group group)
(if (file-exists-p nndraft-current-directory)
nnmh-close-group
nnmh-request-list
nnmh-request-newsgroups
- nnmh-request-move-article
- nnmh-request-replace-article))
+ nnmh-request-move-article))
(provide 'nndraft)
(erase-buffer))
(current-buffer))
-(defvar jka-compr-compression-info-list)
+(eval-when-compile (defvar jka-compr-compression-info-list))
(defvar nnheader-numerical-files
(if (boundp 'jka-compr-compression-info-list)
(concat "\\([0-9]+\\)\\("
"Strip all \r's from the current buffer."
(nnheader-skeleton-replace "\r"))
-(fset 'nnheader-run-at-time 'run-at-time)
-(fset 'nnheader-cancel-timer 'cancel-timer)
-(fset 'nnheader-cancel-function-timers 'cancel-function-timers)
+(defalias 'nnheader-run-at-time 'run-at-time)
+(defalias 'nnheader-cancel-timer 'cancel-timer)
+(defalias 'nnheader-cancel-function-timers 'cancel-function-timers)
(defun nnheader-Y-or-n-p (prompt)
"Ask user a \"Y/n\" question. Return t if answer is neither \"n\", \"N\" nor \"C-g\"."
(message "%s(Y/n) Yes" prompt)
t)))
-(when (string-match "XEmacs\\|Lucid" emacs-version)
+(when (string-match "XEmacs" emacs-version)
(require 'nnheaderxm))
(run-hooks 'nnheader-load-hook)
:group 'nnmail-procmail
:type 'boolean)
+(defcustom nnmail-scan-directory-mail-source-once nil
+ "*If non-nil, scan all incoming procmail sorted mails once.
+It scans low-level sorted spools even when not required."
+ :group 'nnmail-procmail
+ :type 'boolean)
+
(defcustom nnmail-delete-file-function 'delete-file
"Function called to delete files in some mail backends."
:group 'nnmail-files
nil))
;; Hack to only fetch the contents of a single group's spool file.
(when (and (eq (car source) 'directory)
+ (null nnmail-scan-directory-mail-source-once)
group)
(mail-source-bind (directory source)
(setq source (append source
(defvoo nnsoup-replies-directory (concat nnsoup-directory "replies/")
"*Directory where outgoing packets will be composed.")
-(defvoo nnsoup-replies-format-type ?n
+(defvoo nnsoup-replies-format-type ?u ;; u is USENET news format.
"*Format of the replies packages.")
(defvoo nnsoup-replies-index-type ?n
(nth 1 (nnsoup-article-to-area
article nnsoup-current-group))))))
(cond ((= kind ?m) 'mail)
- ((= kind ?n) 'news)
+ ((= kind ?n) 'news)
(t 'unknown)))))
(deffoo nnsoup-close-group (group &optional server)
(goto-char (point-min))
(cond
;; rnews batch format
- ((= format ?n)
+ ((or (= format ?u)
+ (= format ?n)) ;; Gnus back compatibility.
(while (looking-at "^#! *rnews \\(+[0-9]+\\) *$")
(forward-line 1)
(push (list
(let ((format (gnus-soup-encoding-format
(gnus-soup-area-encoding (nth 1 area)))))
(goto-char end)
- (when (or (= format ?n) (= format ?m))
+ (when (or (= format ?u) (= format ?n) (= format ?m))
(setq end (progn (forward-line -1) (point))))))
(set-buffer msg-buf))
(widen)
(if (not (setq elem (assoc group active)))
(push (list group (cons 1 lines)
(list (cons 1 lines)
- (vector ident group "ncm" "" lines)))
+ (vector ident group "ucm" "" lines)))
active)
(nconc elem
(list
(list (cons (1+ (setq min (cdadr elem)))
(+ min lines))
- (vector ident group "ncm" "" lines))))
+ (vector ident group "ucm" "" lines))))
(setcdr (cadr elem) (+ min lines)))
(setq files (cdr files)))
(nnheader-message 5 "")
(webmail-error "article@3.1"))
(delete-region (match-beginning 0) (point-max))
(nnweb-remove-markup)
- (nnweb-decode-entities)
+ (let ((w3-html-entities (cons '(nbsp . 32) w3-html-entities)))
+ (nnweb-decode-entities))
(goto-char (point-min))
(while (re-search-forward "\r\n?" nil t)
(replace-match "\n"))
(search-forward "</a>" nil t)
(delete-region p (match-end 0)))
(nnweb-remove-markup)
- (nnweb-decode-entities)
+ (let ((w3-html-entities (cons '(nbsp . 32) w3-html-entities)))
+ (nnweb-decode-entities))
(goto-char (point-min))
(delete-blank-lines)
(goto-char (point-min))
(if (looking-at "$") (forward-char))
(delete-region (point-min) (point))
(nnweb-remove-markup)
- (nnweb-decode-entities)
+ (let ((w3-html-entities (cons '(nbsp . 32) w3-html-entities)))
+ (nnweb-decode-entities))
nil)
(t
(setq mime t)
(search-forward "</a>" nil t)
(delete-region p (match-end 0)))
(nnweb-remove-markup)
- (nnweb-decode-entities)
+ (let ((w3-html-entities (cons '(nbsp . 32) w3-html-entities)))
+ (nnweb-decode-entities))
(goto-char (point-min))
(delete-blank-lines)
(goto-char (point-max))
(webmail-error "article@5"))
(narrow-to-region p (match-end 0))
(nnweb-remove-markup)
- (nnweb-decode-entities)
+ (let ((w3-html-entities (cons '(nbsp . 32) w3-html-entities)))
+ (nnweb-decode-entities))
(goto-char (point-min))
(delete-blank-lines)
(setq ct (mail-fetch-field "content-type")
(webmail-error "login@1")))
(defun webmail-netaddress-list ()
+ (webmail-refresh-redirect)
(let (item id)
(goto-char (point-min))
(when (re-search-forward
(while (re-search-forward "<br>" nil t)
(replace-match "\n"))
(nnweb-remove-markup)
- (nnweb-decode-entities)
+ (let ((w3-html-entities (cons '(nbsp . 32) w3-html-entities)))
+ (nnweb-decode-entities))
nil)
(t
(insert "<#part type=\"text/html\" disposition=inline>")
t)))
(defun webmail-netaddress-article (file id)
+ (webmail-refresh-redirect)
(let (p p1 attachment count mime type)
(save-restriction
(webmail-encode-8bit)
(while (search-forward "<b>" nil t)
(replace-match "\n"))
(nnweb-remove-markup)
- (nnweb-decode-entities)
+ (let ((w3-html-entities (cons '(nbsp . 32) w3-html-entities)))
+ (nnweb-decode-entities))
(goto-char (point-min))
(delete-blank-lines)
(goto-char (point-min))
(while (search-forward "<b>" nil t)
(replace-match "\n"))
(nnweb-remove-markup)
- (nnweb-decode-entities)
+ (let ((w3-html-entities (cons '(nbsp . 32) w3-html-entities)))
+ (nnweb-decode-entities))
(goto-char (point-min))
(delete-blank-lines)
(goto-char (point-min))