+Sun Sep 13 09:37:37 1998 Lars Magne Ingebrigtsen <larsi@menja.ifi.uio.no>
+
+ * gnus.el: Pterodactyl Gnus v0.30 is released.
+
+1998-09-13 08:00:41 Lars Magne Ingebrigtsen <larsi@gnus.org>
+
+ * gnus-art.el (article-decode-encoded-words): Use it.
+ (gnus-decode-header-function): New variable.
+
+ * gnus-sum.el (gnus-nov-parse-line): Use it.
+ (gnus-decode-encoded-word-function): New variable.
+
+ * gnus-msg.el (gnus-copy-article-buffer): Decode the right
+ buffer.
+
+ * gnus-art.el (gnus-insert-mime-button): Use widget.
+ (gnus-widget-press-button): New function.
+ (gnus-article-prev-button): Removed.
+ (gnus-article-next-button): Ditto.
+ (gnus-article-add-button): Ditto.
+
+ * gnus.el (gnus-article-mode-map): Inherit from widget.
+ (gnus-article-mode-map): No, don't.
+
+ * mm-decode.el (mm-dissect-buffer): Store Content-ID things.
+ (mm-content-id-alist): New variable.
+ (mm-get-content-id): New function.
+
+ * gnus-art.el (gnus-request-article-this-buffer): Only decode
+ articles if we are fetching to the article buffer.
+
+1998-09-13 07:58:59 Shenghuo ZHU <zsh@cs.rochester.edu>
+
+ * gnus-sum.el (gnus-summary-move-article): Don't decode accepting
+ articles.
+
+1998-09-13 07:23:28 Lars Magne Ingebrigtsen <larsi@gnus.org>
+
+ * mm-util.el (mm-mime-charset): Try to use safe-charsets.
+ (mm-default-mime-charset): New variable.
+
+ * rfc2047.el (rfc2047-dissect-region): Dissect using tspecials.
+
+ * drums.el (drums-quote-string): Reversed test.
+
+1998-09-12 14:29:21 Lars Magne Ingebrigtsen <larsi@gnus.org>
+
+ * mm-util.el (mm-insert-rfc822-headers): Possibly not quote
+ string.
+
+ * drums.el (drums-quote-string): New function.
+
+ * rfc2047.el (rfc2047-encode-message-header): Goto point-min.
+ (rfc2047-b-encode-region): Chop lines.
+ (rfc2047-q-encode-region): Ditto.
+
Sat Sep 12 13:27:15 1998 Lars Magne Ingebrigtsen <larsi@menja.ifi.uio.no>
* gnus.el: Pterodactyl Gnus v0.29 is released.
(point-max)))
(goto-char (point-min)))
+(defun drums-quote-string (string)
+ "Quote string if it needs quoting to be displayed in a header."
+ (if (not (string-match (concat "[^" drums-atext-token "]") string))
+ (concat "\"" string "\"")
+ string))
+
(provide 'drums)
;;; drums.el ends here
(require 'gnus-cache)
(require 'nnvirtual)
(require 'gnus-sum)
-(eval-when-compile (require 'cl)
- (require 'gnus-score))
+(eval-when-compile
+ (require 'cl)
+ (require 'gnus-score))
(defcustom gnus-agent-directory (nnheader-concat gnus-directory "agent/")
"Where the Gnus agent will store its files."
(require 'mail-parse)
(require 'mm-decode)
(require 'mm-view)
+(require 'wid-edit)
(defgroup gnus-article nil
"Article display."
:group 'gnus-article-headers
:type 'function)
+(defvar gnus-decode-header-function 'mail-decode-encoded-word-region
+ "Function used to decode headers.")
+
;;; Internal variables
(defvar article-lapsed-timer nil)
(buffer-read-only nil))
(save-restriction
(message-narrow-to-head)
- (mail-decode-encoded-word-region (point-min) (point-max)))))
+ (funcall gnus-decode-header-function (point-min) (point-max)))))
(defun article-de-quoted-unreadable (&optional force)
"Translate a quoted-printable-encoded article.
(put 'gnus-article-mode 'mode-class 'special)
+(set-keymap-parent gnus-article-mode-map widget-keymap)
+
(gnus-define-keys gnus-article-mode-map
" " gnus-article-goto-next-page
"\177" gnus-article-goto-prev-page
[delete] gnus-article-goto-prev-page
+ "\r" widget-button-press
"\C-c^" gnus-article-refer-article
"h" gnus-article-show-summary
"s" gnus-article-show-summary
"\C-c\C-m" gnus-article-mail
"?" gnus-article-describe-briefly
- gnus-mouse-2 gnus-article-push-button
- "\r" gnus-article-press-button
- "\t" gnus-article-next-button
- "\M-\t" gnus-article-prev-button
"e" gnus-article-edit
"<" beginning-of-buffer
">" end-of-buffer
(defun gnus-insert-mime-button (handle)
(let ((gnus-tmp-name (mail-content-type-get (mm-handle-type handle) 'name))
(gnus-tmp-type (car (mm-handle-type handle)))
- (gnus-tmp-description (mm-handle-description handle)))
+ (gnus-tmp-description (mm-handle-description handle))
+ b e)
(setq gnus-tmp-name
(if gnus-tmp-name
(concat " (" gnus-tmp-name ")")
(if gnus-tmp-description
(concat " (" gnus-tmp-description ")")
""))
+ (setq b (point))
(gnus-eval-format
gnus-mime-button-line-format gnus-mime-button-line-format-alist
`(local-map ,gnus-mime-button-map
keymap ,gnus-mime-button-map
gnus-callback mm-display-part
- gnus-data ,handle))))
+ gnus-data ,handle))
+ (setq e (point))
+ (widget-convert-text 'link b e b e :action 'gnus-widget-press-button)))
+
+(defun gnus-widget-press-button (elems el)
+ (goto-char (widget-get elems :from))
+ (gnus-article-press-button))
(defun gnus-display-mime ()
"Insert MIME buttons in the buffer."
(let (buffer-read-only)
(erase-buffer)
(insert-buffer-substring gnus-article-buffer))
- (setq gnus-original-article (cons group article))))
+ (setq gnus-original-article (cons group article)))
- ;; Decode charsets.
- (run-hooks 'gnus-article-decode-hook)
+ ;; Decode charsets.
+ (run-hooks 'gnus-article-decode-hook))
;; Update sparse articles.
(when (and do-update-line
(when fun
(funcall fun data))))
-(defun gnus-article-prev-button (n)
- "Move point to N buttons backward.
-If N is negative, move forward instead."
- (interactive "p")
- (gnus-article-next-button (- n)))
-
-(defun gnus-article-next-button (n)
- "Move point to N buttons forward.
-If N is negative, move backward instead."
- (interactive "p")
- (let ((function (if (< n 0) 'previous-single-property-change
- 'next-single-property-change))
- (inhibit-point-motion-hooks t)
- (backward (< n 0))
- (limit (if (< n 0) (point-min) (point-max))))
- (setq n (abs n))
- (while (and (not (= limit (point)))
- (> n 0))
- ;; Skip past the current button.
- (when (get-text-property (point) 'gnus-callback)
- (goto-char (funcall function (point) 'gnus-callback nil limit)))
- ;; Go to the next (or previous) button.
- (gnus-goto-char (funcall function (point) 'gnus-callback nil limit))
- ;; Put point at the start of the button.
- (when (and backward (not (get-text-property (point) 'gnus-callback)))
- (goto-char (funcall function (point) 'gnus-callback nil limit)))
- ;; Skip past intangible buttons.
- (when (get-text-property (point) 'intangible)
- (incf n))
- (decf n))
- (unless (zerop n)
- (gnus-message 5 "No more buttons"))
- n))
-
(defun gnus-article-highlight (&optional force)
"Highlight current article.
This function calls `gnus-article-highlight-headers',
(nconc (and gnus-article-mouse-face
(list gnus-mouse-face-prop gnus-article-mouse-face))
(list 'gnus-callback fun)
- (and data (list 'gnus-data data)))))
+ (and data (list 'gnus-data data))))
+ (widget-convert-text 'link from to from to
+ :action 'gnus-widget-press-button))
;;; Internal functions:
(cons group
(set-buffer (gnus-get-buffer-create
" *gnus-cache-overview*"))))
- (buffer-disable-undo (current-buffer))
;; Insert the contents of this group's cache overview.
(erase-buffer)
(let ((file (gnus-cache-file-name group ".overview")))
(gnus-cache-save-buffers)
(save-excursion
(set-buffer cache-buf)
- (buffer-disable-undo (current-buffer))
(erase-buffer)
(insert-file-contents (or file (gnus-cache-file-name group ".overview")))
(goto-char (point-min))
(let ((cache-buf (gnus-get-buffer-create " *gnus-cache*")))
(save-excursion
(set-buffer cache-buf)
- (buffer-disable-undo (current-buffer))
(erase-buffer))
(set-buffer nntp-server-buffer)
(goto-char (point-min))
;; if ARTICLE-BUFFER is nil, gnus-article-buffer is used
;; this buffer should be passed to all mail/news reply/post routines.
(setq gnus-article-copy (gnus-get-buffer-create " *gnus article copy*"))
- (buffer-disable-undo gnus-article-copy)
(save-excursion
(set-buffer gnus-article-copy)
(mm-enable-multibyte))
(or (search-forward "\n\n" nil t) (point)))
;; Insert the original article headers.
(insert-buffer-substring gnus-original-article-buffer beg end)
- (gnus-article-decode-encoded-words)))
+ (article-decode-encoded-words)))
gnus-article-copy)))
(defun gnus-post-news (post &optional group header article-buffer yank subject
;; Go through all the files looking for non-default values for variables.
(save-excursion
(set-buffer (gnus-get-buffer-create " *gnus bug info*"))
- (buffer-disable-undo (current-buffer))
(while files
(erase-buffer)
(when (and (setq file (locate-library (pop files)))
(gnus-message 7 "Reading slave newsrcs...")
(save-excursion
(set-buffer (gnus-get-buffer-create " *gnus slave*"))
- (buffer-disable-undo (current-buffer))
(setq slave-files
(sort (mapcar (lambda (file)
(list (nth 5 (file-attributes file)) file))
The function is called with one parameter, the article header vector,
which it may alter in any way.")
+(defvar gnus-decode-encoded-word-function 'mail-decode-encoded-word-string
+ "Variable that says which function should be used to decode a string with encoded words.")
+
;;; Internal variables
(defvar gnus-article-mime-handles nil)
(setq header
(make-full-mail-header
number ; number
- (mail-decode-encoded-word-string (gnus-nov-field)) ; subject
- (mail-decode-encoded-word-string (gnus-nov-field)) ; from
+ (funcall gnus-decode-encoded-word-function
+ (gnus-nov-field)) ; subject
+ (funcall gnus-decode-encoded-word-function
+ (gnus-nov-field)) ; from
(gnus-nov-field) ; date
(or (gnus-nov-field)
(nnheader-generate-fake-message-id)) ; id
(progn
(goto-char p)
(if (search-forward "\nsubject: " nil t)
- (mail-decode-encoded-word-string (nnheader-header-value))
+ (funcall gnus-decode-encoded-word-function
+ (nnheader-header-value))
"(none)"))
;; From.
(progn
(goto-char p)
(if (search-forward "\nfrom: " nil t)
- (mail-decode-encoded-word-string (nnheader-header-value))
+ (funcall gnus-decode-encoded-word-function
+ (nnheader-header-value))
"(nobody)"))
;; Date.
(progn
(set-buffer copy-buf)
(when (gnus-request-article-this-buffer article gnus-newsgroup-name)
(gnus-request-accept-article
- to-newsgroup select-method (not articles)))))
+ to-newsgroup select-method (not articles) t))))
;; Crosspost the article.
((eq action 'crosspost)
(let ((xref (message-tokenize-header
(error "Can't read %s" file))
(save-excursion
(set-buffer (gnus-get-buffer-create " *import file*"))
- (buffer-disable-undo (current-buffer))
(erase-buffer)
(insert-file-contents file)
(goto-char (point-min))
:link '(custom-manual "(gnus)Exiting Gnus")
:group 'gnus)
-(defconst gnus-version-number "0.29"
+(defconst gnus-version-number "0.30"
"Version number for this version of Gnus.")
(defconst gnus-version (format "Pterodactyl Gnus v%s" gnus-version-number)
(and (file-readable-p gnus-nntpserver-file)
(save-excursion
(set-buffer (gnus-get-buffer-create " *gnus nntp*"))
- (buffer-disable-undo (current-buffer))
(insert-file-contents gnus-nntpserver-file)
(let ((name (buffer-string)))
(prog1
(defalias 'mail-header-parse-addresses 'drums-parse-addresses)
(defalias 'mail-header-parse-date 'drums-parse-date)
(defalias 'mail-narrow-to-head 'drums-narrow-to-header)
+(defalias 'mail-quote-string 'drums-quote-string)
(defalias 'mail-header-narrow-to-field 'rfc2047-narrow-to-field)
(defalias 'mail-encode-encoded-word-region 'rfc2047-encode-region)
(defun mailcap-parse-mailcaps (&optional path force)
"Parse out all the mailcaps specified in a unix-style path string PATH.
If FORCE, re-parse even if already parsed."
+ (interactive)
(when (or (not mailcap-parsed-p)
force)
(cond
(require 'mailabbrev))
(require 'mail-parse)
(require 'mm-bodies)
+(require 'mm-encode)
(defgroup message '((user-mail-address custom-variable)
(user-full-name custom-variable))
list file)
(save-excursion
(set-buffer (get-buffer-create " *message temp*"))
- (buffer-disable-undo (current-buffer))
(erase-buffer)
(insert-buffer-substring buf)
(save-restriction
(error "This article is not yours"))
;; Make control message.
(setq buf (set-buffer (get-buffer-create " *message cancel*")))
- (buffer-disable-undo (current-buffer))
(erase-buffer)
(insert "Newsgroups: " newsgroups "\n"
"From: " (message-make-from) "\n"
beg)
;; We first set up a normal mail buffer.
(set-buffer (get-buffer-create " *message resend*"))
- (buffer-disable-undo (current-buffer))
(erase-buffer)
(message-setup `((To . ,address)))
;; Insert our usual headers.
(defvar mm-dissection-list nil)
(defvar mm-last-shell-command "")
+(defvar mm-content-id-alist nil)
;;; Convenience macros.
(defun mm-dissect-buffer (&optional no-strict-mime)
"Dissect the current buffer and return a list of MIME handles."
(save-excursion
- (let (ct ctl type subtype cte cd description)
+ (let (ct ctl type subtype cte cd description id result)
(save-restriction
(mail-narrow-to-head)
(when (and (or no-strict-mime
(setq ctl (mail-header-parse-content-type ct)
cte (mail-fetch-field "content-transfer-encoding")
cd (mail-fetch-field "content-disposition")
- description (mail-fetch-field "content-description"))))
+ description (mail-fetch-field "content-description")
+ id (mail-fetch-field "content-id"))))
(when ctl
(setq type (split-string (car ctl) "/"))
(setq subtype (cadr type)
type (pop type))
- (cond
- ((equal type "multipart")
- (mm-dissect-multipart ctl))
- (t
- (mm-dissect-singlepart
- ctl
- (and cte (intern (downcase (mail-header-remove-whitespace
- (mail-header-remove-comments
- cte)))))
- no-strict-mime
- (and cd (mail-header-parse-content-disposition cd)))))))))
+ (setq
+ result
+ (cond
+ ((equal type "multipart")
+ (mm-dissect-multipart ctl))
+ (t
+ (mm-dissect-singlepart
+ ctl
+ (and cte (intern (downcase (mail-header-remove-whitespace
+ (mail-header-remove-comments
+ cte)))))
+ no-strict-mime
+ (and cd (mail-header-parse-content-disposition cd))))))
+ (when id
+ (push (cons id result) mm-content-id-alist))
+ result))))
(defun mm-dissect-singlepart (ctl cte &optional force cdl description)
(when (or force
(pop h)))
result))
+(defun mm-get-content-id (id)
+ "Return the handle(s) referred to by ID."
+ (cdr (assoc id mm-content-id-alist)))
+
(provide 'mm-decode)
;; mm-decode.el ends here
;;; Code:
+(require 'mail-parse)
+
+(defun mm-insert-rfc822-headers (charset encoding)
+ "Insert text/plain headers with CHARSET and ENCODING."
+ (insert "MIME-Version: 1.0\n")
+ (insert "Content-Type: text/plain; charset="
+ (mail-quote-string (downcase (symbol-name charset))) "\n")
+ (insert "Content-Transfer-Encoding: "
+ (downcase (symbol-name encoding)) "\n"))
+
(provide 'mm-encode)
;;; mm-encode.el ends here
;;; Code:
+(defvar mm-default-coding-system nil
+ "The default coding system to use.")
+
(defvar mm-known-charsets '(iso-8859-1)
"List of known charsets.")
(when (fboundp 'set-buffer-multibyte)
(set-buffer-multibyte t)))
-(defun mm-insert-rfc822-headers (charset encoding)
- "Insert text/plain headers with CHARSET and ENCODING."
- (insert "MIME-Version: 1.0\n")
- (insert "Content-Type: text/plain; charset=\""
- (downcase (symbol-name charset)) "\"\n")
- (insert "Content-Transfer-Encoding: "
- (downcase (symbol-name encoding)) "\n"))
-
(defun mm-mime-charset (charset b e)
(if (fboundp 'coding-system-get)
(or
+ (and
+ mm-default-coding-system
+ (let ((safe (coding-system-get mm-default-coding-system
+ 'safe-charsets)))
+ (or (eq safe t) (memq charset safe)))
+ (coding-system-get mm-default-coding-system 'mime-charset))
(coding-system-get
(get-charset-property charset 'prefered-coding-system)
'mime-charset)
,(set-marker (make-marker) (point-min))
,(set-marker (make-marker) (point-max)))))))))
((equal type "html")
- (save-window-excursion
- (save-excursion
- (w3-do-setup)
- (mm-with-unibyte-buffer
- (insert-buffer-substring (mm-handle-buffer handle))
- (mm-decode-content-transfer-encoding (mm-handle-encoding handle))
- (require 'url)
- (save-window-excursion
- (w3-region (point-min) (point-max))
- (setq text (buffer-string))))
- (let ((b (point)))
- (insert text)
- (mm-handle-set-undisplayer
- handle
- `(lambda ()
- (let (buffer-read-only)
- (delete-region ,(set-marker (make-marker) b)
- ,(set-marker (make-marker) (point))))))))))
+ (save-excursion
+ (w3-do-setup)
+ (mm-with-unibyte-buffer
+ (insert-buffer-substring (mm-handle-buffer handle))
+ (mm-decode-content-transfer-encoding (mm-handle-encoding handle))
+ (require 'url)
+ (save-window-excursion
+ (w3-region (point-min) (point-max))
+ (setq text (buffer-string))))
+ (let ((b (point)))
+ (insert text)
+ (mm-handle-set-undisplayer
+ handle
+ `(lambda ()
+ (let (buffer-read-only)
+ (delete-region ,(set-marker (make-marker) b)
+ ,(set-marker (make-marker) (point)))))))))
)))
(defun mm-inline-audio (handle)
(setq nndoc-dissection-alist nil)
(save-excursion
(set-buffer nndoc-current-buffer)
- (buffer-disable-undo (current-buffer))
(erase-buffer)
(if (stringp nndoc-address)
(nnheader-insert-file-contents nndoc-address)
(let* ((buf (get-buffer-create " *draft headers*"))
article)
(set-buffer buf)
- (buffer-disable-undo (current-buffer))
(erase-buffer)
;; We don't support fetching by Message-ID.
(if (stringp (car articles))
(nnfolder-request-article article group server)
(save-excursion
(set-buffer buf)
- (buffer-disable-undo (current-buffer))
(erase-buffer)
(insert-buffer-substring nntp-server-buffer)
(goto-char (point-min))
`(let ((new (generate-new-buffer " *nnheader replace*"))
(cur (current-buffer))
(start (point-min)))
- (set-buffer new)
- (buffer-disable-undo (current-buffer))
(set-buffer cur)
(goto-char (point-min))
(while (,(if regexp 're-search-forward 'search-forward)
(save-excursion
;; Insert the incoming file.
(set-buffer (get-buffer-create " *nnmail incoming*"))
- (buffer-disable-undo (current-buffer))
(erase-buffer)
(nnheader-insert-file-contents incoming)
(unless (zerop (buffer-size))
(set-buffer
(setq nnmail-cache-buffer
(get-buffer-create " *nnmail message-id cache*")))
- (buffer-disable-undo (current-buffer))
(when (file-exists-p nnmail-message-id-cache-file)
(nnheader-insert-file-contents nnmail-message-id-cache-file))
(set-buffer-modified-p nil)
(nnmbox-request-article article group server)
(save-excursion
(set-buffer buf)
- (buffer-disable-undo (current-buffer))
(erase-buffer)
(insert-buffer-substring nntp-server-buffer)
(goto-char (point-min))
(defun nnml-find-group-number (id)
(save-excursion
(set-buffer (get-buffer-create " *nnml id*"))
- (buffer-disable-undo (current-buffer))
(let ((alist nnml-group-alist)
number)
;; We want to look through all .overview files, but we want to
(string-to-int (match-string 1 f2)))))))
active group lines ident elem min)
(set-buffer (get-buffer-create " *nnsoup work*"))
- (buffer-disable-undo (current-buffer))
(while files
(nnheader-message 5 "Doing %s..." (car files))
(erase-buffer)
(defun nnspool-find-id (id)
(save-excursion
(set-buffer (get-buffer-create " *nnspool work*"))
- (buffer-disable-undo (current-buffer))
(erase-buffer)
(ignore-errors
(call-process "grep" nil t nil (regexp-quote id) nnspool-history-file))
(require 'base64))))
(require 'qp)
(require 'mm-util)
+(require 'drums)
(defvar rfc2047-default-charset 'iso-8859-1
"Default MIME charset -- does not need encoding.")
(interactive "*")
(when (featurep 'mule)
(save-excursion
+ (goto-char (point-min))
(let ((alist rfc2047-header-encoding-alist)
elem method)
(while (not (eobp))
(save-restriction
(narrow-to-region b e)
(goto-char (point-min))
- (while (re-search-forward "[^ \t\n]+" nil t)
+ (while (re-search-forward (concat "[^" drums-tspecials " \t\n]+") nil t)
(push
(list (match-beginning 0) (match-end 0)
(car
'B))
(start (concat
"=?" (downcase (symbol-name mime-charset)) "?"
- (downcase (symbol-name encoding)) "?")))
+ (downcase (symbol-name encoding)) "?"))
+ (first t))
(save-restriction
(narrow-to-region b e)
(mm-encode-coding-region b e mime-charset)
(funcall (cdr (assq encoding rfc2047-encoding-function-alist))
(point-min) (point-max))
(goto-char (point-min))
- (insert start)
- (goto-char (point-max))
- (insert "?=")
- ;; Encoded words can't be more than 75 chars long, so we have to
- ;; split the long ones up.
- (end-of-line)
- (while (> (current-column) 74)
- (beginning-of-line)
- (forward-char 73)
- (insert "?=\n " start)
- (end-of-line)))))
+ (while (not (eobp))
+ (unless first
+ (insert " "))
+ (setq first nil)
+ (insert start)
+ (end-of-line)
+ (insert "?=")
+ (forward-line 1)))))
(defun rfc2047-b-encode-region (b e)
"Encode the header contained in REGION with the B encoding."
- (base64-encode-region b e t))
+ (base64-encode-region b e t)
+ (goto-char (point-min))
+ (while (not (eobp))
+ (goto-char (min (point-max) (+ 64 (point))))
+ (unless (eobp)
+ (insert "\n"))))
(defun rfc2047-q-encode-region (b e)
"Encode the header contained in REGION with the Q encoding."
(while alist
(when (looking-at (caar alist))
(quoted-printable-encode-region b e nil (cdar alist))
- (subst-char-in-region (point-min) (point-max) ? ?_))
- (pop alist))))))
+ (subst-char-in-region (point-min) (point-max) ? ?_)
+ (setq alist nil))
+ (pop alist))
+ (goto-char (point-min))
+ (while (not (eobp))
+ (forward-char 64)
+ (search-backward "=" nil (- (point) 2))
+ (unless (eobp)
+ (insert "\n")))))))
;;;
;;; Functions for decoding RFC2047 messages
;;;
(defvar rfc2047-encoded-word-regexp
- "=\\?\\([^][\000-\040()<>@,\;:\\\"/?.=]+\\)\\?\\(B\\|Q\\)\\?\\([!->@-~ ]+\\)\\?=")
+ "=\\?\\([^][\000-\040()<>@,\;:\\\"/?.=]+\\)\\?\\(B\\|Q\\)\\?\\([!->@-~ +]+\\)\\?=")
(defun rfc2047-decode-region (start end)
"Decode MIME-encoded words in region between START and END."
+1998-09-13 08:58:56 Lars Magne Ingebrigtsen <larsi@gnus.org>
+
+ * dir (File): Updated.
+
1998-09-12 08:53:05 Lars Magne Ingebrigtsen <larsi@gnus.org>
* emacs-mime.texi: New file.
makeinfo -o $* $<; \
fi
-dvi: gnus.dvi message.dvi refcard.dvi
+dvi: gnus.dvi message.dvi refcard.dvi emacs-mime.dvi
.texi.dvi :
$(PERL) -n -e 'print unless (/\@iflatex/ .. /\@end iflatex/)' $< > gnustmp.texi
install:
$(SHELL) $(top_srcdir)/mkinstalldirs $(infodir)
- @for file in gnus message; do \
+ @for file in gnus message emacs-info; do \
for ifile in `echo $$file $$file-[0-9] $$file-[0-9][0-9]`; do \
if test -f $$ifile; then \
echo " $(INSTALL_DATA) $$ifile $(infodir)/$$ifile"; \
* Menu:
-* Gnus: (gnus). The news reader Gnus.
-* Message: (message). The Message sending thingamabob.
+* Gnus: (gnus). The news reader Gnus.
+* Message: (message). The Message sending thingamabob.
+* Emacs MIME: (emacs-mime). Libraries for handling MIME.
@synindex vr cp
@synindex pg cp
@c @direntry
-@c * Emacs Mime: (emacs-mime). The MIME de/composition library.
+@c * Emacs MIME: (emacs-mime). The MIME de/composition library.
@c @end direntry
@iftex
@finalout
@end tex
@node Top
-@top Emacs Mime
+@top Emacs MIME
This manual documents the libraries used to compose and display
@sc{mime} messages.
This chapter describes the basic, ground-level functions for parsing and
handling. Covered here is parsing @code{From} lines, removing comments
from header lines, decoding encoded words, parsing date headers and so
-on. High-level functionality is dealt with in the @pxref{Decoding and
-Viewing} chapter.
+on. High-level functionality is dealt with in the next chapter
+(@pxref{Decoding and Viewing}).
@menu
* mail-parse:: The generalized @sc{mime} and mail interface.
* time-date:: Functions for parsing dates and manipulating time.
* qp:: Quoted-Printable en/decoding.
* base64:: Base64 en/decoding.
+* mailcap:: How parts are displayed is specified by the @file{.mailcap} file
@end menu
@example
(mail-header-parse-content-type
"image/gif; name=\"b980912.gif\"")
-
=> ("image/gif" (name . "b980912.gif"))
@end example
@example
(mail-content-type-get
'("image/gif" (name . "b980912.gif")) 'name)
-
=> "b980912.gif"
@end example
@example
(mail-header-remove-comments
"Gnus/5.070027 (Pterodactyl Gnus v0.27) (Finnish Landrace)")
-
=> "Gnus/5.070027 "
@end example
@example
(mail-header-parse-addresses
"Hrvoje Niksic <hniksic@@srce.hr>, Steinar Bang <sb@@metis.no>")
- => (("hniksic@@srce.hr" . "Hrvoje Niksic")
+=> (("hniksic@@srce.hr" . "Hrvoje Niksic")
("sb@@metis.no" . "Steinar Bang"))
@end example
@end table
+@node mailcap
+@section mailcap
+
+The @file{~/.mailcap} file is parsed by most @sc{mime}-aware message
+handlers and describes how elements are supposed to be displayed.
+Here's an example file:
+
+@example
+image/*; xv -8 %s
+audio/x-pn-realaudio; rvplayer %s
+@end example
+
+This says that all image files should be displayed with @samp{xv}, and
+that realaudio files should be played by @samp{rvplayer}.
+
+The @code{mailcap} library parses this file, and provides functions for
+matching types.
+
+@table @code
+@item mailcap-mime-data
+@vindex mailcap-mime-data
+This variable is an alist of alists containing backup viewing rules.
+
+@end table
+
+Interface functions:
+
+@table @code
+@item mailcap-parse-mailcaps
+@findex mailcap-parse-mailcaps
+Parse the @code{~/.mailcap} file.
+
+@item mailcap-mime-info
+Takes a @sc{mime} type as its argument and returns the matching viewer.
+
+@end table
+
+
+
@node Decoding and Viewing
@chapter Decoding and Viewing
The main idea is to first analyze a @sc{mime} article, and then allow
other programs to do things based on the list of @dfn{handles} that are
-returned as a result of this analyze.
+returned as a result of this analyzation.
@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.
@end menu
@findex mm-handle-disposition
Return the description of the part.
+@item mm-get-content-id
+Returns the handle(s) referred to by @code{Content-ID}.
+
@end table
@end table
+
@node Index
@chapter Index
@printindex cp
\input texinfo @c -*-texinfo-*-
@setfilename gnus
-@settitle Pterodactyl Gnus 0.29 Manual
+@settitle Pterodactyl Gnus 0.30 Manual
@synindex fn cp
@synindex vr cp
@synindex pg cp
@tex
@titlepage
-@title Pterodactyl Gnus 0.29 Manual
+@title Pterodactyl Gnus 0.30 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.29.
+This manual corresponds to Pterodactyl Gnus 0.30.
@end ifinfo
\input texinfo @c -*-texinfo-*-
@setfilename message
-@settitle Pterodactyl Message 0.29 Manual
+@settitle Pterodactyl Message 0.30 Manual
@synindex fn cp
@synindex vr cp
@synindex pg cp
@tex
@titlepage
-@title Pterodactyl Message 0.29 Manual
+@title Pterodactyl Message 0.30 Manual
@author by Lars Magne Ingebrigtsen
@page
* Key Index:: List of Message mode keys.
@end menu
-This manual corresponds to Pterodactyl Message 0.29. Message is
+This manual corresponds to Pterodactyl Message 0.30. Message is
distributed with the Gnus distribution bearing the same version number
as this manual.