From: yamaoka Date: Wed, 27 Jan 1999 05:42:18 +0000 (+0000) Subject: Importing Pterodactyl Gnus v0.74. X-Git-Tag: pgnus-0_74~1 X-Git-Url: http://git.chise.org/gitweb/?a=commitdiff_plain;h=b008f17a2c9cff5c7c0b0c669d54aba93c561a23;p=elisp%2Fgnus.git- Importing Pterodactyl Gnus v0.74. --- diff --git a/GNUS-NEWS b/GNUS-NEWS index 72fac76..ee7fbc6 100644 --- a/GNUS-NEWS +++ b/GNUS-NEWS @@ -1,5 +1,8 @@ ** Gnus changes. +*** The mail-fetching functions have changed. See the manual for the +many details. In particular, all procmail fetching variables are gone. + *** Gnus is now a MIME-capable reader. See the manual for details. *** gnus-auto-select-first can now be a function to be @@ -11,4 +14,3 @@ summary buffers and NOV files. *** `gnus-article-display-hook' has been removed. Instead, a number of variables starting with `gnus-treat-'. - diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 30a1a9d..ead5bb5 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,97 @@ +Wed Jan 27 05:24:53 1999 Lars Magne Ingebrigtsen + + * gnus.el: Pterodactyl Gnus v0.74 is released. + +1999-01-27 05:56:29 Lars Magne Ingebrigtsen + + * gnus-art.el (article-fill-long-lines): Renamed. + (article-fill-long-lines): New keystroke. + +1999-01-26 06:35:07 Lars Magne Ingebrigtsen + + * gnus-msg.el (gnus-setup-posting-charset): Check for group. + + * gnus-group.el (gnus-group-catchup-current): Skip groups now + displayed. + (gnus-group-catchup-current): Be more robus. + + * gnus-sum.el (gnus-summary-select-article): Reselect for showing + headers. + +1999-01-25 Dave Love + + * message.el (message-mode-menu): Add message-mime-attach-file. + (message-mode): Doc fix. + +1999-01-26 05:24:19 Lars Magne Ingebrigtsen + + * nnmail.el (nnmail-check-duplication): Insert the mail source + string. + + * mail-source.el (mail-source-fetch-pop): Bind mail-source-string. + (mail-source-fetch-directory): Ditto. + (mail-source-fetch-file): Ditto. + (mail-source-string): New variable. + + * gnus-start.el (gnus-get-unread-articles): Nix out groups over + the level. + + * rfc2047.el (rfc2047-encodable-p): Convert to MIME charsets + before handling. + + * mm-util.el (mm-mime-charset): Use the parameters. + (mm-mime-charset): Removed region paremeters. + + * nnmail.el (nnmail-get-new-mail): Don't message the entire + source. + +1999-01-25 12:05:16 Lloyd Zusman + + * nnmail.el (nnmail-get-split-group): Quote right. + +1999-01-25 05:55:41 Lars Magne Ingebrigtsen + + * mail-source.el (mail-source-movemail): Would kill an arbitrary + buffer. + +1999-01-24 03:02:31 Lars Magne Ingebrigtsen + + * gnus-group.el (gnus-clear-inboxes-moved): Removed. + (gnus-group-mode): Don't hook. + + * mail-source.el (mail-source-bind): Doc fix. + (mail-source-bind): Take only one param. + + * gnus-art.el (gnus-treat-highlight-signature): typep. + + * mail-source.el (mail-source-movemail): Ignore empty file. + (mail-source-callback): Check before deleting. + + * message.el (message-mime-attach-file): Include name. + +1999-01-23 17:01:12 Lars Magne Ingebrigtsen + + * mm-util.el (mm-read-charset): Return a symbol. + + * mm-view.el (mm-inline-text): Insert signature separator. + + * gnus-art.el (gnus-treat-predicate): New function. + (gnus-treat-article): Allow all types to be checked. + + * gnus-util.el (gnus-or): New function. + (gnus-and): Ditto. + + * gnus-art.el (gnus-mime-display-single): Use override. + + * mm-decode.el (mm-attachment-override-types): New variable. + (mm-attachment-override-p): New function. + + * gnus-picon.el (gnus-group-display-picons): Don't go backward. + +1999-01-23 16:45:06 Andrew J. Cosgriff + + * mm-view.el (mm-inline-text): Do vcards. + Sat Jan 23 14:23:27 1999 Lars Magne Ingebrigtsen * gnus.el: Pterodactyl Gnus v0.73 is released. diff --git a/lisp/gnus-art.el b/lisp/gnus-art.el index ee7c154..fc6b49b 100644 --- a/lisp/gnus-art.el +++ b/lisp/gnus-art.el @@ -413,8 +413,7 @@ The following additional specs are available: :group 'gnus-article-various) (defcustom gnus-article-prepare-hook nil - "*A hook called after an article has been prepared in the article buffer. -If you want to run a special decoding program like nkf, use this hook." + "*A hook called after an article has been prepared in the article buffer." :type 'hook :group 'gnus-article-various) @@ -615,7 +614,7 @@ on parts -- for instance, adding Vcard info to a database." (defvar gnus-inhibit-treatment nil "Whether to inhibit treatment.") -(defcustom gnus-treat-highlight-signature 'last +(defcustom gnus-treat-highlight-signature '(or last (typep "text/x-vcard")) "Highlight the signature." :group 'gnus-article-treat :type gnus-article-treat-custom) @@ -757,7 +756,6 @@ on parts -- for instance, adding Vcard info to a database." '((gnus-treat-highlight-signature gnus-article-highlight-signature) (gnus-treat-buttonize gnus-article-add-buttons) (gnus-treat-buttonize-head gnus-article-add-buttons-to-head) - (gnus-treat-emphasize gnus-article-emphasize) (gnus-treat-fill-article gnus-article-fill-cited-article) (gnus-treat-strip-cr gnus-article-remove-cr) (gnus-treat-hide-headers gnus-article-hide-headers) @@ -769,6 +767,7 @@ on parts -- for instance, adding Vcard info to a database." (gnus-treat-highlight-headers gnus-article-highlight-headers) (gnus-treat-highlight-citation gnus-article-highlight-citation) (gnus-treat-highlight-signature gnus-article-highlight-signature) + (gnus-treat-emphasize gnus-article-emphasize) (gnus-treat-date-ut gnus-article-date-ut) (gnus-treat-date-local gnus-article-date-local) (gnus-treat-date-lapsed gnus-article-date-lapsed) @@ -1163,22 +1162,24 @@ MAP is an alist where the elements are on the form (\"from\" \"to\")." (put-text-property (point) (1+ (point)) 'face 'underline))))))))) -(defun article-fill () - "Format too long lines." +(defun article-fill-long-lines () + "Fill lines that are wider than the window width." (interactive) (save-excursion - (let ((buffer-read-only nil)) - (widen) - (article-goto-body) - (end-of-line 1) - (let ((paragraph-start "^[>|#:<;* ]*[ \t]*$") - (adaptive-fill-regexp "[ \t]*\\([|#:<;>*]+ *\\)?") - (adaptive-fill-mode t)) - (while (not (eobp)) - (and (>= (current-column) (min fill-column (window-width))) - (/= (preceding-char) ?:) - (fill-paragraph nil)) - (end-of-line 2)))))) + (let ((buffer-read-only nil) + (width (window-width (get-buffer-window (current-buffer))))) + (save-restriction + (widen) + (article-goto-body) + (let ((adaptive-fill-mode nil)) + (while (not (eobp)) + (end-of-line) + (when (>= (current-column) (min fill-column width)) + (narrow-to-region (point) (gnus-point-at-bol)) + (fill-paragraph nil) + (goto-char (point-max)) + (widen)) + (forward-line 1))))))) (defun article-remove-cr () "Translate CRLF pairs into LF, and then CR into LF.." @@ -2165,7 +2166,7 @@ If variable `gnus-use-long-file-name' is non-nil, it is '(article-hide-headers article-hide-boring-headers article-treat-overstrike - (article-fill . gnus-article-word-wrap) + article-fill-long-lines article-remove-cr article-display-x-face article-de-quoted-unreadable @@ -2867,7 +2868,8 @@ If ALL-HEADERS is non-nil, no headers are hidden." (if (and (setq not-attachment (or (not (mm-handle-disposition handle)) (equal (car (mm-handle-disposition handle)) - "inline"))) + "inline") + (mm-attachment-override-p type))) (mm-automatic-display-p type) (or (mm-inlinable-part-p type) (mm-automatic-external-display-p type))) @@ -4169,34 +4171,59 @@ For example: (let ((length (- (point-max) (point-min))) (alist gnus-treatment-function-alist) (article-goto-body-goes-to-point-min-p t) + (treated-type + (or (not type) + (catch 'found + (let ((list gnus-article-treat-types)) + (while list + (when (string-match (pop list) type) + (throw 'found t))))))) val elem) - (when (and (gnus-visual-p 'article-highlight 'highlight) - (or (not type) - (catch 'found - (let ((list gnus-article-treat-types)) - (while list - (when (string-match (pop list) type) - (throw 'found t))))))) + (when (gnus-visual-p 'article-highlight 'highlight) (gnus-run-hooks 'gnus-part-display-hook) (while (setq elem (pop alist)) (setq val (symbol-value (car elem))) - (when (cond - (condition - (eq condition val)) - ((null val) - nil) - ((eq val t) - t) - ((eq val 'head) - nil) - ((eq val 'last) - (eq part-number total-parts)) - ((numberp val) - (< length val)) - (t - (eval val))) + (when (and (or (consp val) + treated-type) + (gnus-treat-predicate val)) (funcall (cadr elem))))))) +;; Dynamic variables. +(defvar part-number) +(defvar total-parts) +(defvar type) +(defvar condition) +(defvar length) +(defun gnus-treat-predicate (val) + (cond + (condition + (eq condition val)) + ((null val) + nil) + ((eq val t) + t) + ((eq val 'head) + nil) + ((eq val 'last) + (eq part-number total-parts)) + ((numberp val) + (< length val)) + ((listp val) + (let ((pred (pop val))) + (cond + ((eq pred 'or) + (apply 'gnus-or (mapcar 'gnus-treat-predicate val))) + ((eq pred 'and) + (apply 'gnus-and (mapcar 'gnus-tread-predicate val))) + ((eq pred 'not) + (not (gnus-treat-predicate val))) + ((eq pred 'typep) + (equal (cadr val) type)) + (t + (error "%S is not a valid predicate" pred))))) + (t + (error "%S is not a valid value" val)))) + (gnus-ems-redefine) (provide 'gnus-art) diff --git a/lisp/gnus-demon.el b/lisp/gnus-demon.el index 178cb66..3401ed4 100644 --- a/lisp/gnus-demon.el +++ b/lisp/gnus-demon.el @@ -273,7 +273,6 @@ minutes, the connection is closed." (save-window-excursion (let ((servers gnus-opened-servers) server) - (gnus-clear-inboxes-moved) (while (setq server (car (pop servers))) (and (gnus-check-backend-function 'request-scan (car server)) (or (gnus-server-opened server) diff --git a/lisp/gnus-group.el b/lisp/gnus-group.el index ba7e0a5..2c9bb99 100644 --- a/lisp/gnus-group.el +++ b/lisp/gnus-group.el @@ -782,8 +782,6 @@ The following commands are available: (gnus-set-default-directory) (gnus-update-format-specifications nil 'group 'group-mode) (gnus-update-group-mark-positions) - (make-local-hook 'post-command-hook) - (add-hook 'post-command-hook 'gnus-clear-inboxes-moved nil t) (when gnus-use-undo (gnus-undo-mode 1)) (when gnus-slave @@ -804,9 +802,6 @@ The following commands are available: (list (cons 'process (and (search-forward "\200" nil t) (- (point) 2)))))))) -(defun gnus-clear-inboxes-moved () - (setq nnmail-moved-inboxes nil)) - (defun gnus-mouse-pick-group (e) "Enter the group under the mouse pointer." (interactive "e") @@ -851,8 +846,6 @@ Also see the `gnus-group-use-permanent-levels' variable." (gnus-group-default-level nil t) gnus-group-default-list-level gnus-level-subscribed)))) - ;; Just do this here, for no particular good reason. - (gnus-clear-inboxes-moved) (unless level (setq level (car gnus-group-list-mode) unread (cdr gnus-group-list-mode))) @@ -2453,7 +2446,8 @@ The number of newsgroups that this function was unable to catch up is returned." (interactive "P") (let ((groups (gnus-group-process-prefix n)) - (ret 0)) + (ret 0) + group) (unless groups (error "No groups selected")) (if (not (or (not gnus-interactive-catchup) ;Without confirmation? @@ -2467,21 +2461,20 @@ up is returned." (car groups) (format "these %d groups" (length groups))))))) n - (while groups + (while (setq groups (pop groups)) ;; Virtual groups have to be given special treatment. - (let ((method (gnus-find-method-for-group (car groups)))) + (let ((method (gnus-find-method-for-group group))) (when (eq 'nnvirtual (car method)) (nnvirtual-catchup-group - (gnus-group-real-name (car groups)) (nth 1 method) all))) - (gnus-group-remove-mark (car groups)) - (if (>= (gnus-group-group-level) gnus-level-zombie) + (gnus-group-real-name group) (nth 1 method) all))) + (if (>= (gnus-info-level (gnus-get-info group)) + gnus-level-zombie) (gnus-message 2 "Dead groups can't be caught up") (if (prog1 - (gnus-group-goto-group (car groups)) - (gnus-group-catchup (car groups) all)) + (gnus-group-goto-group group) + (gnus-group-catchup group all)) (gnus-group-update-group-line) - (setq ret (1+ ret)))) - (setq groups (cdr groups))) + (setq ret (1+ ret))))) (gnus-group-next-unread-group 1) ret))) diff --git a/lisp/gnus-msg.el b/lisp/gnus-msg.el index 7fc7921..8877db8 100644 --- a/lisp/gnus-msg.el +++ b/lisp/gnus-msg.el @@ -222,15 +222,16 @@ Thank you for your help in stamping out bugs. (defun gnus-setup-posting-charset (group) (let ((alist gnus-group-posting-charset-alist) elem) - (catch 'found - (while (setq elem (pop alist)) - (when (or (and (stringp (car elem)) - (string-match (car elem) group)) - (and (gnus-functionp (car elem)) - (funcall (car elem) group)) - (and (symbolp (car elem)) - (symbol-value (car elem)))) - (throw 'found (cadr elem))))))) + (when group + (catch 'found + (while (setq elem (pop alist)) + (when (or (and (stringp (car elem)) + (string-match (car elem) group)) + (and (gnus-functionp (car elem)) + (funcall (car elem) group)) + (and (symbolp (car elem)) + (symbol-value (car elem)))) + (throw 'found (cadr elem)))))))) (defun gnus-inews-add-send-actions (winconf buffer article) (make-local-hook 'message-sent-hook) diff --git a/lisp/gnus-picon.el b/lisp/gnus-picon.el index e06a503..cd85fbb 100644 --- a/lisp/gnus-picon.el +++ b/lisp/gnus-picon.el @@ -375,7 +375,8 @@ To use: (setq gnus-article-x-face-command 'gnus-picons-display-x-face)" (match-beginning 0) (match-end 0) 'invisible t) (article-goto-body) - (backward-char 1)))) + (unless (bobp) + (backward-char 1))))) (if (null gnus-picons-piconsearch-url) (gnus-picons-display-pairs (gnus-picons-lookup-pairs diff --git a/lisp/gnus-start.el b/lisp/gnus-start.el index 79912db..b46aac0 100644 --- a/lisp/gnus-start.el +++ b/lisp/gnus-start.el @@ -1519,10 +1519,14 @@ newsgroup." "-request-update-info"))) (inline (gnus-request-update-info info method)))) ;; These groups are native or secondary. - (when (and (<= (gnus-info-level info) level) - (not gnus-read-active-file)) + (cond + ;; We don't want these groups. + ((> (gnus-info-level info) level) + (setq active nil)) + ;; Activate groups. + ((not gnus-read-active-file) (setq active (gnus-activate-group group 'scan)) - (inline (gnus-close-group group)))) + (inline (gnus-close-group group))))) ;; Get the number of unread articles in the group. (if active diff --git a/lisp/gnus-sum.el b/lisp/gnus-sum.el index e8e5a56..82d9d65 100644 --- a/lisp/gnus-sum.el +++ b/lisp/gnus-sum.el @@ -1444,6 +1444,7 @@ increase the score of each group you read." "o" gnus-article-treat-overstrike "e" gnus-article-emphasize "w" gnus-article-fill-cited-article + "Q" gnus-article-fill-long-lines "c" gnus-article-remove-cr "q" gnus-article-de-quoted-unreadable "f" gnus-article-display-x-face @@ -1612,6 +1613,7 @@ increase the score of each group you read." ["Dumb quotes" gnus-article-treat-dumbquotes t] ["Emphasis" gnus-article-emphasize t] ["Word wrap" gnus-article-fill-cited-article t] + ["Fill long lines" gnus-article-fill-long-lines t] ["CR" gnus-article-remove-cr t] ["Show X-Face" gnus-article-display-x-face t] ["Quoted-Printable" gnus-article-de-quoted-unreadable t] @@ -1981,8 +1983,6 @@ The following commands are available: (make-local-variable 'gnus-summary-dummy-line-format) (make-local-variable 'gnus-summary-dummy-line-format-spec) (make-local-variable 'gnus-summary-mark-positions) - (make-local-hook 'post-command-hook) - (add-hook 'post-command-hook 'gnus-clear-inboxes-moved nil t) (make-local-hook 'pre-command-hook) (add-hook 'pre-command-hook 'gnus-set-global-variables nil t) (gnus-run-hooks 'gnus-summary-mode-hook) @@ -5720,7 +5720,9 @@ be displayed." ;; The requested article is different from the current article. (prog1 (gnus-summary-display-article article all-headers) - (setq did article)) + (setq did article) + (when (or all-headers gnus-show-all-headers) + (gnus-article-show-all-headers))) (when (or all-headers gnus-show-all-headers) (gnus-article-show-all-headers)) 'old)) diff --git a/lisp/gnus-util.el b/lisp/gnus-util.el index 6c329c0..36087d6 100644 --- a/lisp/gnus-util.el +++ b/lisp/gnus-util.el @@ -939,6 +939,21 @@ ARG is passed to the first function." (eq (cadr (memq 'gnus-undeletable (text-properties-at b))) t) (text-property-any b e 'gnus-undeletable t))) +(defun gnus-or (&rest elems) + "Return non-nil if any of the elements are non-nil." + (catch 'found + (while elems + (when (pop elems) + (throw 'found t))))) + +(defun gnus-and (&rest elems) + "Return non-nil if all of the elements are non-nil." + (catch 'found + (while elems + (unless (pop elems) + (throw 'found nil))) + t)) + (provide 'gnus-util) ;;; gnus-util.el ends here diff --git a/lisp/gnus.el b/lisp/gnus.el index d6e146d..d008715 100644 --- a/lisp/gnus.el +++ b/lisp/gnus.el @@ -259,7 +259,7 @@ is restarted, and sometimes reloaded." :link '(custom-manual "(gnus)Exiting Gnus") :group 'gnus) -(defconst gnus-version-number "0.73" +(defconst gnus-version-number "0.74" "Version number for this version of Gnus.") (defconst gnus-version (format "Pterodactyl Gnus v%s" gnus-version-number) @@ -1716,8 +1716,7 @@ gnus-newsrc-hashtb should be kept so that both hold the same information.") gnus-group-set-mode-line gnus-group-set-info gnus-group-save-newsrc gnus-group-setup-buffer gnus-group-get-new-news gnus-group-make-help-group gnus-group-update-group - gnus-clear-inboxes-moved gnus-group-iterate - gnus-group-group-name) + gnus-group-iterate gnus-group-group-name) ("gnus-bcklg" gnus-backlog-request-article gnus-backlog-enter-article gnus-backlog-remove-article) ("gnus-art" gnus-article-read-summary-keys gnus-article-save diff --git a/lisp/mail-source.el b/lisp/mail-source.el index f7d1b83..7c39528 100644 --- a/lisp/mail-source.el +++ b/lisp/mail-source.el @@ -73,6 +73,9 @@ The default is nil." ;;; Internal variables. +(defvar mail-source-string "" + "A dynamically bound string that says what the current mail source is.") + (eval-and-compile (defvar mail-source-keyword-map '((file @@ -80,8 +83,7 @@ The default is nil." (concat "/usr/spool/mail/" (user-login-name))))) (directory (:path) - (:suffix ".spool") - (:match)) + (:suffix ".spool")) (pop (:server (getenv "MAILHOST")) (:port "pop3") @@ -108,7 +110,7 @@ All keywords that can be used must be listed here.")) "Strip the leading colon off the KEYWORD." (intern (substring (symbol-name keyword) 1)))) -(eval-when-compile +(eval-and-compile (defun mail-source-bind-1 (type) (let* ((defaults (cdr (assq type mail-source-keyword-map))) default bind) @@ -118,14 +120,20 @@ All keywords that can be used must be listed here.")) bind)) bind))) -(defmacro mail-source-bind (type source &rest body) - "Bind all variables in SOURCE." - `(let ,(mail-source-bind-1 type) - (mail-source-set-1 source) +(defmacro mail-source-bind (type-source &rest body) + "Return a `let' form that binds all variables in source TYPE. +At run time, the mail source specifier SOURCE will be inspected, +and the variables will be set according to it. Variables not +specified will be given default values. + +After this is done, BODY will be executed in the scope +of the `let' form." + `(let ,(mail-source-bind-1 (car type-source)) + (mail-source-set-1 ,(cadr type-source)) ,@body)) -(put 'mail-source-bind 'lisp-indent-function 2) -(put 'mail-source-bind 'edebug-form-spec '(form form body)) +(put 'mail-source-bind 'lisp-indent-function 1) +(put 'mail-source-bind 'edebug-form-spec '(form body)) (defun mail-source-set-1 (source) (let* ((type (pop source)) @@ -185,11 +193,13 @@ Pass INFO on to CALLBACK." (if (or (not (file-exists-p mail-source-crash-box)) (zerop (nth 7 (file-attributes mail-source-crash-box)))) (progn - (delete-file mail-source-crash-box) + (when (file-exists-p mail-source-crash-box) + (delete-file mail-source-crash-box)) 0) (funcall callback mail-source-crash-box info) (if mail-source-delete-incoming - (delete-file mail-source-crash-box) + (when (file-exists-p mail-source-crash-box) + (delete-file mail-source-crash-box)) (let ((incoming (mail-source-make-complex-temp-name (expand-file-name @@ -216,6 +226,9 @@ Pass INFO on to CALLBACK." ((not (file-exists-p from)) ;; There is no inbox. (setq to nil)) + ((zerop (nth 7 (file-attributes from))) + ;; Empty file. + (setq to nil)) (t ;; If getting from mail spool directory, use movemail to move ;; rather than just renaming, so as to interlock with the @@ -270,7 +283,8 @@ Pass INFO on to CALLBACK." (buffer-string) result)) (error "%s" (buffer-string))) (setq to nil))))))) - (when (buffer-name errors) + (when (and errors + (buffer-name errors)) (kill-buffer errors)) ;; Return whether we moved successfully or not. to))) @@ -293,18 +307,20 @@ If ARGS, PROMPT is used as an argument to `format'." (defun mail-source-fetch-file (source callback) "Fetcher for single-file sources." - (mail-source-bind file source - (if (mail-source-movemail path mail-source-crash-box) - (mail-source-callback callback path) - 0))) + (mail-source-bind (file source) + (let ((mail-source-string (format "file:%s" path))) + (if (mail-source-movemail path mail-source-crash-box) + (mail-source-callback callback path) + 0)))) (defun mail-source-fetch-directory (source callback) "Fetcher for directory sources." - (mail-source-bind directory source + (mail-source-bind (directory source) (let ((files (directory-files path t - (or match (concat (regexp-quote suffix) "$")))) + (concat (regexp-quote suffix) "$"))) (found 0) + (mail-source-string (format "directory:%s" path)) file) (while (setq file (pop files)) (when (mail-source-movemail file mail-source-crash-box) @@ -313,8 +329,9 @@ If ARGS, PROMPT is used as an argument to `format'." (defun mail-source-fetch-pop (source callback) "Fetcher for single-file sources." - (mail-source-bind pop source - (let ((from (format "%s:%s:%s" server user port))) + (mail-source-bind (pop source) + (let ((from (format "%s:%s:%s" server user port)) + (mail-source-string (format "pop:%s@%s" user server))) (setq password (or password (cdr (assoc from mail-source-password-cache)) diff --git a/lisp/message.el b/lisp/message.el index 2190225..517a0e2 100644 --- a/lisp/message.el +++ b/lisp/message.el @@ -1343,6 +1343,7 @@ Point is left at the beginning of the narrowed-to region." ["Newline and Reformat" message-newline-and-reformat t] ["Rename buffer" message-rename-buffer t] ["Spellcheck" ispell-message t] + ["Attach file as MIME" message-mime-attach-file t] "----" ["Send Message" message-send-and-exit t] ["Abort Message" message-dont-send t] @@ -1391,7 +1392,8 @@ C-c C-q message-fill-yanked-message (fill what was yanked). C-c C-e message-elide-region (elide the text between point and mark). C-c C-v message-delete-not-region (remove the text outside the region). C-c C-z message-kill-to-signature (kill the text up to the signature). -C-c C-r message-caesar-buffer-body (rot13 the message body)." +C-c C-r message-caesar-buffer-body (rot13 the message body). +C-c C-a message-mime-attach-file (attach a file as MIME)." (interactive) (kill-all-local-variables) (set (make-local-variable 'message-reply-buffer) nil) @@ -4192,8 +4194,9 @@ description of the attachment." (description (message-mime-query-description))) (list file type description))) (insert (format - "<#part type=%s filename=%s%s disposition=attachment><#/part>\n" - type (prin1-to-string file) + "<#part type=%s name=%s filename=%s%s disposition=attachment><#/part>\n" + type (prin1-to-string (file-name-nondirectory file)) + (prin1-to-string file) (if description (format " description=%s" (prin1-to-string description)) "")))) diff --git a/lisp/mm-bodies.el b/lisp/mm-bodies.el index 0403bb6..b41d5de 100644 --- a/lisp/mm-bodies.el +++ b/lisp/mm-bodies.el @@ -69,8 +69,7 @@ If no encoding was done, nil is returned." charsets) ;; We encode. (t - (let ((mime-charset - (mm-mime-charset (car charsets) (point-min) (point-max))) + (let ((mime-charset (mm-mime-charset (car charsets))) start) (when (or t ;; We always decode. diff --git a/lisp/mm-decode.el b/lisp/mm-decode.el index 2f4433d..7ff1433 100644 --- a/lisp/mm-decode.el +++ b/lisp/mm-decode.el @@ -81,6 +81,7 @@ ("text/enriched" mm-inline-text t) ("text/richtext" mm-inline-text t) ("text/html" mm-inline-text (locate-library "w3")) + ("text/x-vcard" mm-inline-text (locate-library "vcard")) ("message/delivery-status" mm-inline-text t) ("text/.*" mm-inline-text t) ("audio/wav" mm-inline-audio @@ -101,7 +102,11 @@ (defvar mm-user-automatic-display '("text/plain" "text/enriched" "text/richtext" "text/html" - "image/.*" "message/delivery-status" "multipart/.*")) + "text/x-vcard" "image/.*" "message/delivery-status" "multipart/.*")) + +(defvar mm-attachment-override-types + '("text/plain" "text/x-vcard") + "Types that should have \"attachment\" ignored if they can be displayed inline.") (defvar mm-user-automatic-external-display nil "List of MIME type regexps that will be displayed externally automatically.") @@ -430,6 +435,16 @@ external if displayed external." methods nil))) result)) +(defun mm-attachment-override-p (type) + "Say whether TYPE should have attachment behavior overridden." + (let ((types mm-attachment-override-types) + ty) + (catch 'found + (while (setq ty (pop types)) + (when (and (string-match ty type) + (mm-inlinable-p type)) + (throw 'found t)))))) + (defun mm-automatic-external-display-p (type) "Return the user-defined method for TYPE." (let ((methods mm-user-automatic-external-display) diff --git a/lisp/mm-util.el b/lisp/mm-util.el index 7f99bd2..80f1989 100644 --- a/lisp/mm-util.el +++ b/lisp/mm-util.el @@ -189,14 +189,19 @@ used as the line break code type of the coding system." (when (fboundp 'set-buffer-multibyte) (set-buffer-multibyte nil))) -(defun mm-mime-charset (charset b e) +(defun mm-mime-charset (charset) + "Return the MIME charset corresponding to the MULE CHARSET." (if (fboundp 'coding-system-get) + ;; This exists in Emacs 20. (or - (coding-system-get - (get-charset-property charset 'prefered-coding-system) - 'mime-charset) - (car (memq charset (find-coding-systems-region - (point-min) (point-max))))) + (and (get-charset-property charset 'prefered-coding-system) + (coding-system-get + (get-charset-property charset 'prefered-coding-system) + 'mime-charset)) + (and (eq charset 'ascii) + 'us-ascii) + (get-charset-property charset 'prefered-coding-system)) + ;; This is for XEmacs. (mm-mule-charset-to-mime-charset charset))) (defsubst mm-multibyte-p () @@ -261,11 +266,12 @@ See also `with-temp-file' and `with-output-to-string'." (defun mm-read-charset (prompt) "Return a charset." - (completing-read - prompt - (mapcar (lambda (e) (list (symbol-name (car e)))) - mm-mime-mule-charset-alist) - nil t)) + (intern + (completing-read + prompt + (mapcar (lambda (e) (list (symbol-name (car e)))) + mm-mime-mule-charset-alist) + nil t))) (provide 'mm-util) diff --git a/lisp/mm-uu.el b/lisp/mm-uu.el index 1eb54c6..c520774 100644 --- a/lisp/mm-uu.el +++ b/lisp/mm-uu.el @@ -2,7 +2,7 @@ ;; Copyright (c) 1998 by Shenghuo Zhu ;; Author: Shenghuo Zhu -;; $Revision: 1.1.1.11 $ +;; $Revision: 1.1.1.12 $ ;; Keywords: news postscript uudecode binhex shar ;; This file is not part of GNU Emacs, but the same permissions diff --git a/lisp/mm-view.el b/lisp/mm-view.el index c7cc4dc..a693aaa 100644 --- a/lisp/mm-view.el +++ b/lisp/mm-view.el @@ -28,6 +28,11 @@ (require 'mm-bodies) (require 'mm-decode) +(eval-and-compile + (autoload 'gnus-article-prepare-display "gnus-art") + (autoload 'vcard-parse-string "vcard") + (autoload 'vcard-format-string "vcard")) + ;;; ;;; Functions for displaying various formats inline ;;; @@ -86,6 +91,13 @@ (enriched-decode (point-min) (point-max)) (setq text (buffer-string))))) (mm-insert-inline handle text)) + ((equal type "x-vcard") + (mm-insert-inline + handle + (concat "\n-- \n" + (vcard-format-string + (vcard-parse-string (mm-get-part handle) + 'vcard-standard-filter))))) (t (setq text (mm-get-part handle)) (let ((b (point)) @@ -123,9 +135,6 @@ (require 'w3) (w3-prepare-buffer)) -(eval-and-compile - (autoload 'gnus-article-prepare-display "gnus-art")) - (defun mm-view-message () (gnus-article-prepare-display) (run-hooks 'gnus-article-decode-hook) diff --git a/lisp/nnmail.el b/lisp/nnmail.el index 5304d32..c7e37c2 100644 --- a/lisp/nnmail.el +++ b/lisp/nnmail.el @@ -507,8 +507,8 @@ nn*-request-list should have been called before calling this function." If SOURCE is a directory spec, try to return the group name component." (if (eq (car source) 'directory) (let ((file (file-name-nondirectory file))) - (mail-source-bind directory source - (if (string-match (concat (regexp-quote suffix "$") file)) + (mail-source-bind (directory source) + (if (string-match (concat (regexp-quote suffix) "$") file) (substring file 0 (match-beginning 0)) nil))) nil)) @@ -1245,6 +1245,13 @@ See the documentation for the variable `nnmail-split-fancy' for documentation." (t nnmail-treat-duplicates)))) group-art) + ;; We insert a line that says what the mail source is. + (let ((case-fold-search t)) + (goto-char (point-min)) + (re-search-forward "^message-id[ \t]*:" nil t) + (beginning-of-line) + (insert (format "X-Gnus-Mail-Source: %s\n" mail-source-string))) + ;; Let the backend save the article (or not). (cond ((not duplication) @@ -1307,7 +1314,8 @@ See the documentation for the variable `nnmail-split-fancy' for documentation." (list 'directory :path source)) (t (list 'file :path source))))) - (nnheader-message 3 "%s: Reading incoming mail %S..." method source) + (nnheader-message 4 "%s: Reading incoming mail from %s..." + method (car source)) (when (mail-source-fetch source `(lambda (file orig-file) @@ -1324,7 +1332,7 @@ 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 3 "%s: Reading incoming mail...done" method)) + (nnheader-message 4 "%s: Reading incoming mail...done" method)) ;; Close the message-id cache. (nnmail-cache-close) ;; Allow the user to hook. diff --git a/lisp/rfc2047.el b/lisp/rfc2047.el index b68146a..7e2e570 100644 --- a/lisp/rfc2047.el +++ b/lisp/rfc2047.el @@ -134,9 +134,10 @@ Should be called narrowed to the head of the message." (defun rfc2047-encodable-p () "Say whether the current (narrowed) buffer contains characters that need encoding." - (let ((charsets (mapcar - 'mm-mule-charset-to-mime-charset - (mm-find-charset-region (point-min) (point-max)))) + (let ((charsets + (mapcar + 'mm-mime-charset + (mm-find-charset-region (point-min) (point-max)))) (cs (list 'us-ascii mail-parse-charset)) found) (while charsets @@ -183,10 +184,9 @@ Should be called narrowed to the head of the message." (defun rfc2047-encode (b e charset) "Encode the word in the region with CHARSET." - (let* ((mime-charset - (mm-mime-charset charset b e)) + (let* ((mime-charset (mm-mime-charset charset)) (encoding (or (cdr (assq mime-charset - rfc2047-charset-encoding-alist)) + rfc2047-charset-encoding-alist)) 'B)) (start (concat "=?" (downcase (symbol-name mime-charset)) "?" @@ -266,7 +266,8 @@ Should be called narrowed to the head of the message." (prog1 (match-string 0) (delete-region (match-beginning 0) (match-end 0))))) - (when (and (mm-multibyte-p) mail-parse-charset) + (when (and (mm-multibyte-p) + mail-parse-charset) (mm-decode-coding-region b e mail-parse-charset)) (setq b (point))) (when (and (mm-multibyte-p) diff --git a/texi/ChangeLog b/texi/ChangeLog index 5c394a1..9b5937d 100644 --- a/texi/ChangeLog +++ b/texi/ChangeLog @@ -1,6 +1,16 @@ +1999-01-25 04:24:01 Lars Magne Ingebrigtsen + + * message.texi (MIME): New. + + * gnus.texi (Mail Sources): New. + (Mail Source Specifiers): New. + (Mail Source Customization): New. + (Fetching Mail): New. + 1999-01-23 09:47:16 Lars Magne Ingebrigtsen * gnus.texi (Article Washing): Removed. + (Customizing Articles): Addition. 1999-01-16 20:36:48 Lars Magne Ingebrigtsen diff --git a/texi/emacs-mime.texi b/texi/emacs-mime.texi index d45602a..0150301 100644 --- a/texi/emacs-mime.texi +++ b/texi/emacs-mime.texi @@ -17,7 +17,7 @@ This file documents the Emacs MIME interface functionality. -Copyright (C) 1996 Free Software Foundation, Inc. +Copyright (C) 1998,99 Free Software Foundation, Inc. Permission is granted to make and distribute verbatim copies of this manual provided the copyright notice and this permission notice @@ -48,7 +48,7 @@ into another language, under the above conditions for modified versions. @page @vskip 0pt plus 1filll -Copyright @copyright{} 1998 Free Software Foundation, Inc. +Copyright @copyright{} 1998,99 Free Software Foundation, Inc. Permission is granted to make and distribute verbatim copies of this manual provided the copyright notice and this permission notice @@ -198,9 +198,9 @@ and comments is preserved. Return the last comment in a header. @example -(mail-header-get-comment +(mail-header-get-comment "Gnus/5.070027 (Pterodactyl Gnus v0.27) (Finnish Landrace)") -@result{} "Finnish Landrace" +@result{} "Finnish Landrace" @end example @item mail-header-parse-address @@ -352,7 +352,7 @@ elements. @example (rfc2231-parse-string - "application/x-stuff; + "application/x-stuff; title*0*=us-ascii'en'This%20is%20even%20more%20; title*1*=%2A%2A%2Afun%2A%2A%2A%20; title*2=\"isn't it!\"") @@ -368,7 +368,7 @@ the value of the specified attribute. @item rfc2231-encode-string @findex rfc2231-encode-string Encode a parameter in headers likes @code{Content-Type} and -@code{Content-Disposition}. +@code{Content-Disposition}. @end table @@ -459,11 +459,11 @@ This is an alist of encoding / function pairs. The encodings are The @code{Q} encoding isn't quite the same for all headers. Some headers allow a narrower range of characters, and that is what this variable is for. It's an alist of header regexps / allowable character -ranges. +ranges. @item rfc2047-encoded-word-regexp @vindex rfc2047-encoded-word-regexp -When decoding words, this library looks for matches to this regexp. +When decoding words, this library looks for matches to this regexp. @end table @@ -851,7 +851,7 @@ Prompt for a mailcap method to use to view the part. @cindex MIME Meta Language Creating a @sc{mime} message is boring and non-trivial. Therefore, a -library called @code{mml} has been defined that parses a language called +library called @code{mml} has been defined that parses a language called MML (@sc{mime} Meta Language) and generates @sc{mime} messages. @findex mml-generate-mime @@ -939,7 +939,7 @@ The contents of the body of the part are to be encoded in the character set speficied (@code{Content-Type}). @item name -Might be used to suggest a file name if the part is to be saved +Might be used to suggest a file name if the part is to be saved to a file (@code{Content-Type}). @item disposition @@ -1001,7 +1001,7 @@ Valid values are @samp{read} and @samp{read-write} @section Advanced MML Example Here's a complex multipart message. It's a @samp{multipart/mixed} that -contains many parts, one of which is a @samp{multipart/alternative}. +contains many parts, one of which is a @samp{multipart/alternative}. @example <#multipart type=mixed> @@ -1139,8 +1139,8 @@ Communicating Presentation Information in Internet Messages: The Content-Disposition Header Field @end table - - + + @node Index @chapter Index @printindex cp diff --git a/texi/gnus.texi b/texi/gnus.texi index 0dba5f8..b5a4c3b 100644 --- a/texi/gnus.texi +++ b/texi/gnus.texi @@ -1,7 +1,7 @@ \input texinfo @c -*-texinfo-*- @setfilename gnus -@settitle Pterodactyl Gnus 0.73 Manual +@settitle Pterodactyl Gnus 0.74 Manual @synindex fn cp @synindex vr cp @synindex pg cp @@ -270,7 +270,7 @@ \thispagestyle{empty} -Copyright \copyright{} 1995,96,97,98 Free Software Foundation, Inc. +Copyright \copyright{} 1995,96,97,98,99 Free Software Foundation, Inc. Permission is granted to make and distribute verbatim copies of this manual provided the copyright notice and this permission notice @@ -293,7 +293,7 @@ into another language, under the above conditions for modified versions. This file documents Gnus, the GNU Emacs newsreader. -Copyright (C) 1995,96 Free Software Foundation, Inc. +Copyright (C) 1995,96,97,98,99 Free Software Foundation, Inc. Permission is granted to make and distribute verbatim copies of this manual provided the copyright notice and this permission notice @@ -318,13 +318,13 @@ into another language, under the above conditions for modified versions. @tex @titlepage -@title Pterodactyl Gnus 0.73 Manual +@title Pterodactyl Gnus 0.74 Manual @author by Lars Magne Ingebrigtsen @page @vskip 0pt plus 1filll -Copyright @copyright{} 1995,96,97 Free Software Foundation, Inc. +Copyright @copyright{} 1995,96,97,98,99 Free Software Foundation, Inc. Permission is granted to make and distribute verbatim copies of this manual provided the copyright notice and this permission notice @@ -354,7 +354,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.73. +This manual corresponds to Pterodactyl Gnus 0.74. @end ifinfo @@ -6607,6 +6607,11 @@ Do word wrap (@code{gnus-article-fill-cited-article}). You can give the command a numerical prefix to specify the width to use when filling. +@item W q +@kindex W q (Summary) +@findex gnus-article-fill-long-lines +Fill long lines (@code{gnus-article-fill-long-lines}). + @item W c @kindex W c (Summary) @findex gnus-article-remove-cr @@ -8227,8 +8232,16 @@ An integer: Do this treatment on all body parts that have a length less than this number. @item -A sexp: Do this treatment on all body parts where the sexp evals to a -non-@code{nil} value. +A list: + +The list is evaluated recursively. The first element of the list is a +predicate. The following predicates are recognized: @code{or}, +@code{and}, @code{not} and @code{typep}. Here's an example: + +@lisp +(or last + (typep "text/x-vcard")) +@end lisp @end enumerate @@ -8242,7 +8255,8 @@ Are the treatments applied to all sorts of multipart parts? Yes, if you want to, but by default, only @samp{text/plain} parts are given the treatment. This is controlled by the @code{gnus-article-treat-types} variable, which is a list of regular expressions that are matched to the -type of the part. +type of the part. This variable is ignored if the value of the +controlling variable is a predicate list, as described above. The following treatment options are available. The easiest way to customize this is to examine the @code{gnus-article-treat} customization @@ -9714,9 +9728,9 @@ course. @menu * Getting Started Reading Mail:: A simple cookbook example. * Splitting Mail:: How to create mail groups. +* Mail Sources:: How to tell Gnus where to get mail from. * Mail Backend Variables:: Variables for customizing mail handling. * Fancy Mail Splitting:: Gnus can do hairy splitting of incoming mail. -* Mail and Procmail:: Reading mail groups that procmail create. * Incorporating Old Mail:: What about the old mail you have? * Expiring Mail:: Getting rid of unwanted mail. * Washing Mail:: Removing gruft from the mail you get. @@ -9854,44 +9868,190 @@ you really should be out collecting empty bottles to save up for next month's rent money. -@node Mail Backend Variables -@subsection Mail Backend Variables +@node Mail Sources +@subsection Mail Sources -These variables are (for the most part) pertinent to all the various -mail backends. +Mail can be gotten from many different sources---the mail spool, from a +POP mail server, or from a procmail directory, for instance. + +@menu +* Mail Source Specifiers:: How to specify what a mail source is. +* Mail Source Customization:: Some variables that influence things. +* Fetching Mail:: Using the mail source specifiers. +@end menu + + +@node Mail Source Specifiers +@subsubsection Mail Source Specifiers +@cindex POP +@cindex mail server +@cindex procmail +@cindex mail spool +@cindex mail source + +You tell Gnus how to fetch mail by creating a @dfn{mail source +specifier}. + +Here's an example: + +@lisp +(pop :server "pop3.mailserver.com" :user "myname") +@end lisp + +As can be observed, a mail source specifier is a list where the first +element is a @dfn{mail source type}, followed by an arbitrary number of +@dfn{keywords}. Keywords that are not explicitly specified are given +default values. + +The following mail source types are available: @table @code -@vindex nnmail-read-incoming-hook -@item nnmail-read-incoming-hook -The mail backends all call this hook after reading new mail. You can -use this hook to notify any mail watch programs, if you want to. +@item file +Get mail from a single file; typically from the mail spool. + +Keywords: + +@table @code +@item :path +The path of the file. Defaults to the value of the @code{MAIL} +environment variable or @file{/usr/mail/spool/user-name}. +@end table + +An example file mail source: + +@lisp +(file :path "/usr/spool/mail/user-name") +@end lisp + +Or using the default path: + +@lisp +(file) +@end lisp + +@item directory +Get mail from several files in a directory. This is typically used when +you have procmail split the incoming mail into several files. + +Keywords: + +@table @code +@item :path +The path of the directory where the files are. There is no default +value. + +@item :suffix +Only files ending with this suffix are used. The default is +@samp{.spool}. +@end table + +An example directory mail source: + +@lisp +(directory :path "/home/user-name/procmail-dir/" + :suffix ".prcml") +@end lisp + +@item pop +Get mail from a POP server. + +Keywords: + +@table @code +@item :server +The name of the POP server. The default is taken from the +@code{MAILHOST} environment variable. + +@item :port +The port number of the POP server. The default is @samp{pop3}. + +@item :user +The user name to give to the POP server. The default is the login +name. + +@item :password +The password to give to the POP server. If not specified, the user is +prompted. +@end table + +@end table + + +@node Mail Source Customization +@subsubsection Mail Source Customization + +The following is a list of variables that influence how the mail is +fetched. You would normally not need to set or change any of these +variables. + +@table @code +@item mail-source-movemail-program +@vindex mail-source-movemail-program +A command to be executed to move mail from the inbox. The default is +@samp{movemail}. + +This can also be a function. In that case, the function will be +called with two parameters -- the name of the INBOX file, and the file +to be moved to. + +@item mail-source-movemail-args +@vindex mail-source-movemail-args +Extra arguments to give to the command described above. + +@item mail-source-crash-box +@vindex mail-source-crash-box +File where mail will be stored while processing it. The default is +@file{~/.emacs-mail-crash-box}. + +@item mail-source-delete-incoming +@vindex mail-source-delete-incoming +If non-@code{nil}, delete incoming files after handling them. + +@item mail-source-directory +@vindex mail-source-directory +Directory where files (if any) will be stored. The default is +@file{~/Mail/}. At present, the only thing this is used for is to say +where the incoming files will be stored if the previous variable is +@code{nil}. + +@item mail-source-default-file-modes +@vindex mail-source-default-file-modes +All new mail files will get this file mode. The default is 384. + +@end table + + +@node Fetching Mail +@subsubsection Fetching Mail + +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 +(@pxref{Mail Source Specifiers}). + +If this variable 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 mail-spool-file + '((file) + (pop :server "pop3.mail.server" + :password "secret"))) +@end lisp + +Or, if you don't want to use any of the keyword defaults: + +@lisp +(setq mail-spool-file + '((file :path "/var/spool/mail/user-name") + (pop :server "pop3.mail.server" + :user "user-name" + :port "pop3" + :password "secret"))) +@end lisp -@vindex nnmail-spool-file -@item nnmail-spool-file -@cindex POP mail -@cindex MAILHOST -@cindex movemail -@vindex nnmail-pop-password -@vindex nnmail-pop-password-required -The backends will look for new mail in this file. If this variable is -@code{nil}, the mail backends will never attempt to fetch mail by -themselves. If you are using a POP mail server and your name is -@samp{larsi}, you should set this variable to @samp{po:larsi}. If -your name is not @samp{larsi}, you should probably modify that -slightly, but you may have guessed that already, you smart & handsome -devil! You can also set this variable to @code{pop}, and Gnus will try -to figure out the POP mail string by itself. In any case, Gnus will -call @code{movemail} which will contact the POP server named in the -@code{MAILHOST} environment variable. If the POP server needs a -password, you can either set @code{nnmail-pop-password-required} to -@code{t} and be prompted for the password, or set -@code{nnmail-pop-password} to the password itself. - -@code{nnmail-spool-file} can also be a list of mailboxes. - -Your Emacs has to have been configured with @samp{--with-pop} before -compilation. This is the default, but some installations have it -switched off. When you use a mail backend, Gnus will slurp all your mail from your inbox and plonk it down in your home directory. Gnus doesn't move any @@ -9900,21 +10060,19 @@ invocations first. At the time when you have finished drawing the pentagram, lightened the candles, and sacrificed the goat, you really shouldn't be too surprised when Gnus moves your mail. -@vindex nnmail-use-procmail -@vindex nnmail-procmail-suffix -@item nnmail-use-procmail -If non-@code{nil}, the mail backends will look in -@code{nnmail-procmail-directory} for incoming mail. All the files in -that directory that have names ending in @code{nnmail-procmail-suffix} -will be considered incoming mailboxes, and will be searched for new -mail. -@vindex nnmail-crash-box -@item nnmail-crash-box -When a mail backend reads a spool file, mail is first moved to this -file, which is @file{~/.gnus-crash-box} by default. If this file -already exists, it will always be read (and incorporated) before any -other spool files. + +@node Mail Backend Variables +@subsection Mail Backend Variables + +These variables are (for the most part) pertinent to all the various +mail backends. + +@table @code +@vindex nnmail-read-incoming-hook +@item nnmail-read-incoming-hook +The mail backends all call this hook after reading new mail. You can +use this hook to notify any mail watch programs, if you want to. @vindex nnmail-split-hook @item nnmail-split-hook @@ -9948,42 +10106,6 @@ default file modes the new mail files get: (lambda () (set-default-file-modes 551))) @end lisp -@item nnmail-tmp-directory -@vindex nnmail-tmp-directory -This variable says where to move incoming mail to -- while processing -it. This is usually done in the same directory that the mail backend -inhabits (e.g., @file{~/Mail/}), but if this variable is non-@code{nil}, -it will be used instead. - -@item nnmail-movemail-program -@vindex nnmail-movemail-program -This program is executed to move mail from the user's inbox to her home -directory. The default is @samp{movemail}. - -This can also be a function. In that case, the function will be called -with two parameters -- the name of the inbox, and the file to be moved -to. - -@item nnmail-delete-incoming -@vindex nnmail-delete-incoming -@cindex incoming mail files -@cindex deleting incoming files -If non-@code{nil}, the mail backends will delete the temporary incoming -file after splitting mail into the proper groups. This is @code{t} by -default. - -@c This is @code{nil} by -@c default for reasons of security. - -@c Since Red Gnus is an alpha release, it is to be expected to lose mail. -(No Gnus release since (ding) Gnus 0.10 (or something like that) have -lost mail, I think, but that's not the point. (Except certain versions -of Red Gnus.)) By not deleting the Incoming* files, one can be sure not -to lose mail -- if Gnus totally whacks out, one can always recover what -was lost. - -You may delete the @file{Incoming*} files at will. - @item nnmail-use-long-file-names @vindex nnmail-use-long-file-names If non-@code{nil}, the mail backends will use long file and directory @@ -10112,92 +10234,6 @@ up to @samp{\\9} will be substituted with the text matched by the groupings 1 through 9. -@node Mail and Procmail -@subsection Mail and Procmail -@cindex procmail - -@cindex slocal -@cindex elm -Many people use @code{procmail} (or some other mail filter program or -external delivery agent---@code{slocal}, @code{elm}, etc) to split -incoming mail into groups. If you do that, you should set -@code{nnmail-spool-file} to @code{procmail} to ensure that the mail -backends never ever try to fetch mail by themselves. - -If you have a combined @code{procmail}/POP/mailbox setup, you can do -something like the following: - -@vindex nnmail-use-procmail -@lisp -(setq nnmail-use-procmail t) -(setq nnmail-spool-file - '("/usr/spool/mail/my-name" "po:my-name")) -@end lisp - -This also means that you probably don't want to set -@code{nnmail-split-methods} either, which has some, perhaps, unexpected -side effects. - -When a mail backend is queried for what groups it carries, it replies -with the contents of that variable, along with any groups it has figured -out that it carries by other means. None of the backends, except -@code{nnmh}, actually go out to the disk and check what groups actually -exist. (It's not trivial to distinguish between what the user thinks is -a basis for a newsgroup and what is just a plain old file or directory.) - -This means that you have to tell Gnus (and the backends) by hand what -groups exist. - -Let's take the @code{nnmh} backend as an example: - -The folders are located in @code{nnmh-directory}, say, @file{~/Mail/}. -There are three folders, @file{foo}, @file{bar} and @file{mail.baz}. - -Go to the group buffer and type @kbd{G m}. When prompted, answer -@samp{foo} for the name and @samp{nnmh} for the method. Repeat -twice for the two other groups, @samp{bar} and @samp{mail.baz}. Be sure -to include all your mail groups. - -That's it. You are now set to read your mail. An active file for this -method will be created automatically. - -@vindex nnmail-procmail-suffix -@vindex nnmail-procmail-directory -If you use @code{nnfolder} or any other backend that store more than a -single article in each file, you should never have procmail add mails to -the file that Gnus sees. Instead, procmail should put all incoming mail -in @code{nnmail-procmail-directory}. To arrive at the file name to put -the incoming mail in, append @code{nnmail-procmail-suffix} to the group -name. The mail backends will read the mail from these files. - -@vindex nnmail-resplit-incoming -When Gnus reads a file called @file{mail.misc.spool}, this mail will be -put in the @code{mail.misc}, as one would expect. However, if you want -Gnus to split the mail the normal way, you could set -@code{nnmail-resplit-incoming} to @code{t}. - -@vindex nnmail-keep-last-article -If you use @code{procmail} to split things directly into an @code{nnmh} -directory (which you shouldn't do), you should set -@code{nnmail-keep-last-article} to non-@code{nil} to prevent Gnus from -ever expiring the final article (i.e., the article with the highest -article number) in a mail newsgroup. This is quite, quite important. - -Here's an example setup: The incoming spools are located in -@file{~/incoming/} and have @samp{""} as suffixes (i.e., the incoming -spool files have the same names as the equivalent groups). The -@code{nnfolder} backend is to be used as the mail interface, and the -@code{nnfolder} directory is @file{~/fMail/}. - -@lisp -(setq nnfolder-directory "~/fMail/") -(setq nnmail-spool-file 'procmail) -(setq nnmail-procmail-directory "~/incoming/") -(setq gnus-secondary-select-methods '((nnfolder ""))) -(setq nnmail-procmail-suffix "") -@end lisp - - @node Incorporating Old Mail @subsection Incorporating Old Mail diff --git a/texi/message.texi b/texi/message.texi index 08024a3..87d633c 100644 --- a/texi/message.texi +++ b/texi/message.texi @@ -1,7 +1,7 @@ \input texinfo @c -*-texinfo-*- @setfilename message -@settitle Pterodactyl Message 0.73 Manual +@settitle Pterodactyl Message 0.74 Manual @synindex fn cp @synindex vr cp @synindex pg cp @@ -17,7 +17,7 @@ This file documents Message, the Emacs message composition mode. -Copyright (C) 1996,97,98 Free Software Foundation, Inc. +Copyright (C) 1996,97,98,99 Free Software Foundation, Inc. Permission is granted to make and distribute verbatim copies of this manual provided the copyright notice and this permission notice @@ -42,13 +42,13 @@ into another language, under the above conditions for modified versions. @tex @titlepage -@title Pterodactyl Message 0.73 Manual +@title Pterodactyl Message 0.74 Manual @author by Lars Magne Ingebrigtsen @page @vskip 0pt plus 1filll -Copyright @copyright{} 1996 Free Software Foundation, Inc. +Copyright @copyright{} 1996,97,98,99 Free Software Foundation, Inc. Permission is granted to make and distribute verbatim copies of this manual provided the copyright notice and this permission notice @@ -83,7 +83,7 @@ Message mode buffers. * Key Index:: List of Message mode keys. @end menu -This manual corresponds to Pterodactyl Message 0.73. Message is +This manual corresponds to Pterodactyl Message 0.74. Message is distributed with the Gnus distribution bearing the same version number as this manual. @@ -116,7 +116,7 @@ sending it. @section New Mail Message @findex message-mail -The @code{message-mail} command pops up a new message buffer. +The @code{message-mail} command pops up a new message buffer. Two optional parameters are accepted: The first will be used as the @code{To} header and the second as the @code{Subject} header. If these @@ -127,7 +127,7 @@ are @code{nil}, those two headers will be empty. @section New News Message @findex message-news -The @code{message-news} command pops up a new message buffer. +The @code{message-news} command pops up a new message buffer. This function accepts two optional parameters. The first will be used as the @code{Newsgroups} header and the second as the @code{Subject} @@ -153,8 +153,8 @@ If you want the replies to go to the @code{Sender} instead of the (setq message-reply-to-function (lambda () (cond ((equal (mail-fetch-field "from") "somebody") - (mail-fetch-field "sender")) - (t + (mail-fetch-field "sender")) + (t nil)))) @end lisp @@ -170,7 +170,7 @@ This function can also return a list. In that case, each list element should be a cons, where the car should be the name of an header (eg. @code{Cc}) and the cdr should be the header value (eg. @samp{larsi@@ifi.uio.no}). All these headers will be inserted into -the head of the outgoing mail. +the head of the outgoing mail. @node Wide Reply @@ -186,7 +186,7 @@ reply that goes out to all people listed in the @code{To}, @code{From} Message uses the normal methods to determine where wide replies are to go, but you can change the behavior to suit your needs by fiddling with the @code{message-wide-reply-to-function}. It is used in the same way as -@code{message-reply-to-function} (@pxref{Reply}). +@code{message-reply-to-function} (@pxref{Reply}). @findex rmail-dont-reply-to-names Addresses that match the @code{rmail-dont-reply-to-names} regular @@ -249,13 +249,13 @@ news. @item message-forward-start-separator @vindex message-forward-start-separator Delimiter inserted before forwarded messages. The default is@* -@samp{------- Start of forwarded message -------\n}. +@samp{------- Start of forwarded message -------\n}. @vindex message-forward-end-separator @item message-forward-end-separator @vindex message-forward-end-separator Delimiter inserted after forwarded messages. The default is@* -@samp{------- End of forwarded message -------\n}. +@samp{------- End of forwarded message -------\n}. @item message-signature-before-forwarded-message @vindex message-signature-before-forwarded-message @@ -265,7 +265,7 @@ forwarded message will be inserted first in the new mail. @item message-included-forward-headers @vindex message-included-forward-headers -Regexp matching header lines to be included in forwarded messages. +Regexp matching header lines to be included in forwarded messages. @item message-make-forward-subject-function @vindex message-make-forward-subject-function @@ -288,7 +288,7 @@ Subject of article with @samp{Fwd:} prepended to it. @item message-wash-forwarded-subjects @vindex message-wash-forwarded-subjects If this variable is @code{t}, the subjects of forwarded messages have -the evidence of previous forwards (such as @samp{Fwd:}, @samp{Re:}, +the evidence of previous forwards (such as @samp{Fwd:}, @samp{Re:}, @samp{(fwd)}) removed before the new subject is constructed. The default value is @code{nil}. @@ -305,7 +305,7 @@ and resend the message in the current buffer to that address. @vindex message-ignored-resent-headers Headers that match the @code{message-ignored-resent-headers} regexp will be removed before sending the message. The default is -@samp{^Return-receipt}. +@samp{^Return-receipt}. @node Bouncing @@ -316,7 +316,7 @@ The @code{message-bounce} command will, if the current buffer contains a bounced mail message, pop up a message buffer stripped of the bounce information. A @dfn{bounced message} is typically a mail you've sent out that has been returned by some @code{mailer-daemon} as -undeliverable. +undeliverable. @vindex message-ignored-bounced-headers Headers that match the @code{message-ignored-bounced-headers} regexp @@ -331,6 +331,7 @@ will be removed before popping up the buffer. The default is * Header Commands:: Commands for moving to headers. * Movement:: Moving around in message buffers. * Insertion:: Inserting things into message buffers. +* MIME:: @sc{mime} considerations. * Various Commands:: Various things. * Sending:: Actually sending the message. * Mail Aliases:: How to use mail aliases. @@ -351,57 +352,57 @@ it will be inserted. Describe the message mode. @item C-c C-f C-t -@kindex C-c C-f C-t +@kindex C-c C-f C-t @findex message-goto-to Go to the @code{To} header (@code{message-goto-to}). @item C-c C-f C-b -@kindex C-c C-f C-b +@kindex C-c C-f C-b @findex message-goto-bcc Go to the @code{Bcc} header (@code{message-goto-bcc}). @item C-c C-f C-f -@kindex C-c C-f C-f +@kindex C-c C-f C-f @findex message-goto-fcc Go to the @code{Fcc} header (@code{message-goto-fcc}). @item C-c C-f C-c -@kindex C-c C-f C-c +@kindex C-c C-f C-c @findex message-goto-cc Go to the @code{Cc} header (@code{message-goto-cc}). @item C-c C-f C-s -@kindex C-c C-f C-s +@kindex C-c C-f C-s @findex message-goto-subject Go to the @code{Subject} header (@code{message-goto-subject}). @item C-c C-f C-r -@kindex C-c C-f C-r +@kindex C-c C-f C-r @findex message-goto-reply-to Go to the @code{Reply-To} header (@code{message-goto-reply-to}). @item C-c C-f C-n -@kindex C-c C-f C-n +@kindex C-c C-f C-n @findex message-goto-newsgroups Go to the @code{Newsgroups} header (@code{message-goto-newsgroups}). @item C-c C-f C-d -@kindex C-c C-f C-d +@kindex C-c C-f C-d @findex message-goto-distribution Go to the @code{Distribution} header (@code{message-goto-distribution}). @item C-c C-f C-o -@kindex C-c C-f C-o +@kindex C-c C-f C-o @findex message-goto-followup-to Go to the @code{Followup-To} header (@code{message-goto-followup-to}). @item C-c C-f C-k -@kindex C-c C-f C-k +@kindex C-c C-f C-k @findex message-goto-keywords Go to the @code{Keywords} header (@code{message-goto-keywords}). @item C-c C-f C-u -@kindex C-c C-f C-u +@kindex C-c C-f C-u @findex message-goto-summary Go to the @code{Summary} header (@code{message-goto-summary}). @@ -413,13 +414,13 @@ Go to the @code{Summary} header (@code{message-goto-summary}). @table @kbd @item C-c C-b -@kindex C-c C-b +@kindex C-c C-b @findex message-goto-body Move to the beginning of the body of the message -(@code{message-goto-body}). +(@code{message-goto-body}). @item C-c C-i -@kindex C-c C-i +@kindex C-c C-i @findex message-goto-signature Move to the signature of the message (@code{message-goto-signature}). @@ -432,13 +433,13 @@ Move to the signature of the message (@code{message-goto-signature}). @table @kbd @item C-c C-y -@kindex C-c C-y +@kindex C-c C-y @findex message-yank-original Yank the message that's being replied to into the message buffer -(@code{message-yank-original}). +(@code{message-yank-original}). @item C-c C-q -@kindex C-c C-q +@kindex C-c C-q @findex message-fill-yanked-message Fill the yanked message (@code{message-fill-yanked-message}). Warning: Can severely mess up the yanked text if its quoting conventions are @@ -447,10 +448,10 @@ just remember that @kbd{C-x u} (@code{undo}) is available and you'll be all right. @item C-c C-w -@kindex C-c C-w +@kindex C-c C-w @findex message-insert-signature Insert a signature at the end of the buffer -(@code{message-insert-signature}). +(@code{message-insert-signature}). @item C-c M-h @kindex C-c M-h @@ -538,6 +539,27 @@ Including ASCII graphics is an efficient way to get everybody to believe that you are silly and have nothing important to say. +@node MIME +@section MIME +@cindex MML +@cindex MIME +@cindex multipart +@cindex attachment + +Message is a @sc{mime}-compliant posting agent. The user generally +doesn't have to do anything to make the @sc{mime} happen---Message will +automatically add the @code{Content-Type} and +@code{Content-Transfer-Encoding} headers. + +The most typical thing users want to use the multipart things in +@sc{mime} for is to add ``attachments'' to mail they send out. This can +be done with the @code{C-c C-a} command, which will prompt for a file +name and a @sc{mime} type. + +You can also create arbitrarily complex multiparts using the MML +language (@pxref{Composing, , Composing, emacs-mime, The Emacs MIME +Manual}). + @node Various Commands @section Various Commands @@ -545,7 +567,7 @@ that you are silly and have nothing important to say. @table @kbd @item C-c C-r -@kindex C-c C-r +@kindex C-c C-r @findex message-caesar-buffer-body Caesar rotate (aka. rot13) the current message (@code{message-caesar-buffer-body}). If narrowing is in effect, just @@ -592,17 +614,17 @@ If point is before @samp{And} and you press @kbd{M-RET}, you'll get: > And here's more quoted text. @end example -@samp{*} says where point will be placed. +@samp{*} says where point will be placed. @item C-c C-t -@kindex C-c C-t +@kindex C-c C-t @findex message-insert-to Insert a @code{To} header that contains the @code{Reply-To} or @code{From} header of the message you're following up -(@code{message-insert-to}). +(@code{message-insert-to}). @item C-c C-n -@kindex C-c C-n +@kindex C-c C-n @findex message-insert-newsgroups Insert a @code{Newsgroups} header that reflects the @code{Followup-To} or @code{Newsgroups} header of the article you're replying to @@ -622,15 +644,15 @@ prompt for a new buffer name. @table @kbd @item C-c C-c -@kindex C-c C-c +@kindex C-c C-c @findex message-send-and-exit Send the message and bury the current buffer -(@code{message-send-and-exit}). +(@code{message-send-and-exit}). @item C-c C-s -@kindex C-c C-s +@kindex C-c C-s @findex message-send -Send the message (@code{message-send}). +Send the message (@code{message-send}). @item C-c C-d @kindex C-c C-d @@ -704,7 +726,7 @@ look sufficiently similar. @item message-generate-headers-first @vindex message-generate-headers-first If non-@code{nil}, generate all headers before starting to compose the -message. +message. @item message-from-style @vindex message-from-style @@ -738,7 +760,7 @@ ship it off again. By default, this variable makes sure that the old generated @code{Message-ID} is deleted, and a new one generated. If this isn't done, the entire empire would probably crumble, anarchy would prevail, and cats would start walking on two legs and rule the world. -Allegedly. +Allegedly. @item message-default-headers @vindex message-default-headers @@ -784,7 +806,7 @@ buffers that are initialized as mail. @node Mail Variables -@section Mail Variables +@section Mail Variables @table @code @item message-send-mail-function @@ -825,7 +847,7 @@ This required header will be filled out with the result of the @item Subject @cindex Subject -This required header will be prompted for if not present already. +This required header will be prompted for if not present already. @item Newsgroups @cindex Newsgroups @@ -928,21 +950,21 @@ to this list. Valid checks are: @table @code -@item subject-cmsg +@item subject-cmsg Check the subject for commands. @item sender @cindex Sender -Insert a new @code{Sender} header if the @code{From} header looks odd. -@item multiple-headers +Insert a new @code{Sender} header if the @code{From} header looks odd. +@item multiple-headers Check for the existence of multiple equal headers. -@item sendsys +@item sendsys @cindex sendsys Check for the existence of version and sendsys commands. @item message-id Check whether the @code{Message-ID} looks ok. @item from Check whether the @code{From} header seems nice. -@item long-lines +@item long-lines @cindex long lines Check for too long lines. @item control-chars @@ -964,7 +986,7 @@ Check whether there is any invisible text in the buffer. @item empty-headers Check whether any of the headers are empty. @item existing-newsgroups -Check whether the newsgroups mentioned in the @code{Newsgroups} and +Check whether the newsgroups mentioned in the @code{Newsgroups} and @code{Followup-To} headers exist. @item valid-newsgroups Check whether the @code{Newsgroups} and @code{Followup-to} headers @@ -999,7 +1021,7 @@ buffers that are initialized as news. @item message-send-news-function @vindex message-send-news-function Function used to send the current buffer as news. The default is -@code{message-send-news}. +@code{message-send-news}. @item message-post-method @vindex message-post-method @@ -1016,7 +1038,7 @@ posting a prepared news message. @item message-signature-separator @vindex message-signature-separator Regexp matching the signature separator. It is @samp{^-- *$} by -default. +default. @item mail-header-separator @vindex mail-header-separator @@ -1025,12 +1047,12 @@ follows this line--} by default. @item message-directory @vindex message-directory -Directory used by many mailey things. The default is @file{~/Mail/}. +Directory used by many mailey things. The default is @file{~/Mail/}. @item message-signature-setup-hook @vindex message-signature-setup-hook Hook run when initializing the message buffer. It is run after the -headers have been inserted but before the signature has been inserted. +headers have been inserted but before the signature has been inserted. @item message-setup-hook @vindex message-setup-hook @@ -1039,7 +1061,7 @@ but before yanked text is inserted. @item message-header-setup-hook @vindex message-header-setup-hook -Hook called narrowed to the headers after initializing the headers. +Hook called narrowed to the headers after initializing the headers. For instance, if you're running Gnus and wish to insert a @samp{Mail-Copies-To} header in all your news articles and all messages @@ -1069,9 +1091,8 @@ If you want to add certain headers before sending, you can use the (add-hook 'message-send-hook 'my-message-add-content) (defun my-message-add-content () (message-add-header - "Mime-Version: 1.0" - "Content-Type: text/plain" - "Content-Transfer-Encoding: 7bit")) + "X-In-No-Sense: Nonsense" + "X-Whatever: no")) @end lisp This function won't add the header if the header is already present. @@ -1130,8 +1151,8 @@ A function to be called if @var{predicate} returns non-@code{nil}. @table @code -@item message-fcc-handler-function -@vindex message-fcc-handler-function +@item message-fcc-handler-function +@vindex message-fcc-handler-function A function called to save outgoing articles. This function will be called with the name of the file to store the article in. The default function is @code{message-output} which saves in Unix mailbox format. @@ -1143,7 +1164,7 @@ the mailed copy. If the string contains the format spec @samp{%s}, the newsgroups the article has been posted to will be inserted there. If this variable is @code{nil}, no such courtesy message will be added. The default value is @samp{"The following message is a courtesy copy of -an article\nthat has been posted to %s as well.\n\n"}. +an article\nthat has been posted to %s as well.\n\n"}. @end table @@ -1196,7 +1217,7 @@ If non-@code{nil}, kill the buffer immediately on exit. When Message is being used from a news/mail reader, the reader is likely to want to perform some task after the message has been sent. Perhaps return to the previous window configuration or mark an article as -replied. +replied. @vindex message-kill-actions @vindex message-postpone-actions @@ -1209,7 +1230,7 @@ C-d} which postpones the message editing and buries the message buffer, and @kbd{C-c C-k} which kills the message buffer. Each of these actions have lists associated with them that contains actions to be executed: @code{message-send-actions}, @code{message-exit-actions}, -@code{message-postpone-actions}, and @code{message-kill-actions}. +@code{message-postpone-actions}, and @code{message-kill-actions}. Message provides a function to interface with these lists: @code{message-add-action}. The first parameter is the action to be