** Gnus changes.
+The Gnus NEWS entries are short, but they reflect sweeping changes in
+four areas: Article display treatment, MIME treatment,
+internationalization and mail-fetching.
+
*** 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 is now a MIME-capable reader. This affects many parts of
+Gnus, and adds a slew of new commands. See the manual for details.
+
+*** Gnus has also been multilingualized. This also affects too
+many parts of Gnus to summarize here, and adds many new variables.
*** gnus-auto-select-first can now be a function to be
called to position point.
summary buffers and NOV files.
*** `gnus-article-display-hook' has been removed. Instead, a number
-of variables starting with `gnus-treat-'.
+of variables starting with `gnus-treat-' have been added.
+
+*** The Gnus posting styles have been redone again and now works in a
+subtly different manner.
+Sun Jul 4 06:31:01 1999 Lars Magne Ingebrigtsen <larsi@menja.ifi.uio.no>
+
+ * gnus.el: Pterodactyl Gnus v0.91 is released.
+
+1999-07-04 04:35:28 Lars Magne Ingebrigtsen <larsi@gnus.org>
+
+ * gnus-agent.el (gnus-agent-save-active-1): New function.
+ (gnus-agent-save-active): use it.
+ (gnus-agent-save-groups): Ditto.
+
+ * gnus-cache.el (gnus-cache-write-active): Use it.
+
+ * gnus-agent.el (gnus-agent-write-active): Use it.
+
+ * gnus-util.el (gnus-write-active-file): New function.
+
+ * gnus-agent.el (gnus-agent-write-active): New function to keep
+ lower boundaries and canceled groups.
+ (gnus-agent-save-groups): Use it.
+ (gnus-agent-save-active): Use it.
+ (gnus-agent-save-group-info): Only write active files.
+ (gnus-agent-expire): Update active file.
+
+ * mm-decode.el (mm-inlinable-part-p): Removed.
+ (mm-user-display-methods): Default to nil.
+ (mm-user-display-methods): Removed.
+ (add-mime-display-method): Removed.
+ (mm-automatic-display): Renamed.
+ (mm-automatic-display-p): Use it.
+ (mm-inlined-types): New variable.
+ (mm-inlined-p): New function.
+
+ * message.el (message-reply): Bind message-this-is-mail.
+
+1999-07-03 13:16:31 Michael Klingbeil <mklingbeil@knuut.de>
+
+ * smiley.el (smiley-buffer): Fix for NT.
+
+1999-07-03 11:26:47 Lars Magne Ingebrigtsen <larsi@gnus.org>
+
+ * mm-encode.el (mm-encode-buffer): Check whether we have 7bit.
+
+ * message.el (message-check-news-header-syntax): Protect against
+ nil froms.
+
+ * mm-util.el (mm-auto-mode-alist): New.
+
+ * mml.el (mml-generate-mime-1): Ditto.
+
+ * gnus.el: Use mm-insert-file-contents throughout instead of
+ nnheader.
+
+ * mm-util.el (mm-insert-file-contents): New function.
+
Sat Jul 3 07:35:35 1999 Lars Magne Ingebrigtsen <larsi@menja.ifi.uio.no>
* gnus.el: Pterodactyl Gnus v0.90 is released.
"Load FILE and do a `read' there."
(with-temp-buffer
(ignore-errors
- (nnheader-insert-file-contents file)
+ (mm-insert-file-contents file)
(goto-char (point-min))
(read (current-buffer)))))
;;;
(defun gnus-agent-save-active (method)
+ (gnus-agent-save-active-1 method 'gnus-active-to-gnus-format))
+
+(defun gnus-agent-save-active-1 (method function)
(when (gnus-agent-method-p method)
(let* ((gnus-command-method method)
+ (new (gnus-make-hashtable (count-lines (point-min) (point-max))))
(file (gnus-agent-lib-file "active")))
- (gnus-make-directory (file-name-directory file))
- (let ((coding-system-for-write gnus-agent-file-coding-system))
- (write-region (point-min) (point-max) file nil 'silent))
- (when (file-exists-p (gnus-agent-lib-file "groups"))
- (delete-file (gnus-agent-lib-file "groups"))))))
-
-(defun gnus-agent-save-groups (method)
- (let* ((gnus-command-method method)
- (file (gnus-agent-lib-file "groups")))
+ (funcall function nil new)
+ (gnus-agent-write-active file new)
+ (erase-buffer)
+ (insert-file-contents-literally file))))
+
+(defun gnus-agent-write-active (file new)
+ (let ((orig (gnus-make-hashtable (count-lines (point-min) (point-max))))
+ (file (gnus-agent-lib-file "active"))
+ elem)
+ (when (file-exists-p file)
+ (with-temp-buffer
+ (insert-file-contents file)
+ (gnus-active-to-gnus-format nil orig))
+ (mapatoms
+ (lambda (sym)
+ (when (and sym (boundp sym))
+ (if (setq elem (symbol-value (intern (symbol-name sym) orig)))
+ (setcdr elem (cdr (symbol-value sym)))
+ (set (intern (symbol-name sym) orig) (symbol-value sym)))))
+ new))
(gnus-make-directory (file-name-directory file))
(let ((coding-system-for-write gnus-agent-file-coding-system))
- (write-region (point-min) (point-max) file nil 'silent))
- (when (file-exists-p (gnus-agent-lib-file "active"))
- (delete-file (gnus-agent-lib-file "active")))))
+ (gnus-write-active-file file orig))))
+
+(defun gnus-agent-save-groups (method)
+ (gnus-agent-save-active-1 method 'gnus-groups-to-gnus-format))
(defun gnus-agent-save-group-info (method group active)
(when (gnus-agent-method-p method)
(let* ((gnus-command-method method)
- (file (if nntp-server-list-active-group
- (gnus-agent-lib-file "active")
- (gnus-agent-lib-file "groups"))))
+ (file (gnus-agent-lib-file "active")))
(gnus-make-directory (file-name-directory file))
(with-temp-file file
(when (file-exists-p file)
- (nnheader-insert-file-contents file))
+ (mm-insert-file-contents file))
(goto-char (point-min))
- (if nntp-server-list-active-group
- (progn
- (when (re-search-forward
- (concat "^" (regexp-quote group) " ") nil t)
- (gnus-delete-line))
- (insert group " " (number-to-string (cdr active)) " "
- (number-to-string (car active)) " y\n"))
- (when (re-search-forward
- (concat (regexp-quote group) "\\($\\| \\)") nil t)
- (gnus-delete-line))
- (insert-buffer-substring nntp-server-buffer))))))
+ (when (re-search-forward
+ (concat "^" (regexp-quote group) " ") nil t)
+ (gnus-delete-line))
+ (insert group " " (number-to-string (cdr active)) " "
+ (number-to-string (car active)) " y\n")))))
(defun gnus-agent-group-path (group)
"Translate GROUP into a path."
(when (= (point-max) (point-min))
(push (cons group (current-buffer)) gnus-agent-buffer-alist)
(ignore-errors
- (nnheader-insert-file-contents
+ (mm-insert-file-contents
(gnus-agent-article-name ".overview" group))))
(nnheader-find-nov-line (string-to-number (cdar crosses)))
(insert (string-to-number (cdar crosses)))
(goto-char (point-min))
(set-buffer nntp-server-buffer)
(erase-buffer)
- (nnheader-insert-file-contents file)
+ (mm-insert-file-contents file)
(goto-char (point-max))
(if (or (= (point-min) (point-max))
(progn
(day (- (time-to-days (current-time)) gnus-agent-expire-days))
gnus-command-method sym group articles
history overview file histories elem art nov-file low info
- unreads marked article)
+ unreads marked article orig lowest highest)
(save-excursion
+ (with-temp-buffer
+ (insert-file-contents file)
+ (gnus-active-to-gnus-format
+ nil (setq orig (gnus-make-hashtable
+ (count-lines (point-min) (point-max))))))
(setq overview (gnus-get-buffer-create " *expire overview*"))
(while (setq gnus-command-method (pop methods))
(let ((expiry-hashtb (gnus-make-hashtable 1023)))
(gnus-uncompress-range
(cdr (assq 'dormant
(gnus-info-marks info)))))
- nov-file (gnus-agent-article-name ".overview" group))
+ nov-file (gnus-agent-article-name ".overview" group)
+ lowest nil
+ highest nil)
(gnus-agent-load-alist group)
(gnus-message 5 "Expiring articles in %s" group)
(set-buffer overview)
(erase-buffer)
(when (file-exists-p nov-file)
- (nnheader-insert-file-contents nov-file))
+ (mm-insert-file-contents nov-file))
(goto-char (point-min))
(setq article 0)
(while (setq elem (pop articles))
(if (file-exists-p
(gnus-agent-article-name
(number-to-string art) group))
- (forward-line 1)
+ (progn
+ (unless lowest
+ (setq lowest art))
+ (setq highest art)
+ (forward-line 1))
;; Remove old NOV lines that have no articles.
(gnus-delete-line)))
(if (or (eobp)
(gnus-dribble-enter
(concat "(gnus-group-set-info '"
(gnus-prin1-to-string info)
- ")"))))
+ ")")))
+ (when lowest
+ (if (gnus-gethash group orig)
+ (setcar (gnus-gethash group orig) lowest)
+ (gnus-sethash group (cons lowest highest) orig))))
expiry-hashtb)
(set-buffer history)
(setq histories (nreverse (sort histories '<)))
(goto-char (pop histories))
(gnus-delete-line))
(gnus-agent-save-history)
- (gnus-agent-close-history))
+ (gnus-agent-close-history)
+ (gnus-write-active-file
+ (gnus-agent-lib-file "active") orig))
(gnus-message 4 "Expiry...done"))))))
;;;###autoload
"inline")
(mm-attachment-override-p type)))
(mm-automatic-display-p type)
- (or (mm-inlinable-part-p type)
+ (or (mm-inlined-p type)
(mm-automatic-external-display-p type)))
(setq display t)
(when (equal (car (split-string type "/"))
(erase-buffer)
(let ((file (gnus-cache-file-name group ".overview")))
(when (file-exists-p file)
- (nnheader-insert-file-contents file)))
+ (mm-insert-file-contents file)))
;; We have a fresh (empty/just loaded) buffer,
;; mark it as unmodified to save a redundant write later.
(set-buffer-modified-p nil))))
(when (or force
(and gnus-cache-active-hashtb
gnus-cache-active-altered))
- (with-temp-file gnus-cache-active-file
- (mapatoms
- (lambda (sym)
- (when (and sym (boundp sym))
- (insert (format "%s %d %d y\n"
- (symbol-name sym) (cdr (symbol-value sym))
- (car (symbol-value sym))))))
- gnus-cache-active-hashtb))
+ (gnus-write-active-file gnus-cache-active-file gnus-cache-active-hashtb)
;; Mark the active hashtb as unaltered.
(setq gnus-cache-active-altered nil)))
(insert-file-contents v)
(buffer-string))))
(setq results (delq (assoc element results) results))
- (push (cons element
- v) results))))
+ (push (cons element v) results))))
;; Now we have all the styles, so we insert them.
(setq name (assq 'name results)
address (assq 'address results))
"D" gnus-server-deny-server
"R" gnus-server-remove-denials
+ "n" next-line
+ "p" previous-line
+
"g" gnus-server-regenerate-server
"\C-c\C-i" gnus-info-find-node
;; Load whichever file is newest -- the auto save file
;; or the "real" file.
(if (file-newer-than-file-p auto dribble-file)
- (nnheader-insert-file-contents auto)
- (nnheader-insert-file-contents dribble-file))
+ (mm-insert-file-contents auto)
+ (mm-insert-file-contents dribble-file))
(unless (zerop (buffer-size))
(set-buffer-modified-p t))
;; Set the file modes to reflect the .newsrc file modes.
(gnus-group-prefixed-name "" method))))
;; Let the Gnus agent save the active file.
- (when (and gnus-agent real-active)
- (gnus-agent-save-groups method))
+ (if (and gnus-agent real-active)
+ (progn
+ (gnus-agent-save-groups method)
+ (gnus-active-to-gnus-format method hashtb nil real-active))
- (goto-char (point-min))
- ;; We split this into to separate loops, one with the prefix
- ;; and one without to speed the reading up somewhat.
- (if prefix
- (let (min max opoint group)
+ (goto-char (point-min))
+ ;; We split this into to separate loops, one with the prefix
+ ;; and one without to speed the reading up somewhat.
+ (if prefix
+ (let (min max opoint group)
+ (while (not (eobp))
+ (condition-case ()
+ (progn
+ (read cur) (read cur)
+ (setq min (read cur)
+ max (read cur)
+ opoint (point))
+ (skip-chars-forward " \t")
+ (insert prefix)
+ (goto-char opoint)
+ (set (let ((obarray hashtb)) (read cur))
+ (cons min max)))
+ (error (and group (symbolp group) (set group nil))))
+ (forward-line 1)))
+ (let (min max group)
(while (not (eobp))
(condition-case ()
- (progn
+ (when (eq (char-after) ?2)
(read cur) (read cur)
(setq min (read cur)
- max (read cur)
- opoint (point))
- (skip-chars-forward " \t")
- (insert prefix)
- (goto-char opoint)
- (set (let ((obarray hashtb)) (read cur))
+ max (read cur))
+ (set (setq group (let ((obarray hashtb)) (read cur)))
(cons min max)))
(error (and group (symbolp group) (set group nil))))
- (forward-line 1)))
- (let (min max group)
- (while (not (eobp))
- (condition-case ()
- (when (eq (char-after) ?2)
- (read cur) (read cur)
- (setq min (read cur)
- max (read cur))
- (set (setq group (let ((obarray hashtb)) (read cur)))
- (cons min max)))
- (error (and group (symbolp group) (set group nil))))
- (forward-line 1))))))
+ (forward-line 1)))))))
(defun gnus-read-newsrc-file (&optional force)
"Read startup file.
(throw 'found nil)))
t))
+(defun gnus-write-active-file (file hashtb)
+ (with-temp-file file
+ (mapatoms
+ (lambda (sym)
+ (when (and sym (boundp sym))
+ (insert (format "%s %d %d y\n"
+ (symbol-name sym) (cdr (symbol-value sym))
+ (car (symbol-value sym))))))
+ hashtb)))
+
(provide 'gnus-util)
;;; gnus-util.el ends here
:link '(custom-manual "(gnus)Exiting Gnus")
:group 'gnus)
-(defconst gnus-version-number "0.90"
+(defconst gnus-version-number "0.91"
"Version number for this version of Gnus.")
(defconst gnus-version (format "Pterodactyl Gnus v%s" gnus-version-number)
(file-readable-p file)
(file-regular-p file))
(with-temp-buffer
- (nnheader-insert-file-contents file)
+ (mm-insert-file-contents file)
(goto-char (point-min))
(looking-at message-unix-mail-delimiter))))
(message-check 'from
(let* ((case-fold-search t)
(from (message-fetch-field "from"))
- (ad (nth 1 (mail-extract-address-components from))))
+ ad)
(cond
((not from)
(message "There is no From line. Posting is denied.")
nil)
- ((or (not (string-match "@[^\\.]*\\." ad)) ;larsi@ifi
+ ((or (not (string-match
+ "@[^\\.]*\\."
+ (setq ad (nth 1 (mail-extract-address-components
+ from))))) ;larsi@ifi
(string-match "\\.\\." ad) ;larsi@ifi..uio
(string-match "@\\." ad) ;larsi@.ifi.uio
(string-match "\\.$" ad) ;larsi@ifi.uio.
from subject date reply-to to cc
references message-id follow-to
(inhibit-point-motion-hooks t)
+ (message-this-is-mail t)
mct never-mct gnus-warning)
(save-restriction
(message-narrow-to-head)
("multipart/related" ignore t))
"Alist of media types/test that say whether the media types can be displayed inline.")
-(defvar mm-user-display-methods
- '(("image/.*" . inline)
- ("text/.*" . inline)
- ("message/delivery-status" . inline)
- ("message/rfc822" . inline)))
-
-(defvar mm-user-automatic-display
+(defvar mm-inlined-types
+ '("image/.*" "text/.*" "message/delivery-status" "message/rfc822")
+ "List of media types that are to be displayed inline.")
+
+(defvar mm-automatic-display
'("text/plain" "text/enriched" "text/richtext" "text/html"
"text/x-vcard" "image/.*" "message/delivery-status" "multipart/.*"
- "message/rfc822"))
+ "message/rfc822")
+ "A list of MIME types to be displayed automatically.")
(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
+(defvar mm-automatic-external-display nil
"List of MIME type regexps that will be displayed externally automatically.")
(defvar mm-discouraged-alternatives nil
- "List of MIME types that are discouraged when viewing multiapart/alternative.
+ "List of MIME types that are discouraged when viewing multipart/alternative.
Viewing agents are supposed to view the last possible part of a message,
as that is supposed to be the richest. However, users may prefer other
types instead, and this list says what types are most unwanted. If,
(insert-buffer-substring obuf beg)
(current-buffer))))
-(defun mm-inlinable-part-p (type)
- "Say whether TYPE can be displayed inline."
- (eq (mm-user-method type) 'inline))
-
(defun mm-display-part (handle &optional no-default)
"Display the MIME part represented by HANDLE.
Returns nil if the part is removed; inline if displayed inline;
(if (mm-handle-displayed-p handle)
(mm-remove-part handle)
(let* ((type (car (mm-handle-type handle)))
- (method (mailcap-mime-info type))
- (user-method (mm-user-method type)))
- (if (eq user-method 'inline)
+ (method (mailcap-mime-info type)))
+ (if (mm-inlined-p type)
(progn
(forward-line 1)
(mm-display-inline handle)
'inline)
- (when (or user-method
- method
+ (when (or method
(not no-default))
- (if (and (not user-method)
- (not method)
+ (if (and (not method)
(equal "text" (car (split-string type))))
(progn
(forward-line 1)
(mm-insert-inline handle (mm-get-part handle))
'inline)
(mm-display-external
- handle (or user-method method
- 'mailcap-save-binary-file))
+ handle (or method 'mailcap-save-binary-file))
'external)))))))
(defun mm-display-external (handle method)
(pop alist))
test))
-(defun mm-user-method (type)
- "Return the user-defined method for TYPE."
- (let ((methods mm-user-display-methods)
+(defun mm-automatic-display-p (type)
+ "Say whether the user wants TYPE to be displayed automatically."
+ (let ((methods mm-automatic-display)
method result)
(while (setq method (pop methods))
- (when (string-match (car method) type)
- (when (or (not (eq (cdr method) 'inline))
- (mm-inlinable-p type))
- (setq result (cdr method)
- methods nil))))
+ (when (and (string-match method type)
+ (mm-inlinable-p type))
+ (setq result t
+ methods nil)))
result))
-(defun mm-automatic-display-p (type)
- "Return the user-defined method for TYPE."
- (let ((methods mm-user-automatic-display)
+(defun mm-inlined-p (type)
+ "Say whether the user wants TYPE to be displayed automatically."
+ (let ((methods mm-inlined-types)
method result)
(while (setq method (pop methods))
(when (and (string-match method type)
(defun mm-automatic-external-display-p (type)
"Return the user-defined method for TYPE."
- (let ((methods mm-user-automatic-external-display)
+ (let ((methods mm-automatic-external-display)
method result)
(while (setq method (pop methods))
(when (string-match method type)
methods nil)))
result))
-(defun add-mime-display-method (type method)
- "Make parts of TYPE be displayed with METHOD.
-This overrides entries in the mailcap file."
- (push (cons type method) mm-user-display-methods))
-
(defun mm-destroy-part (handle)
"Destroy the data structures connected to HANDLE."
(when (listp handle)
(encoding
(or (and (listp type)
(cadr (assq 'encoding type)))
- (mm-content-transfer-encoding mime-type))))
+ (mm-content-transfer-encoding mime-type)))
+ (bits (mm-body-7-or-8)))
+ ;; We force buffers that are 7bit to be unencoded, no matter
+ ;; what the preferred encoding is.
+ (when (eq bits '7bit)
+ (setq encoding bits))
(mm-encode-content-transfer-encoding encoding mime-type)
encoding))
arg
(apply 'concat (nconc (nreverse accum) (list (substring arg pos)))))))
+(defun mm-auto-mode-alist ()
+ "Return an `auto-mode-alist' with only the .gz (etc) thingies."
+ (let ((alist auto-mode-alist)
+ out)
+ (while alist
+ (when (listp (cdar alist))
+ (push (car alist) out))
+ (pop alist))
+ (nreverse out)))
+
+(defun mm-insert-file-contents (filename &optional visit beg end replace)
+ "Like `insert-file-contents', q.v., but only reads in the file.
+A buffer may be modified in several ways after reading into the buffer due
+to advanced Emacs features, such as file-name-handlers, format decoding,
+find-file-hooks, etc.
+ This function ensures that none of these modifications will take place."
+ (let ((format-alist nil)
+ (auto-mode-alist (mm-auto-mode-alist))
+ (default-major-mode 'fundamental-mode)
+ (enable-local-variables nil)
+ (after-insert-file-functions nil)
+ (enable-local-eval nil)
+ (find-file-hooks nil))
+ (insert-file-contents filename visit beg end replace)))
+
(provide 'mm-util)
;;; mm-util.el ends here
((cdr (assq 'buffer cont))
(insert-buffer-substring (cdr (assq 'buffer cont))))
((setq filename (cdr (assq 'filename cont)))
- (insert-file-contents filename))
+ (mm-insert-file-contents filename))
(t
(save-restriction
(narrow-to-region (point) (point))
((cdr (assq 'buffer cont))
(insert-buffer-substring (cdr (assq 'buffer cont))))
((setq filename (cdr (assq 'filename cont)))
- (insert-file-contents filename))
+ (mm-insert-file-contents filename))
(t
(insert (cdr (assq 'contents cont)))))
(setq encoding (mm-encode-buffer type)
((cdr (assq 'buffer cont))
(insert-buffer-substring (cdr (assq 'buffer cont))))
((setq filename (cdr (assq 'filename cont)))
- (insert-file-contents filename))
+ (mm-insert-file-contents filename))
(t
(insert (cdr (assq 'contents cont)))))
(goto-char (point-min))
(require 'nnmail)
(require 'nnoo)
(require 'gnus-util)
+(require 'mm-util)
(eval-when-compile (require 'cl))
(nnoo-declare nndoc)
(set-buffer nndoc-current-buffer)
(erase-buffer)
(if (stringp nndoc-address)
- (nnheader-insert-file-contents nndoc-address)
+ (mm-insert-file-contents nndoc-address)
(insert-buffer-substring nndoc-address))
(run-hooks 'nndoc-open-document-hook))))
;; Initialize the nndoc structures according to this new document.
(when (file-exists-p file)
(if (eq nnheader-max-head-length t)
;; Just read the entire file.
- (nnheader-insert-file-contents file)
+ (mm-insert-file-contents file)
;; Read 1K blocks until we find a separator.
(let ((beg 0)
format-alist)
(while (and (eq nnheader-head-chop-length
- (nth 1 (nnheader-insert-file-contents
+ (nth 1 (mm-insert-file-contents
file nil beg
(incf beg nnheader-head-chop-length))))
(prog1 (not (search-forward "\n\n" nil t))
(defvar nnheader-file-coding-system 'raw-text
"Coding system used in file backends of Gnus.")
-(defun nnheader-insert-file-contents (filename &optional visit beg end replace)
+(defun mm-insert-file-contents (filename &optional visit beg end replace)
"Like `insert-file-contents', q.v., but only reads in the file.
A buffer may be modified in several ways after reading into the buffer due
to advanced Emacs features, such as file-name-handlers, format decoding,
(save-excursion
(set-buffer nntp-server-buffer)
(erase-buffer)
- (nnheader-insert-file-contents nov)
+ (mm-insert-file-contents nov)
(nnheader-nov-delete-outside-range
(car articles) (car (last articles)))
'nov))))))
(nnkiboze-request-scan group))
(if (not (file-exists-p nov-file))
(nnheader-report 'nnkiboze "Can't select group %s" group)
- (nnheader-insert-file-contents nov-file)
+ (mm-insert-file-contents nov-file)
(if (zerop (buffer-size))
(nnheader-insert "211 0 0 0 %s\n" group)
(goto-char (point-min))
nnkiboze-remove-read-articles)
(with-temp-file (nnkiboze-nov-file-name)
(let ((cur (current-buffer)))
- (nnheader-insert-file-contents (nnkiboze-nov-file-name))
+ (mm-insert-file-contents (nnkiboze-nov-file-name))
(goto-char (point-min))
(while (not (eobp))
(if (not (gnus-article-read-p (read cur)))
(set-buffer (get-buffer-create " *nnmail incoming*"))
(erase-buffer)
(let ((nnheader-file-coding-system nnmail-incoming-coding-system))
- (nnheader-insert-file-contents incoming))
+ (mm-insert-file-contents incoming))
(prog1
(if (zerop (buffer-size))
0
(setq nnmail-cache-buffer
(get-buffer-create " *nnmail message-id cache*")))
(when (file-exists-p nnmail-message-id-cache-file)
- (nnheader-insert-file-contents nnmail-message-id-cache-file))
+ (mm-insert-file-contents nnmail-message-id-cache-file))
(set-buffer-modified-p nil)
(current-buffer))))
(nnheader-report 'nnml "File %s does not exist" file))
(t
(with-temp-file file
- (nnheader-insert-file-contents file)
+ (mm-insert-file-contents file)
(nnmail-replace-status name value))
t))))
nnml-nov-file-name))
number found)
(when (file-exists-p nov)
- (nnheader-insert-file-contents nov)
+ (mm-insert-file-contents nov)
(while (and (not found)
(search-forward id nil t)) ; We find the ID.
;; And the id is in the fourth field.
(save-excursion
(set-buffer nntp-server-buffer)
(erase-buffer)
- (nnheader-insert-file-contents nov)
+ (mm-insert-file-contents nov)
(if (and fetch-old
(not (numberp fetch-old)))
t ; Don't remove anything.
nnml-nov-file-name))
(erase-buffer)
(when (file-exists-p nnml-nov-buffer-file-name)
- (nnheader-insert-file-contents nnml-nov-buffer-file-name)))
+ (mm-insert-file-contents nnml-nov-buffer-file-name)))
(push (cons group buffer) nnml-nov-buffer-alist)
buffer)))
(while files
(unless (file-directory-p (setq file (concat dir (cdar files))))
(erase-buffer)
- (nnheader-insert-file-contents file)
+ (mm-insert-file-contents file)
(narrow-to-region
(goto-char (point-min))
(progn
(set-buffer (get-buffer-create buffer-name))
(buffer-disable-undo)
(push (cons nnsoup-current-group (current-buffer)) nnsoup-buffers)
- (nnheader-insert-file-contents (concat nnsoup-directory file))
+ (mm-insert-file-contents (concat nnsoup-directory file))
(current-buffer))))))
(defun nnsoup-file (prefix &optional message)
(while files
(nnheader-message 5 "Doing %s..." (car files))
(erase-buffer)
- (nnheader-insert-file-contents (car files))
+ (mm-insert-file-contents (car files))
(goto-char (point-min))
(if (not (re-search-forward "^[^\t]*\t[^\t]*\t[^\t]*\t[^\t]*\t[^\t]*\t[^\t]*\t[^\t]*\t[^\t]*\t *\\(Xref: \\)? *[^ ]* \\([^ ]+\\):[0-9]" nil t))
(setq group "unknown")
(erase-buffer)
(if nnspool-sift-nov-with-sed
(nnspool-sift-nov-with-sed articles nov)
- (nnheader-insert-file-contents nov)
+ (mm-insert-file-contents nov)
(if (and fetch-old
(not (numberp fetch-old)))
t ; We want all the headers.
(erase-buffer)
(condition-case ()
(let ((nnheader-file-coding-system nnspool-file-coding-system))
- (nnheader-insert-file-contents file)
+ (mm-insert-file-contents file)
t)
(file-error nil)))
(require 'gnus-util)
(require 'gnus)
(require 'nnmail)
+(require 'mm-util)
(eval-when-compile
(ignore-errors
(require 'w3)
"Read the overview of GROUP and build the map."
(when (file-exists-p (nnweb-overview-file group))
(with-temp-buffer
- (nnheader-insert-file-contents (nnweb-overview-file group))
+ (mm-insert-file-contents (nnweb-overview-file group))
(goto-char (point-min))
(let (header)
(while (not (eobp))
(glyph (make-glyph
(list
(cons 'x (expand-file-name pixmap smiley-data-directory))
+ (cons 'mswindows
+ (expand-file-name pixmap smiley-data-directory))
(cons 'tty smiley)))))
(setq smiley-glyph-cache (cons (cons pixmap glyph) smiley-glyph-cache))
(set-glyph-face glyph 'default)
;;;###autoload
(defun smiley-buffer (&optional buffer st nd)
(interactive)
- (when (featurep 'x)
+ (when (featurep '(or x mswindows))
(save-excursion
(when buffer
(set-buffer buffer))
+1999-07-04 04:33:50 Lars Magne Ingebrigtsen <larsi@gnus.org>
+
+ * gnus.texi (Posting Styles): Fix.
+ (Mail in a Newsreader): New.
+
1999-06-13 02:29:22 Lars Magne Ingebrigtsen <larsi@gnus.org>
* gnus.texi (MIME Commands): Addition.
returned as a result of this analysis.
@menu
-* Dissection:: Analyzing a @sc{mime} message.
-* Handles:: Handle manipulations.
-* Display:: Displaying handles.
+* Dissection:: Analyzing a @sc{mime} message.
+* Handles:: Handle manipulations.
+* Display:: Displaying handles.
+* Customization:: Variables that affect display.
@end menu
@end table
+@node Customization
+@section Customization
+
+@table @code
+
+@item mm-inline-media-tests
+This is an alist where the key is a @sc{mime} type, the second element
+is a function to display the part @dfn{inline} (i.e., inside Emacs), and
+the third element is a form to be @code{eval}ed to say whether the part
+can be displayed inline.
+
+This variable specifies whether a part @emph{can} be displayed inline,
+and, if so, how to do it. It does not say whether parts are
+@emph{actually} displayed inline.
+
+@item mm-inlines-types
+This, on the other hand, says what types are to be displayed inline, if
+they satisfy the conditions set by the variable above. It's a list of
+@sc{mime} media types.
+
+@item mm-automatic-display
+This is a list of types that are to be displayed ``automatically'', but
+only if the above variable allows it. That is, only inlinable parts are
+usually displayed automatically, but in the end, this is up to the
+display agent that's using the @sc{mime} library.
+
+@item mm-attachment-override-types
+Some @sc{mime} agents create parts that have a content-disposition of
+@samp{attachment}. This variable allows overriding that disposition and
+displaying the part inline.
+
+@item mm-discouraged-alternatives
+List of @sc{mime} types that are discouraged when viewing
+@samp{multipart/alternative}. Viewing agents are supposed to view the
+last possible part of a message, as that is supposed to be the richest.
+However, users may prefer other types instead, and this list says what
+types are most unwanted. If, for instance, @samp{text/html} parts are
+very unwanted, and @samp{text/richtech} parts are somewhat unwanted,
+then the value of this variable should be set to:
+
+@lisp
+("text/html" "text/richtext")
+@end lisp
+
+@item mm-all-images-fit
+If non-@code{nil}, all images will be deemed to fit into the buffer,
+even when they don't.
+
+@end table
+
+
+
@node Composing
@chapter Composing
@cindex Composing
@c \input texinfo @c -*-texinfo-*-
@setfilename gnus
-@settitle Pterodactyl Gnus 0.90 Manual
+@settitle Pterodactyl Gnus 0.91 Manual
@synindex fn cp
@synindex vr cp
@synindex pg cp
@tex
@titlepage
-@title Pterodactyl Gnus 0.90 Manual
+@title Pterodactyl Gnus 0.91 Manual
@author by Lars Magne Ingebrigtsen
@page
spool or your mbox file. All at the same time, if you want to push your
luck.
-This manual corresponds to Pterodactyl Gnus 0.90.
+This manual corresponds to Pterodactyl Gnus 0.91.
@end ifinfo
If you wish to check whether the message you are about to compose is
meant to be a news article or a mail message, you can check the values
-of the two dynamically bound variables @code{message-this-is-news} and
-@code{message-this-is-mail}.
+of the @code{message-news-p} and @code{message-mail-p} functions.
-@vindex message-this-is-mail
-@vindex message-this-is-news
+@findex message-mail-p
+@findex message-news-p
So here's a new example:
(signature my-funny-signature-randomizer))
((equal (system-name) "gnarly")
(signature my-quote-randomizer))
- (message-this-is-news
+ ((message-news-p)
(signature my-news-signature))
- (posting-from-work-p
+ ((posting-from-work-p)
(signature-file "~/.work-signature")
(address "user@@bar.foo")
(body "You are fired.\n\nSincerely, your boss.")
course.
@menu
+* Mail in a Newsreader:: Important introductory notes.
* 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.
@end menu
+@node Mail in a Newsreader
+@subsection Mail in a Newsreader
+
+If you are used to traditional mail readers, but have decided to switch
+to reading mail with Gnus, you may find yourself experiencing something
+of a culture shock.
+
+Gnus does not behave like traditional mail readers. If you want to make
+it behave that way, you can, but it's an uphill battle.
+
+Gnus, by default, handles all its group using the same approach. This
+approach is very newsreaderly---you enter a group, see the new/unread
+messages, and when you read the messages, they get marked as read, and
+you don't see them any more. (Unless you explicitly ask for them.)
+
+In particular, you do not do anything explicitly to delete messages.
+
+Does this mean that all the messages that have been marked as read are
+deleted? How awful!
+
+But, no, it means that old messages are @dfn{expired} according to some
+scheme or other. For news messages, the expire process is controlled by
+the news administrator; for mail, the expire process is controlled by
+you. The expire process for mail is covered in depth in @pxref{Expiring
+Mail}.
+
+What many Gnus users find, after using it a while for both news and
+mail, is that the transport becomes more and more irrelevant. What
+becomes important is the size of the receiving audience.
+
+Many people subscribe to several mailing lists. These are transported
+via SMTP, and are therefore mail. Some people have local news groups
+which have only a handful of readers. These are transported via NNTP,
+and are therefore news.
+
+The important distinction turns out to be not the transport mechanism,
+but whether the messages are @dfn{personal} or @dfn{public}. Many users
+then subtly alter the behavior of Gnus according to these two
+categories.
+
+Some users never get comfortable using the Gnus (ahem) paradigm and wish
+that Gnus should grow up and be a male, er, mail reader. It is possible
+to whip Gnus into a more mailreaderly being, but, as said before, it's
+not easy. People who prefer proper mail readers should try @sc{vm}
+instead, which is an excellent, and proper, mail reader.
+
+I don't mean to scare anybody off, but I want to make it clear that you
+may be required to learn a new way of thinking about messages. After
+you've been subjected to The Gnus Way, you will come to love it. I can
+guarantee it. (At least the guy who sold me the Emacs Subliminal
+Brain-Washing Functions that I've put into Gnus did guarantee it. You
+Will Be Assimilated. You Love Gnus. You Love The Gnus Mail Way.
+You Do.)
+
+
@node Getting Started Reading Mail
@subsection Getting Started Reading Mail
> bar 1
@end example
+@item
+Allow "orphan" scores in the Agent scoring.
+
@item
Solve the halting problem.
\input texinfo @c -*-texinfo-*-
@setfilename message
-@settitle Pterodactyl Message 0.90 Manual
+@settitle Pterodactyl Message 0.91 Manual
@synindex fn cp
@synindex vr cp
@synindex pg cp
@tex
@titlepage
-@title Pterodactyl Message 0.90 Manual
+@title Pterodactyl Message 0.91 Manual
@author by Lars Magne Ingebrigtsen
@page
* Key Index:: List of Message mode keys.
@end menu
-This manual corresponds to Pterodactyl Message 0.90. Message is
+This manual corresponds to Pterodactyl Message 0.91. Message is
distributed with the Gnus distribution bearing the same version number
as this manual.