** 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
*** `gnus-article-display-hook' has been removed. Instead, a number
of variables starting with `gnus-treat-'.
-
+Wed Jan 27 05:24:53 1999 Lars Magne Ingebrigtsen <larsi@menja.ifi.uio.no>
+
+ * gnus.el: Pterodactyl Gnus v0.74 is released.
+
+1999-01-27 05:56:29 Lars Magne Ingebrigtsen <larsi@gnus.org>
+
+ * gnus-art.el (article-fill-long-lines): Renamed.
+ (article-fill-long-lines): New keystroke.
+
+1999-01-26 06:35:07 Lars Magne Ingebrigtsen <larsi@gnus.org>
+
+ * 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 <fx@gnu.org>
+
+ * message.el (message-mode-menu): Add message-mime-attach-file.
+ (message-mode): Doc fix.
+
+1999-01-26 05:24:19 Lars Magne Ingebrigtsen <larsi@gnus.org>
+
+ * 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 <ljz@asfast.com>
+
+ * nnmail.el (nnmail-get-split-group): Quote right.
+
+1999-01-25 05:55:41 Lars Magne Ingebrigtsen <larsi@gnus.org>
+
+ * mail-source.el (mail-source-movemail): Would kill an arbitrary
+ buffer.
+
+1999-01-24 03:02:31 Lars Magne Ingebrigtsen <larsi@gnus.org>
+
+ * 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 <larsi@gnus.org>
+
+ * 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 <ajc@bing.wattle.id.au>
+
+ * mm-view.el (mm-inline-text): Do vcards.
+
Sat Jan 23 14:23:27 1999 Lars Magne Ingebrigtsen <larsi@menja.ifi.uio.no>
* gnus.el: Pterodactyl Gnus v0.73 is released.
: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)
(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)
'((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)
(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)
(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.."
'(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
(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)))
(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)
(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)
(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
(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")
(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)))
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?
(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)))
(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)
(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
"-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
"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
["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]
(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)
;; 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))
(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
: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)
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
;;; 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
(concat "/usr/spool/mail/" (user-login-name)))))
(directory
(:path)
- (:suffix ".spool")
- (:match))
+ (:suffix ".spool"))
(pop
(:server (getenv "MAILHOST"))
(:port "pop3")
"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)
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))
(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
((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
(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)))
(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)
(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))
["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]
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)
(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))
""))))
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.
("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
(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.")
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)
(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 ()
(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)
;; Copyright (c) 1998 by Shenghuo Zhu <zsh@cs.rochester.edu>
;; Author: Shenghuo Zhu <zsh@cs.rochester.edu>
-;; $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
(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
;;;
(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))
(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)
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))
(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)
(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)
(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.
(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
(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)) "?"
(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)
+1999-01-25 04:24:01 Lars Magne Ingebrigtsen <larsi@gnus.org>
+
+ * 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 <larsi@gnus.org>
* gnus.texi (Article Washing): Removed.
+ (Customizing Articles): Addition.
1999-01-16 20:36:48 Lars Magne Ingebrigtsen <larsi@gnus.org>
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
@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
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
@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!\"")
@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
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
@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
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
@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>
Content-Disposition Header Field
@end table
-
-
+
+
@node Index
@chapter Index
@printindex cp
\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
\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
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
@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
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
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
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
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
@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.
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
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
(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
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
\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
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
@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
* 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.
@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
@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}
(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
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
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
@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
@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
@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}.
@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
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
* 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.
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}).
@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}).
@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
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
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
@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
> 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
@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
@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
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
@node Mail Variables
-@section Mail Variables
+@section Mail Variables
@table @code
@item message-send-mail-function
@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
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
@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
@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
@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
@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
@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
(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.
@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.
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
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
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