From 9f158785ed0902adf59c06790f04d364cd687a61 Mon Sep 17 00:00:00 2001 From: Lars Magne Ingebrigtsen Date: Sat, 17 Apr 1999 16:42:06 +0000 Subject: [PATCH] *** empty log message *** --- lisp/ChangeLog | 75 +++++++++++++++++++++++++++++++++++ lisp/gnus-agent.el | 4 ++ lisp/gnus-art.el | 11 ++++- lisp/gnus-sum.el | 17 +++++--- lisp/gnus.el | 4 +- lisp/lpath.el | 2 +- lisp/mail-source.el | 21 ++++++++-- lisp/mm-decode.el | 97 ++++++++++++++++++++++++++------------------- lisp/mm-util.el | 1 - lisp/mml.el | 79 ++++++++++++++++++++++++++++-------- lisp/nnmail.el | 56 ++++++++++++++------------ lisp/pop3.el | 14 +++++-- lisp/uudecode.el | 13 +++--- texi/ChangeLog | 8 ++++ texi/gnus.texi | 38 ++++++++++++------ texi/message.texi | 6 +-- 16 files changed, 325 insertions(+), 121 deletions(-) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 553962577..aa0f0b7b6 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,78 @@ +Sat Apr 17 16:41:30 1999 Lars Magne Ingebrigtsen + + * gnus.el: Pterodactyl Gnus v0.82 is released. + +1999-04-15 Hrvoje Niksic + + * gnus-sum.el (gnus-group-charset-alist): Include Croatian groups + for iso8859-2. + +1999-04-17 18:23:50 Lars Magne Ingebrigtsen + + * mm-util.el (mm-charset-synonym-alist): Remove iso-2022-jp-2 from + synonym alist. + +1999-04-17 18:03:38 Adam P. Jenkins + + * gnus-sum.el (gnus-summary-local-variables): Mark as global. + +1999-04-17 18:02:05 Ettore Perazzoli + + * mail-source.el (mail-source-fetch): Ask before bugging out. + +1999-03-19 Hrvoje Niksic + + * uudecode.el (uudecode-decode-region-external): Don't assume + uudecode-temporary-file-directory ends with a slash. + +1999-03-18 Simon Josefsson + + * gnus-sum.el (gnus-update-marks): + (gnus-update-read-articles): + (gnus-summary-expire-articles): Check server. + +1999-03-16 Simon Josefsson + + * mml.el (mml-preview): New function. + +1999-04-17 17:10:21 William M. Perry + + * mail-source.el (mail-source-fetch-file): Return the right + value. + +1999-04-17 07:52:17 Lars Magne Ingebrigtsen + + * mml.el (mml-insert-parameter): New function. + (mml-insert-parameter-string): New function. + + * nnmail.el (nnmail-get-new-mail): Say how many new articles. + + * gnus-art.el (gnus-mime-multipart-functions): New variable. + (gnus-mime-display-part): Use it. + + * mm-decode.el (mm-alternative-precedence): Removed. + (mm-discouraged-alternatives): New variable. + (mm-preferred-alternative-precedence): New function. + + * nnmail.el (nnmail-get-new-mail): Use mail-sources. + + * mail-source.el (mail-sources): New variable. + + * gnus-art.el (article-remove-cr): Remove several trailing CRs. + + * mm-decode.el (mm-valid-image-format-p): New function. + (mm-inline-media-tests): Use it. + (mm-valid-and-fit-image-p): New function. + + * gnus-agent.el (gnus-agent-fetch-groups): Error when unplugged. + (gnus-agent-fetch-group): Ditto. + +1999-04-12 Didier Verna + + * nnmail.el (nnmail-article-group): in case of a group name + containing "\\n" constructs, be sure to pass the expanded value to + nn*-save-mail. + Sat Apr 17 05:40:45 1999 Lars Magne Ingebrigtsen * gnus.el: Pterodactyl Gnus v0.81 is released. diff --git a/lisp/gnus-agent.el b/lisp/gnus-agent.el index 737bfcff5..acc9b0d6b 100644 --- a/lisp/gnus-agent.el +++ b/lisp/gnus-agent.el @@ -364,11 +364,15 @@ be a select method." (defun gnus-agent-fetch-groups (n) "Put all new articles in the current groups into the Agent." (interactive "P") + (unless gnus-plugged + (error "Groups can't be fetched when Gnus is unplugged")) (gnus-group-iterate n 'gnus-agent-fetch-group)) (defun gnus-agent-fetch-group (group) "Put all new articles in GROUP into the Agent." (interactive (list (gnus-group-group-name))) + (unless gnus-plugged + (error "Groups can't be fetched when Gnus is unplugged")) (unless group (error "No group on the current line")) (let ((gnus-command-method (gnus-find-method-for-group group))) diff --git a/lisp/gnus-art.el b/lisp/gnus-art.el index e5d0a07dc..17c0cf20c 100644 --- a/lisp/gnus-art.el +++ b/lisp/gnus-art.el @@ -593,6 +593,9 @@ on parts -- for instance, adding Vcard info to a database." :group 'gnus-article-mime :type 'function) +(defcustom gnus-mime-multipart-functions nil + "An alist of MIME types to functions to display them.") + ;;; ;;; The treatment variables ;;; @@ -1290,12 +1293,12 @@ MAP is an alist where the elements are on the form (\"from\" \"to\")." (forward-sentence))))) (defun article-remove-cr () - "Translate CRLF pairs into LF, and then CR into LF.." + "Remove trailing CRs and then translate remaining CRs into LFs." (interactive) (save-excursion (let ((buffer-read-only nil)) (goto-char (point-min)) - (while (search-forward "\r$" nil t) + (while (search-forward "\r+$" nil t) (replace-match "" t t)) (goto-char (point-min)) (while (search-forward "\r" nil t) @@ -2965,6 +2968,10 @@ If ALL-HEADERS is non-nil, no headers are hidden." ;; Single part. ((not (stringp (car handle))) (gnus-mime-display-single handle)) + ;; User-defined multipart + ((cdr (assoc (car handle) gnus-mime-multipart-functions)) + (funcall (cdr (assoc (car handle) gnus-mime-multipart-functions)) + handle)) ;; multipart/alternative ((and (equal (car handle) "multipart/alternative") (not gnus-mime-display-multipart-as-mixed)) diff --git a/lisp/gnus-sum.el b/lisp/gnus-sum.el index dcba906f0..0a0c10755 100644 --- a/lisp/gnus-sum.el +++ b/lisp/gnus-sum.el @@ -802,7 +802,7 @@ which it may alter in any way.") ("^cn\\>\\|\\" cn-gb-2312) ("^fj\\>\\|^japan\\>" iso-2022-jp-2) ("^relcom\\>" koi8-r) - ("^\\(cz\\|hun\\|pl\\|sk\\)\\>" iso-8859-2) + ("^\\(cz\\|hun\\|pl\\|sk\\|hr\\)\\>" iso-8859-2) ("^israel\\>" iso-8859-1) ("^han\\>" euc-kr) ("^\\(comp\\|rec\\|alt\\|sci\\|soc\\|news\\|gnu\\|bofh\\)\\>" iso-8859-1) @@ -1029,7 +1029,8 @@ variable (string, integer, character, etc).") gnus-newsgroup-dependencies gnus-newsgroup-selected-overlay gnus-newsgroup-scored gnus-newsgroup-kill-headers gnus-thread-expunge-below - gnus-score-alist gnus-current-score-file gnus-summary-expunge-below + gnus-score-alist gnus-current-score-file + (gnus-summary-expunge-below . global) (gnus-summary-mark-below . global) gnus-newsgroup-active gnus-scores-exclude-files gnus-newsgroup-history gnus-newsgroup-ancient @@ -4306,9 +4307,11 @@ If SELECT-ARTICLES, only select those articles from GROUP." (set symbol (sort list '<)) t))) newmarked))) - (if delta-marks - (gnus-request-set-mark gnus-newsgroup-name delta-marks)) - + (when delta-marks + (unless (gnus-check-group gnus-newsgroup-name) + (error "Can't open server for %s" gnus-newsgroup-name)) + (gnus-request-set-mark gnus-newsgroup-name delta-marks)) + ;; Enter these new marks into the info of the group. (if (nthcdr 3 info) (setcar (nthcdr 3 info) newmarked) @@ -7424,6 +7427,8 @@ This will be the case if the article has both been mailed and posted." ;; There are expirable articles in this group, so we run them ;; through the expiry process. (gnus-message 6 "Expiring articles...") + (unless (gnus-check-group gnus-newsgroup-name) + (error "Can't open server for %s" gnus-newsgroup-name)) ;; The list of articles that weren't expired is returned. (save-excursion (if expiry-wait @@ -9133,6 +9138,8 @@ save those articles instead." (let ((del (gnus-remove-from-range (gnus-info-read info) read)) (add (gnus-remove-from-range read (gnus-info-read info)))) (when (or add del) + (unless (gnus-check-group group) + (error "Can't open server for %s" group)) (gnus-request-set-mark group (delq nil (list (if add (list add 'add '(read))) (if del (list del 'del '(read))))))))) diff --git a/lisp/gnus.el b/lisp/gnus.el index 7ae60c06f..84d63a9ee 100644 --- a/lisp/gnus.el +++ b/lisp/gnus.el @@ -260,7 +260,7 @@ is restarted, and sometimes reloaded." :link '(custom-manual "(gnus)Exiting Gnus") :group 'gnus) -(defconst gnus-version-number "0.81" +(defconst gnus-version-number "0.82" "Version number for this version of Gnus.") (defconst gnus-version (format "Pterodactyl Gnus v%s" gnus-version-number) @@ -1726,7 +1726,7 @@ gnus-newsrc-hashtb should be kept so that both hold the same information.") gnus-article-delete-invisible-text gnus-treat-article) ("gnus-art" :interactive t gnus-article-hide-headers gnus-article-hide-boring-headers - gnus-article-treat-overstrike gnus-article-word-wrap + gnus-article-treat-overstrike gnus-article-remove-cr gnus-article-remove-trailing-blank-lines gnus-article-display-x-face gnus-article-de-quoted-unreadable gnus-article-hide-pgp diff --git a/lisp/lpath.el b/lisp/lpath.el index dab58b5a4..d1e9a66ed 100644 --- a/lisp/lpath.el +++ b/lisp/lpath.el @@ -79,7 +79,7 @@ make-annotation w3-do-setup w3-region rmail-summary-exists rmail-select-summary rmail-update-summary - url-generic-parse-url + url-generic-parse-url valid-image-instantiator-format-p ))) (setq load-path (cons "." load-path)) diff --git a/lisp/mail-source.el b/lisp/mail-source.el index bd2776353..5a66e10af 100644 --- a/lisp/mail-source.el +++ b/lisp/mail-source.el @@ -34,6 +34,12 @@ "The mail-fetching library." :group 'gnus) +(defcustom mail-sources nil + "*Where the mail backends will look for incoming mail. +This variable is a list of mail source specifiers." + :group 'mail-source + :type 'sexp) + (defcustom mail-source-crash-box "~/.emacs-mail-crash-box" "File where mail will be stored while processing it." :group 'mail-source @@ -169,8 +175,15 @@ Return the number of files that were found." (when (file-exists-p mail-source-crash-box) (message "Processing mail from %s..." mail-source-crash-box) (setq found (mail-source-callback - callback mail-source-crash-box))) - (+ found (funcall function source callback))))) + callback mail-source-crash-box))) + (+ found + (condition-case err + (funcall function source callback) + (error + (unless (yes-or-no-p + (format "Mail source error. Continue? ")) + (error "Cannot get new mail.")) + 0)))))) (defun mail-source-make-complex-temp-name (prefix) (let ((newname (make-temp-name prefix)) @@ -306,8 +319,8 @@ If ARGS, PROMPT is used as an argument to `format'." (format-spec-make ?t mail-source-crash-box))))) (let ((mail-source-string (format "file:%s" path))) (if (mail-source-movemail path mail-source-crash-box) - (progn - (mail-source-callback callback path) + (prog1 + (mail-source-callback callback path) (when prescript (if (and (symbolp prescript) (fboundp prescript)) (funcall prescript) diff --git a/lisp/mm-decode.el b/lisp/mm-decode.el index 2a2e55a63..7b8318706 100644 --- a/lisp/mm-decode.el +++ b/lisp/mm-decode.el @@ -57,24 +57,15 @@ ,disposition ,description ,cache ,id)) (defvar mm-inline-media-tests - '(("image/jpeg" mm-inline-image - (and window-system (featurep 'jpeg) (mm-image-fit-p handle))) - ("image/png" mm-inline-image - (and window-system (featurep 'png) (mm-image-fit-p handle))) - ("image/gif" mm-inline-image - (and window-system (featurep 'gif) (mm-image-fit-p handle))) - ("image/tiff" mm-inline-image - (and window-system (featurep 'tiff) (mm-image-fit-p handle))) - ("image/xbm" mm-inline-image - (and window-system (fboundp 'device-type) (eq (device-type) 'x))) - ("image/x-xbitmap" mm-inline-image - (and window-system (fboundp 'device-type) (eq (device-type) 'x))) - ("image/xpm" mm-inline-image - (and window-system (featurep 'xpm))) - ("image/x-pixmap" mm-inline-image - (and window-system (featurep 'xpm))) - ("image/bmp" mm-inline-image - (and window-system (featurep 'bmp))) + '(("image/jpeg" mm-inline-image (mm-valid-and-fit-image-p 'jpeg handle)) + ("image/png" mm-inline-image (mm-valid-and-fit-image-p 'png handle)) + ("image/gif" mm-inline-image (mm-valid-and-fit-image-p 'gif handle)) + ("image/tiff" mm-inline-image (mm-valid-and-fit-image-p 'tiff handle)) + ("image/xbm" mm-inline-image (mm-valid-and-fit-image-p 'xbm handle)) + ("image/x-xbitmap" mm-inline-image (mm-valid-and-fit-image-p 'xbm handle)) + ("image/xpm" mm-inline-image (mm-valid-and-fit-image-p 'xpm handle)) + ("image/x-pixmap" mm-inline-image (mm-valid-and-fit-image-p 'xpm handle)) + ("image/bmp" mm-inline-image (mm-valid-and-fit-image-p 'bmp handle)) ("text/plain" mm-inline-text t) ("text/enriched" mm-inline-text t) ("text/richtext" mm-inline-text t) @@ -112,11 +103,16 @@ (defvar mm-user-automatic-external-display nil "List of MIME type regexps that will be displayed externally automatically.") -(defvar mm-alternative-precedence - '("multipart/related" "multipart/mixed" "multipart/alternative" - "image/jpeg" "image/gif" "text/html" "text/enriched" - "text/richtext" "text/plain") - "List that describes the precedence of alternative parts.") +(defvar mm-discouraged-alternatives nil + "List of MIME types that are discouraged when viewing multiapart/alternative. +Viewing agents are supposed to view the last possible part of a message, +as that is supposed to be the richest. However, users may prefer other +types instead, and this list says what types are most unwanted. If, +for instance, text/html parts are very unwanted, and text/richtech are +somewhat unwanted, then the value of this variable should be set +to: + + (\"text/html\" \"text/richtext\")") (defvar mm-tmp-directory (cond ((fboundp 'temp-directory) (temp-directory)) @@ -519,21 +515,21 @@ This overrides entries in the mailcap file." file))) ;; Now every coding system is 100% binary within mm-with-unibyte-buffer ;; Is text still special? - (let ((coding-system-for-write - (if (equal "text" (car (split-string - (car (mm-handle-type handle)) "/"))) - buffer-file-coding-system - 'binary)) - ;; Don't re-compress .gz & al. Arguably we should make - ;; `file-name-handler-alist' nil, but that would chop - ;; ange-ftp which it's reasonable to use here. - (inhibit-file-name-operation 'write-region) - (inhibit-file-name-handlers - (if (equal (car (mm-handle-type handle)) - "application/octet-stream") - (cons 'jka-compr-handler inhibit-file-name-handlers) - inhibit-file-name-handlers))) - (write-region (point-min) (point-max) file)))))) + (let ((coding-system-for-write + (if (equal "text" (car (split-string + (car (mm-handle-type handle)) "/"))) + buffer-file-coding-system + 'binary)) + ;; Don't re-compress .gz & al. Arguably we should make + ;; `file-name-handler-alist' nil, but that would chop + ;; ange-ftp which it's reasonable to use here. + (inhibit-file-name-operation 'write-region) + (inhibit-file-name-handlers + (if (equal (car (mm-handle-type handle)) + "application/octet-stream") + (cons 'jka-compr-handler inhibit-file-name-handlers) + inhibit-file-name-handlers))) + (write-region (point-min) (point-max) file)))))) (defun mm-pipe-part (handle) "Pipe HANDLE to a process." @@ -555,7 +551,8 @@ This overrides entries in the mailcap file." (defun mm-preferred-alternative (handles &optional preferred) "Say which of HANDLES are preferred." - (let ((prec (if preferred (list preferred) mm-alternative-precedence)) + (let ((prec (if preferred (list preferred) + (mm-preferred-alternative-precedence handles))) p h result type handle) (while (setq p (pop prec)) (setq h handles) @@ -577,6 +574,15 @@ This overrides entries in the mailcap file." (pop h))) result)) +(defun mm-preferred-alternative-precedence (handles) + "Return the precedence based on HANDLES and mm-discouraged-alternatives." + (let ((seq (mapcar (lambda (h) (car (mm-handle-type h))) handles))) + (dolist (disc (reverse mm-discouraged-alternatives)) + (dolist (elem (copy-sequence seq)) + (when (string-match disc elem) + (setq seq (nconc (delete elem seq) (list elem)))))) + seq)) + (defun mm-get-content-id (id) "Return the handle(s) referred to by ID." (cdr (assoc id mm-content-id-alist))) @@ -608,7 +614,7 @@ This overrides entries in the mailcap file." ;; specifier. (let ((file (make-temp-name (expand-file-name "emm.xbm" - mm-tmp-directory)))) + mm-tmp-directory)))) (unwind-protect (progn (write-region (point-min) (point-max) file) @@ -627,6 +633,17 @@ This overrides entries in the mailcap file." (and (< (glyph-width image) (window-pixel-width)) (< (glyph-height image) (window-pixel-height)))))) +(defun mm-valid-image-format-p (format) + "Say whether FORMAT can be displayed natively by Emacs." + (and (fboundp 'valid-image-instantiator-format-p) + (valid-image-instantiator-format-p format))) + +(defun mm-valid-and-fit-image-p (format handle) + "Say whether FORMAT can be displayed natively and HANDLE fits the window." + (and window-system + (mm-valid-image-format-p format) + (mm-image-fit-p handle))) + (provide 'mm-decode) ;; mm-decode.el ends here diff --git a/lisp/mm-util.el b/lisp/mm-util.el index 180732731..dfad2a2ad 100644 --- a/lisp/mm-util.el +++ b/lisp/mm-util.el @@ -126,7 +126,6 @@ (defvar mm-charset-synonym-alist '((big5 . cn-big5) (gb2312 . cn-gb-2312) - (iso-2022-jp-2 . iso-2022-7bit-ss2) (x-ctext . ctext)) "A mapping from invalid charset names to the real charset names.") diff --git a/lisp/mml.el b/lisp/mml.el index 30974b8d1..70abd888b 100644 --- a/lisp/mml.el +++ b/lisp/mml.el @@ -242,21 +242,23 @@ (when name (setq name (mml-parse-file-name name)) (if (stringp name) - (insert ";\n " (mail-header-encode-parameter "name" name) - "\";\n access-type=local-file") - (insert - (format ";\n " - (mail-header-encode-parameter - "name" (file-name-nondirectory (nth 2 name))) - (mail-header-encode-parameter "site" (nth 1 name)) - (mail-header-encode-parameter - "directory" (file-name-directory (nth 2 name))))) - (insert ";\n access-type=" - (if (member (nth 0 name) '("ftp@" "anonymous@")) - "anon-ftp" - "ftp")))) + (mml-insert-parameter + (mail-header-encode-parameter "name" name) + "access-type=local-file") + (mml-insert-parameter + (mail-header-encode-parameter + "name" (file-name-nondirectory (nth 2 name))) + (mail-header-encode-parameter "site" (nth 1 name)) + (mail-header-encode-parameter + "directory" (file-name-directory (nth 2 name)))) + (mml-insert-parameter + (concat "access-type=" + (if (member (nth 0 name) '("ftp@" "anonymous@")) + "anon-ftp" + "ftp"))))) (when parameters - (insert parameters))) + (mml-insert-parameter-string + cont '(expiration size permission)))) (insert "\n\n") (insert "Content-Type: " (cdr (assq 'type cont)) "\n") (insert "Content-ID: " (message-make-message-id) "\n") @@ -338,7 +340,8 @@ (insert "; " (mail-header-encode-parameter "charset" (symbol-name charset)))) (when parameters - (insert parameters)) + (mml-insert-parameter-string + cont '(name access-type expiration size permission))) (insert "\n")) (setq parameters (mml-parameter-string @@ -347,7 +350,8 @@ parameters) (insert "Content-Disposition: " (or disposition "inline")) (when parameters - (insert parameters)) + (mml-insert-parameter-string + cont '(filename creation-date modification-date read-date))) (insert "\n")) (unless (eq encoding '7bit) (insert (format "Content-Transfer-Encoding: %s\n" encoding))) @@ -363,12 +367,23 @@ ;; Strip directory component from the filename parameter. (when (eq type 'filename) (setq value (file-name-nondirectory value))) - (setq string (concat string ";\n " + (setq string (concat string "; " (mail-header-encode-parameter (symbol-name type) value))))) (when (not (zerop (length string))) string))) +(defun mml-insert-parameter-string (cont types) + (let (value type) + (while (setq type (pop types)) + (when (setq value (cdr (assq type cont))) + ;; Strip directory component from the filename parameter. + (when (eq type 'filename) + (setq value (file-name-nondirectory value))) + (mml-insert-parameter + (mail-header-encode-parameter + (symbol-name type) value)))))) + (defvar ange-ftp-path-format) (defvar efs-path-regexp) (defun mml-parse-file-name (path) @@ -455,6 +470,17 @@ (equal (split-string (car (mm-handle-type handle)) "/") "text") (insert ">\n"))) +(defun mml-insert-parameter (&rest parameters) + "Insert PARAMETERS in a nice way." + (dolist (param parameters) + (insert ";") + (let ((point (point))) + (insert " " param) + (when (> (current-column) 71) + (goto-char point) + (insert "\n ") + (end-of-line))))) + ;;; ;;; Mode for inserting and editing MML forms ;;; @@ -645,6 +671,25 @@ TYPE is the MIME type to use." (insert "<#/!multipart>\n") (forward-line -1)) +(defun mml-preview (&optional raw) + "Display current buffer with Gnus, in a new buffer. +If RAW, don't highlight the article." + (interactive "P") + (let ((buf (current-buffer))) + (switch-to-buffer (get-buffer-create + (concat (if raw "*Raw MIME preview of " + "*MIME preview of ") (buffer-name)))) + (erase-buffer) + (insert-buffer buf) + (mml-to-mime) + (unless raw + (run-hooks 'gnus-article-decode-hook) + (let ((gnus-newsgroup-name "dummy")) + (gnus-article-prepare-display))) + (fundamental-mode) + (setq buffer-read-only t) + (goto-char (point-min)))) + (provide 'mml) ;;; mml.el ends here diff --git a/lisp/nnmail.el b/lisp/nnmail.el index de31551d3..d120169ab 100644 --- a/lisp/nnmail.el +++ b/lisp/nnmail.el @@ -174,7 +174,7 @@ Eg.: (defcustom nnmail-spool-file '((file)) "*Where the mail backends will look for incoming mail. This variable is a list of mail source specifiers. -If this variable is nil, no mail backends will read incoming mail." +This variable is obsolete; `mail-sources' should be used instead." :group 'nnmail-files :type 'sexp) @@ -856,7 +856,7 @@ FUNC will be called with the group name to determine the article number." (let ((methods nnmail-split-methods) (obuf (current-buffer)) (beg (point-min)) - end group-art method regrepp) + end group-art method grp) (if (and (sequencep methods) (= (length methods) 1)) ;; If there is only just one group to put everything in, we @@ -923,25 +923,24 @@ FUNC will be called with the group name to determine the article number." (not group-art))) (goto-char (point-max)) (setq method (pop methods) - regrepp nil) + grp (car method)) (if (or methods (not (equal "" (nth 1 method)))) (when (and (ignore-errors (if (stringp (nth 1 method)) - (progn - (setq regrepp - (string-match "\\\\[0-9&]" (car method))) - (re-search-backward (cadr method) nil t)) + (let ((expand (string-match "\\\\[0-9&]" grp)) + (pos (re-search-backward (cadr method) + nil t))) + (and expand + (setq grp (nnmail-expand-newtext grp))) + pos) ;; Function to say whether this is a match. - (funcall (nth 1 method) (car method)))) + (funcall (nth 1 method) grp))) ;; Don't enter the article into the same ;; group twice. - (not (assoc (car method) group-art))) - (push (cons (if regrepp - (nnmail-expand-newtext (car method)) - (car method)) - (funcall func (car method))) + (not (assoc grp group-art))) + (push (cons grp (funcall func grp)) group-art)) ;; This is the final group, which is used as a ;; catch-all. @@ -1337,10 +1336,13 @@ See the documentation for the variable `nnmail-split-fancy' for documentation." (defun nnmail-get-new-mail (method exit-func temp &optional group spool-func) "Read new incoming mail." - (let* ((sources (if (listp nnmail-spool-file) nnmail-spool-file - (list nnmail-spool-file))) + (let* ((sources (or mail-sources + (if (listp nnmail-spool-file) nnmail-spool-file + (list nnmail-spool-file)))) (group-in group) (i 0) + (new 0) + (total 0) incoming incomings source) (when (and (nnmail-get-value "%s-get-new-mail" method) nnmail-spool-file) @@ -1375,9 +1377,9 @@ See the documentation for the variable `nnmail-split-fancy' for documentation." (list :predicate `(lambda (file) - (string-match + (string-match ,(concat - (regexp-quote (concat group suffix)) + (regexp-quote (concat group suffix)) "$") file))))))) (when nnmail-fetched-sources @@ -1387,13 +1389,16 @@ See the documentation for the variable `nnmail-split-fancy' for documentation." (when source (nnheader-message 4 "%s: Reading incoming mail from %s..." method (car source)) - (when (mail-source-fetch - source - `(lambda (file orig-file) - (nnmail-split-incoming - file ',(intern (format "%s-save-mail" method)) - ',spool-func (nnmail-get-split-group orig-file source) - ',(intern (format "%s-active-number" method))))) + (when (setq new + (mail-source-fetch + source + `(lambda (file orig-file) + (nnmail-split-incoming + file ',(intern (format "%s-save-mail" method)) + ',spool-func + (nnmail-get-split-group orig-file source) + ',(intern (format "%s-active-number" method)))))) + (incf total new) (incf i)))) ;; If we did indeed read any incoming spools, we save all info. (unless (zerop i) @@ -1403,7 +1408,8 @@ See the documentation for the variable `nnmail-split-fancy' for documentation." (when exit-func (funcall exit-func)) (run-hooks 'nnmail-read-incoming-hook) - (nnheader-message 4 "%s: Reading incoming mail...done" method)) + (nnheader-message 4 "%s: Reading incoming mail (%d new)...done" method + total)) ;; Close the message-id cache. (nnmail-cache-close) ;; Allow the user to hook. diff --git a/lisp/pop3.el b/lisp/pop3.el index 0b6318b8e..4b9697887 100644 --- a/lisp/pop3.el +++ b/lisp/pop3.el @@ -4,7 +4,7 @@ ;; Author: Richard L. Pieri ;; Keywords: mail, pop3 -;; Version: 1.3q +;; Version: 1.3r ;; This file is part of GNU Emacs. @@ -37,7 +37,7 @@ (require 'mail-utils) (provide 'pop3) -(defconst pop3-version "1.3m") +(defconst pop3-version "1.3r") (defvar pop3-maildrop (or (user-login-name) (getenv "LOGNAME") (getenv "USER") nil) "*POP3 maildrop.") @@ -246,7 +246,15 @@ Return the response string if optional second argument is non-nil." (setq From_ (concat (substring From_ 0 (match-beginning 0)) (substring From_ (match-end 0))))) (goto-char (point-min)) - (insert From_)))))) + (insert From_) + (re-search-forward "\n\n") + (narrow-to-region (point) (point-max)) + (let ((size (- (point-max) (point-min)))) + (goto-char (point-min)) + (widen) + (forward-line -2) + (insert (format "Content-Length: %s\n" size))) + ))))) ;; The Command Set diff --git a/lisp/uudecode.el b/lisp/uudecode.el index ea58b84e9..9e89cb7e7 100644 --- a/lisp/uudecode.el +++ b/lisp/uudecode.el @@ -2,7 +2,7 @@ ;; Copyright (c) 1998 by Shenghuo Zhu ;; Author: Shenghuo Zhu -;; $Revision: 5.5 $ +;; $Revision: 5.6 $ ;; Keywords: uudecode ;; This file is not part of GNU Emacs, but the same permissions @@ -55,7 +55,7 @@ input and write the converted data to its standard output.") (defvar uudecode-temporary-file-directory (cond ((fboundp 'temp-directory) (temp-directory)) ((boundp 'temporary-file-directory) temporary-file-directory) - ("/tmp/"))) + ("/tmp"))) ;;;###autoload (defun uudecode-decode-region-external (start end &optional file-name) @@ -75,9 +75,12 @@ If FILE-NAME is non-nil, save the result to FILE-NAME." (setq file-name (read-file-name "File to Name:" nil nil nil (match-string 1))))) - (setq tempfile (expand-file-name - (or file-name (concat uudecode-temporary-file-directory - (make-temp-name "uu"))))) + (setq tempfile (if file-name + (expand-file-name file-name) + (make-temp-name + ;; /tmp/uu... + (expand-file-name + "uu" uudecode-temporary-file-directory)))) (let ((cdir default-directory) default-process-coding-system) (unwind-protect (progn diff --git a/texi/ChangeLog b/texi/ChangeLog index 2933784ad..09976d185 100644 --- a/texi/ChangeLog +++ b/texi/ChangeLog @@ -1,3 +1,11 @@ +1999-03-25 Erik Toubro Nielsen + + * gnus.texi (gnus-thread-sort-functions). 'reverse' => 'not' + +1999-04-17 10:21:01 Jack Twilley + + * gnus.texi (Fancy Mail Splitting): Addition. + 1999-04-07 06:13:08 Lars Magne Ingebrigtsen * gnus.texi (Gnus Development): New. diff --git a/texi/gnus.texi b/texi/gnus.texi index ac4affa13..886d06aef 100644 --- a/texi/gnus.texi +++ b/texi/gnus.texi @@ -2,7 +2,7 @@ \input texinfo @c -*-texinfo-*- @setfilename gnus -@settitle Pterodactyl Gnus 0.81 Manual +@settitle Pterodactyl Gnus 0.82 Manual @synindex fn cp @synindex vr cp @synindex pg cp @@ -319,7 +319,7 @@ into another language, under the above conditions for modified versions. @tex @titlepage -@title Pterodactyl Gnus 0.81 Manual +@title Pterodactyl Gnus 0.82 Manual @author by Lars Magne Ingebrigtsen @page @@ -355,7 +355,7 @@ can be gotten by any nefarious means you can think of---@sc{nntp}, local spool or your mbox file. All at the same time, if you want to push your luck. -This manual corresponds to Pterodactyl Gnus 0.81. +This manual corresponds to Pterodactyl Gnus 0.82. @end ifinfo @@ -5307,7 +5307,7 @@ by number, you could do something like: (setq gnus-thread-sort-functions '(gnus-thread-sort-by-number gnus-thread-sort-by-subject - (reverse gnus-thread-sort-by-total-score))) + (not gnus-thread-sort-by-total-score))) @end lisp The threads that have highest score will be displayed first in the @@ -7094,6 +7094,10 @@ Here's an example function the does the latter: 'my-save-all-jpeg-parts) @end lisp +@vindex gnus-mime-multipart-functions +@item gnus-mime-multipart-functions +Alist of @sc{mime} multipart types and functions to handle them. + @end table @@ -10238,19 +10242,21 @@ All new mail files will get this file mode. The default is 384. @node Fetching Mail @subsubsection Fetching Mail +@vindex mail-sources @vindex nnmail-spool-file The way to actually tell Gnus where to get new mail from is to set -@code{nnmail-spool-file} to a list of mail source specifiers +@code{mail-sources} to a list of mail source specifiers (@pxref{Mail Source Specifiers}). -If this variable is @code{nil}, the mail backends will never attempt to -fetch mail by themselves. +If this variable (and the obsolescent @code{nnmail-spool-file}) is +@code{nil}, the mail backends will never attempt to fetch mail by +themselves. If you want to fetch mail both from your local spool as well as a POP mail server, you'd say something like: @lisp -(setq nnmail-spool-file +(setq mail-sources '((file) (pop :server "pop3.mail.server" :password "secret"))) @@ -10259,7 +10265,7 @@ mail server, you'd say something like: Or, if you don't want to use any of the keyword defaults: @lisp -(setq nnmail-spool-file +(setq mail-sources '((file :path "/var/spool/mail/user-name") (pop :server "pop3.mail.server" :user "user-name" @@ -10448,6 +10454,9 @@ substitutions in the group names), you can say things like: (any "debian-\\b\\(\\w+\\)@@lists.debian.org" "mail.debian.\\1") @end example +In this example, messages sent to @samp{debian-foo@@lists.debian.org} +will be filed in @samp{mail.debian.foo}. + If the string contains the element @samp{\&}, then the previously matched string will be substituted. Similarly, the elements @samp{\\1} up to @samp{\\9} will be substituted with the text matched by the @@ -10791,8 +10800,9 @@ If you start using any of the mail backends, they have the annoying habit of assuming that you want to read mail with them. This might not be unreasonable, but it might not be what you want. -If you set @code{nnmail-spool-file} to @code{nil}, none of the backends -will ever attempt to read incoming mail, which should help. +If you set @code{mail-sources} and @code{nnmail-spool-file} to +@code{nil}, none of the backends will ever attempt to read incoming +mail, which should help. @vindex nnbabyl-get-new-mail @vindex nnmbox-get-new-mail @@ -12105,7 +12115,9 @@ you're interested in the articles anyway. The main way to control what is to be downloaded is to create a @dfn{category} and then assign some (or all) groups to this category. -Gnus has its own buffer for creating and managing categories. +Groups that do not belong in any other category belong to the +@code{default} category. Gnus has its own buffer for creating and +managing categories. @menu * Category Syntax:: What a category looks like. @@ -12682,7 +12694,7 @@ setup, you may be able to use something like the following as your ;;; Define how Gnus is to read your mail. We read mail from ;;; your ISP's POP server. -(setq nnmail-spool-file '((pop :server "pop.your-isp.com"))) +(setq mail-sources '((pop :server "pop.your-isp.com"))) ;;; Say how Gnus is to store the mail. We use nnml groups. (setq gnus-secondary-select-methods '((nnml ""))) diff --git a/texi/message.texi b/texi/message.texi index 722ffed77..c42f7e3ea 100644 --- a/texi/message.texi +++ b/texi/message.texi @@ -1,7 +1,7 @@ \input texinfo @c -*-texinfo-*- @setfilename message -@settitle Pterodactyl Message 0.81 Manual +@settitle Pterodactyl Message 0.82 Manual @synindex fn cp @synindex vr cp @synindex pg cp @@ -42,7 +42,7 @@ into another language, under the above conditions for modified versions. @tex @titlepage -@title Pterodactyl Message 0.81 Manual +@title Pterodactyl Message 0.82 Manual @author by Lars Magne Ingebrigtsen @page @@ -83,7 +83,7 @@ Message mode buffers. * Key Index:: List of Message mode keys. @end menu -This manual corresponds to Pterodactyl Message 0.81. Message is +This manual corresponds to Pterodactyl Message 0.82. Message is distributed with the Gnus distribution bearing the same version number as this manual. -- 2.34.1