*** pub/pgnus/lisp/drums.el Sat Sep 12 13:27:48 1998 --- pgnus/lisp/drums.el Sun Sep 13 09:36:25 1998 *************** *** 231,236 **** --- 231,242 ---- (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 *** pub/pgnus/lisp/gnus-agent.el Sat Sep 12 13:27:49 1998 --- pgnus/lisp/gnus-agent.el Sun Sep 13 09:36:25 1998 *************** *** 27,34 **** (require 'gnus-cache) (require 'nnvirtual) (require 'gnus-sum) ! (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." --- 27,35 ---- (require 'gnus-cache) (require 'nnvirtual) (require 'gnus-sum) ! (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." *** pub/pgnus/lisp/gnus-art.el Sat Sep 12 09:15:35 1998 --- pgnus/lisp/gnus-art.el Sun Sep 13 09:36:26 1998 *************** *** 37,42 **** --- 37,43 ---- (require 'mail-parse) (require 'mm-decode) (require 'mm-view) + (require 'wid-edit) (defgroup gnus-article nil "Article display." *************** *** 542,547 **** --- 543,551 ---- :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) *************** *** 990,996 **** (buffer-read-only nil)) (save-restriction (message-narrow-to-head) ! (mail-decode-encoded-word-region (point-min) (point-max))))) (defun article-de-quoted-unreadable (&optional force) "Translate a quoted-printable-encoded article. --- 994,1000 ---- (buffer-read-only nil)) (save-restriction (message-narrow-to-head) ! (funcall gnus-decode-header-function (point-min) (point-max))))) (defun article-de-quoted-unreadable (&optional force) "Translate a quoted-printable-encoded article. *************** *** 1866,1884 **** (put 'gnus-article-mode 'mode-class 'special) (gnus-define-keys gnus-article-mode-map " " gnus-article-goto-next-page "\177" gnus-article-goto-prev-page [delete] gnus-article-goto-prev-page "\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 --- 1870,1887 ---- (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 "e" gnus-article-edit "<" beginning-of-buffer ">" end-of-buffer *************** *** 2179,2185 **** (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))) (setq gnus-tmp-name (if gnus-tmp-name (concat " (" gnus-tmp-name ")") --- 2182,2189 ---- (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)) ! b e) (setq gnus-tmp-name (if gnus-tmp-name (concat " (" gnus-tmp-name ")") *************** *** 2188,2199 **** (if gnus-tmp-description (concat " (" gnus-tmp-description ")") "")) (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)))) (defun gnus-display-mime () "Insert MIME buttons in the buffer." --- 2192,2210 ---- (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)) ! (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." *************** *** 2666,2675 **** (let (buffer-read-only) (erase-buffer) (insert-buffer-substring gnus-article-buffer)) ! (setq gnus-original-article (cons group article)))) ! ;; Decode charsets. ! (run-hooks 'gnus-article-decode-hook) ;; Update sparse articles. (when (and do-update-line --- 2677,2686 ---- (let (buffer-read-only) (erase-buffer) (insert-buffer-substring gnus-article-buffer)) ! (setq gnus-original-article (cons group article))) ! ;; Decode charsets. ! (run-hooks 'gnus-article-decode-hook)) ;; Update sparse articles. (when (and do-update-line *************** *** 2943,2982 **** (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', --- 2954,2959 ---- *************** *** 3159,3165 **** (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))))) ;;; Internal functions: --- 3136,3144 ---- (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)))) ! (widget-convert-text 'link from to from to ! :action 'gnus-widget-press-button)) ;;; Internal functions: *** pub/pgnus/lisp/gnus-cache.el Fri Sep 11 12:31:15 1998 --- pgnus/lisp/gnus-cache.el Sun Sep 13 09:36:26 1998 *************** *** 396,402 **** (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"))) --- 396,401 ---- *************** *** 488,494 **** (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)) --- 487,492 ---- *************** *** 518,524 **** (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)) --- 516,521 ---- *** pub/pgnus/lisp/gnus-msg.el Sat Sep 12 09:15:35 1998 --- pgnus/lisp/gnus-msg.el Sun Sep 13 09:36:26 1998 *************** *** 362,368 **** ;; 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)) --- 362,367 ---- *************** *** 399,405 **** (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))) gnus-article-copy))) (defun gnus-post-news (post &optional group header article-buffer yank subject --- 398,404 ---- (or (search-forward "\n\n" nil t) (point))) ;; Insert the original article headers. (insert-buffer-substring gnus-original-article-buffer beg end) ! (article-decode-encoded-words))) gnus-article-copy))) (defun gnus-post-news (post &optional group header article-buffer yank subject *************** *** 832,838 **** ;; 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))) --- 831,836 ---- *** pub/pgnus/lisp/gnus-start.el Tue Sep 8 21:41:35 1998 --- pgnus/lisp/gnus-start.el Sun Sep 13 09:36:26 1998 *************** *** 2424,2430 **** (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)) --- 2424,2429 ---- *** pub/pgnus/lisp/gnus-sum.el Sat Sep 12 09:15:36 1998 --- pgnus/lisp/gnus-sum.el Sun Sep 13 09:36:27 1998 *************** *** 761,766 **** --- 761,769 ---- 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) *************** *** 3052,3059 **** (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 (gnus-nov-field) ; date (or (gnus-nov-field) (nnheader-generate-fake-message-id)) ; id --- 3055,3064 ---- (setq header (make-full-mail-header number ; number ! (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 *************** *** 4396,4408 **** (progn (goto-char p) (if (search-forward "\nsubject: " nil t) ! (mail-decode-encoded-word-string (nnheader-header-value)) "(none)")) ;; From. (progn (goto-char p) (if (search-forward "\nfrom: " nil t) ! (mail-decode-encoded-word-string (nnheader-header-value)) "(nobody)")) ;; Date. (progn --- 4401,4415 ---- (progn (goto-char p) (if (search-forward "\nsubject: " nil t) ! (funcall gnus-decode-encoded-word-function ! (nnheader-header-value)) "(none)")) ;; From. (progn (goto-char p) (if (search-forward "\nfrom: " nil t) ! (funcall gnus-decode-encoded-word-function ! (nnheader-header-value)) "(nobody)")) ;; Date. (progn *************** *** 6928,6934 **** (set-buffer copy-buf) (when (gnus-request-article-this-buffer article gnus-newsgroup-name) (gnus-request-accept-article ! to-newsgroup select-method (not articles))))) ;; Crosspost the article. ((eq action 'crosspost) (let ((xref (message-tokenize-header --- 6935,6941 ---- (set-buffer copy-buf) (when (gnus-request-article-this-buffer article gnus-newsgroup-name) (gnus-request-accept-article ! to-newsgroup select-method (not articles) t)))) ;; Crosspost the article. ((eq action 'crosspost) (let ((xref (message-tokenize-header *************** *** 7136,7142 **** (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)) --- 7143,7148 ---- *** pub/pgnus/lisp/gnus.el Sat Sep 12 13:27:49 1998 --- pgnus/lisp/gnus.el Sun Sep 13 09:36:27 1998 *************** *** 250,256 **** :link '(custom-manual "(gnus)Exiting Gnus") :group 'gnus) ! (defconst gnus-version-number "0.29" "Version number for this version of Gnus.") (defconst gnus-version (format "Pterodactyl Gnus v%s" gnus-version-number) --- 250,256 ---- :link '(custom-manual "(gnus)Exiting Gnus") :group 'gnus) ! (defconst gnus-version-number "0.30" "Version number for this version of Gnus.") (defconst gnus-version (format "Pterodactyl Gnus v%s" gnus-version-number) *************** *** 781,787 **** (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 --- 781,786 ---- *** pub/pgnus/lisp/mail-parse.el Sat Sep 12 09:15:37 1998 --- pgnus/lisp/mail-parse.el Sun Sep 13 09:36:28 1998 *************** *** 51,56 **** --- 51,57 ---- (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) *** pub/pgnus/lisp/mailcap.el Sat Sep 12 09:15:37 1998 --- pgnus/lisp/mailcap.el Sun Sep 13 09:36:28 1998 *************** *** 294,299 **** --- 294,300 ---- (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 *** pub/pgnus/lisp/message.el Sat Sep 12 09:15:37 1998 --- pgnus/lisp/message.el Sun Sep 13 09:36:28 1998 *************** *** 40,45 **** --- 40,46 ---- (require 'mailabbrev)) (require 'mail-parse) (require 'mm-bodies) + (require 'mm-encode) (defgroup message '((user-mail-address custom-variable) (user-full-name custom-variable)) *************** *** 2556,2562 **** list file) (save-excursion (set-buffer (get-buffer-create " *message temp*")) - (buffer-disable-undo (current-buffer)) (erase-buffer) (insert-buffer-substring buf) (save-restriction --- 2557,2562 ---- *************** *** 3548,3554 **** (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" --- 3548,3553 ---- *************** *** 3739,3745 **** 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. --- 3738,3743 ---- *** pub/pgnus/lisp/mm-decode.el Sat Sep 12 13:27:49 1998 --- pgnus/lisp/mm-decode.el Sun Sep 13 09:36:28 1998 *************** *** 63,68 **** --- 63,69 ---- (defvar mm-dissection-list nil) (defvar mm-last-shell-command "") + (defvar mm-content-id-alist nil) ;;; Convenience macros. *************** *** 86,92 **** (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) (save-restriction (mail-narrow-to-head) (when (and (or no-strict-mime --- 87,93 ---- (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 id result) (save-restriction (mail-narrow-to-head) (when (and (or no-strict-mime *************** *** 95,116 **** (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")))) (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))))))))) (defun mm-dissect-singlepart (ctl cte &optional force cdl description) (when (or force --- 96,123 ---- (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") ! id (mail-fetch-field "content-id")))) (when ctl (setq type (split-string (car ctl) "/")) (setq subtype (cadr type) type (pop type)) ! (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 *************** *** 346,351 **** --- 353,362 ---- prec nil)) (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) *** pub/pgnus/lisp/mm-encode.el Sun Aug 30 17:48:01 1998 --- pgnus/lisp/mm-encode.el Sun Sep 13 09:36:28 1998 *************** *** 24,29 **** --- 24,39 ---- ;;; 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 *** pub/pgnus/lisp/mm-util.el Fri Sep 11 12:31:18 1998 --- pgnus/lisp/mm-util.el Sun Sep 13 09:36:28 1998 *************** *** 24,29 **** --- 24,32 ---- ;;; Code: + (defvar mm-default-coding-system nil + "The default coding system to use.") + (defvar mm-known-charsets '(iso-8859-1) "List of known charsets.") *************** *** 160,176 **** (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 (coding-system-get (get-charset-property charset 'prefered-coding-system) 'mime-charset) --- 163,177 ---- (when (fboundp 'set-buffer-multibyte) (set-buffer-multibyte t))) (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) *** pub/pgnus/lisp/mm-view.el Sat Sep 12 09:15:38 1998 --- pgnus/lisp/mm-view.el Sun Sep 13 09:36:29 1998 *************** *** 70,93 **** ,(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)))))))))) ))) (defun mm-inline-audio (handle) --- 70,92 ---- ,(set-marker (make-marker) (point-min)) ,(set-marker (make-marker) (point-max))))))))) ((equal type "html") ! (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) *** pub/pgnus/lisp/nndoc.el Sat Aug 29 19:54:01 1998 --- pgnus/lisp/nndoc.el Sun Sep 13 09:36:29 1998 *************** *** 289,295 **** (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) --- 289,294 ---- *** pub/pgnus/lisp/nndraft.el Tue Sep 8 04:28:45 1998 --- pgnus/lisp/nndraft.el Sun Sep 13 09:36:29 1998 *************** *** 80,86 **** (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)) --- 80,85 ---- *** pub/pgnus/lisp/nnfolder.el Tue Sep 8 21:41:36 1998 --- pgnus/lisp/nnfolder.el Sun Sep 13 09:36:29 1998 *************** *** 328,334 **** (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)) --- 328,333 ---- *** pub/pgnus/lisp/nnheader.el Wed Sep 9 12:23:58 1998 --- pgnus/lisp/nnheader.el Sun Sep 13 09:36:29 1998 *************** *** 777,784 **** `(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) --- 777,782 ---- *** pub/pgnus/lisp/nnmail.el Tue Sep 8 21:41:36 1998 --- pgnus/lisp/nnmail.el Sun Sep 13 09:36:29 1998 *************** *** 986,992 **** (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)) --- 986,991 ---- *************** *** 1441,1447 **** (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) --- 1440,1445 ---- *** pub/pgnus/lisp/nnmbox.el Sat Aug 29 19:54:02 1998 --- pgnus/lisp/nnmbox.el Sun Sep 13 09:36:30 1998 *************** *** 265,271 **** (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)) --- 265,270 ---- *** pub/pgnus/lisp/nnml.el Sat Sep 5 01:46:13 1998 --- pgnus/lisp/nnml.el Sun Sep 13 09:36:30 1998 *************** *** 502,508 **** (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 --- 502,507 ---- *** pub/pgnus/lisp/nnsoup.el Sat Aug 29 22:25:19 1998 --- pgnus/lisp/nnsoup.el Sun Sep 13 09:36:30 1998 *************** *** 752,758 **** (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) --- 752,757 ---- *** pub/pgnus/lisp/nnspool.el Tue Sep 8 04:28:45 1998 --- pgnus/lisp/nnspool.el Sun Sep 13 09:36:30 1998 *************** *** 419,425 **** (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)) --- 419,424 ---- *** pub/pgnus/lisp/rfc2047.el Sat Sep 12 09:15:38 1998 --- pgnus/lisp/rfc2047.el Sun Sep 13 09:36:30 1998 *************** *** 30,35 **** --- 30,36 ---- (require 'base64)))) (require 'qp) (require 'mm-util) + (require 'drums) (defvar rfc2047-default-charset 'iso-8859-1 "Default MIME charset -- does not need encoding.") *************** *** 107,112 **** --- 108,114 ---- (interactive "*") (when (featurep 'mule) (save-excursion + (goto-char (point-min)) (let ((alist rfc2047-header-encoding-alist) elem method) (while (not (eobp)) *************** *** 146,152 **** (save-restriction (narrow-to-region b e) (goto-char (point-min)) ! (while (re-search-forward "[^ \t\n]+" nil t) (push (list (match-beginning 0) (match-end 0) (car --- 148,154 ---- (save-restriction (narrow-to-region b e) (goto-char (point-min)) ! (while (re-search-forward (concat "[^" drums-tspecials " \t\n]+") nil t) (push (list (match-beginning 0) (match-end 0) (car *************** *** 187,214 **** 'B)) (start (concat "=?" (downcase (symbol-name mime-charset)) "?" ! (downcase (symbol-name encoding)) "?"))) (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))))) (defun rfc2047-b-encode-region (b e) "Encode the header contained in REGION with the B encoding." ! (base64-encode-region b e t)) (defun rfc2047-q-encode-region (b e) "Encode the header contained in REGION with the Q encoding." --- 189,219 ---- 'B)) (start (concat "=?" (downcase (symbol-name mime-charset)) "?" ! (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)) ! (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) ! (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." *************** *** 219,233 **** (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)))))) ;;; ;;; Functions for decoding RFC2047 messages ;;; (defvar rfc2047-encoded-word-regexp ! "=\\?\\([^][\000-\040()<>@,\;:\\\"/?.=]+\\)\\?\\(B\\|Q\\)\\?\\([!->@-~ ]+\\)\\?=") (defun rfc2047-decode-region (start end) "Decode MIME-encoded words in region between START and END." --- 224,245 ---- (while alist (when (looking-at (caar alist)) (quoted-printable-encode-region b e nil (cdar 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\\)\\?\\([!->@-~ +]+\\)\\?=") (defun rfc2047-decode-region (start end) "Decode MIME-encoded words in region between START and END." *** pub/pgnus/lisp/ChangeLog Sat Sep 12 13:27:48 1998 --- pgnus/lisp/ChangeLog Sun Sep 13 09:36:25 1998 *************** *** 1,3 **** --- 1,59 ---- + Sun Sep 13 09:37:37 1998 Lars Magne Ingebrigtsen + + * gnus.el: Pterodactyl Gnus v0.30 is released. + + 1998-09-13 08:00:41 Lars Magne Ingebrigtsen + + * 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 + + * gnus-sum.el (gnus-summary-move-article): Don't decode accepting + articles. + + 1998-09-13 07:23:28 Lars Magne Ingebrigtsen + + * 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 + + * 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 * gnus.el: Pterodactyl Gnus v0.29 is released. *** pub/pgnus/texi/Makefile.in Sat Sep 12 13:27:50 1998 --- pgnus/texi/Makefile.in Sun Sep 13 09:36:30 1998 *************** *** 31,37 **** makeinfo -o $* $<; \ fi ! dvi: gnus.dvi message.dvi refcard.dvi .texi.dvi : $(PERL) -n -e 'print unless (/\@iflatex/ .. /\@end iflatex/)' $< > gnustmp.texi --- 31,37 ---- makeinfo -o $* $<; \ fi ! dvi: gnus.dvi message.dvi refcard.dvi emacs-mime.dvi .texi.dvi : $(PERL) -n -e 'print unless (/\@iflatex/ .. /\@end iflatex/)' $< > gnustmp.texi *************** *** 115,121 **** install: $(SHELL) $(top_srcdir)/mkinstalldirs $(infodir) ! @for file in gnus message; 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"; \ --- 115,121 ---- install: $(SHELL) $(top_srcdir)/mkinstalldirs $(infodir) ! @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"; \ *** pub/pgnus/texi/emacs-mime.texi Sat Sep 12 13:27:50 1998 --- pgnus/texi/emacs-mime.texi Sun Sep 13 09:36:31 1998 *************** *** 6,12 **** @synindex vr cp @synindex pg cp @c @direntry ! @c * Emacs Mime: (emacs-mime). The MIME de/composition library. @c @end direntry @iftex @finalout --- 6,12 ---- @synindex vr cp @synindex pg cp @c @direntry ! @c * Emacs MIME: (emacs-mime). The MIME de/composition library. @c @end direntry @iftex @finalout *************** *** 68,74 **** @end tex @node Top ! @top Emacs Mime This manual documents the libraries used to compose and display @sc{mime} messages. --- 68,74 ---- @end tex @node Top ! @top Emacs MIME This manual documents the libraries used to compose and display @sc{mime} messages. *************** *** 98,105 **** 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. @menu * mail-parse:: The generalized @sc{mime} and mail interface. --- 98,105 ---- 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 next chapter ! (@pxref{Decoding and Viewing}). @menu * mail-parse:: The generalized @sc{mime} and mail interface. *************** *** 109,114 **** --- 109,115 ---- * 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 *************** *** 164,170 **** @example (mail-header-parse-content-type "image/gif; name=\"b980912.gif\"") - => ("image/gif" (name . "b980912.gif")) @end example --- 165,170 ---- *************** *** 181,187 **** @example (mail-content-type-get '("image/gif" (name . "b980912.gif")) 'name) - => "b980912.gif" @end example --- 181,186 ---- *************** *** 192,198 **** @example (mail-header-remove-comments "Gnus/5.070027 (Pterodactyl Gnus v0.27) (Finnish Landrace)") - => "Gnus/5.070027 " @end example --- 191,196 ---- *************** *** 236,242 **** @example (mail-header-parse-addresses "Hrvoje Niksic , Steinar Bang ") ! => (("hniksic@@srce.hr" . "Hrvoje Niksic") ("sb@@metis.no" . "Steinar Bang")) @end example --- 234,240 ---- @example (mail-header-parse-addresses "Hrvoje Niksic , Steinar Bang ") ! => (("hniksic@@srce.hr" . "Hrvoje Niksic") ("sb@@metis.no" . "Steinar Bang")) @end example *************** *** 593,598 **** --- 591,635 ---- @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 *************** *** 602,613 **** 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. @menu ! * Dissection:: Analyzing a @sc{mime} message. ! * Handles:: Handle manipulations. ! * Display:: Displaying handles. @end menu --- 639,650 ---- 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 analyzation. @menu ! * Dissection:: Analyzing a @sc{mime} message. ! * Handles:: Handle manipulations. ! * Display:: Displaying handles. @end menu *************** *** 659,664 **** --- 696,704 ---- @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 *************** *** 703,708 **** --- 743,749 ---- @end table + @node Index @chapter Index @printindex cp *** pub/pgnus/texi/gnus.texi Sat Sep 12 13:27:52 1998 --- pgnus/texi/gnus.texi Sun Sep 13 09:36:32 1998 *************** *** 1,7 **** \input texinfo @c -*-texinfo-*- @setfilename gnus ! @settitle Pterodactyl Gnus 0.29 Manual @synindex fn cp @synindex vr cp @synindex pg cp --- 1,7 ---- \input texinfo @c -*-texinfo-*- @setfilename gnus ! @settitle Pterodactyl Gnus 0.30 Manual @synindex fn cp @synindex vr cp @synindex pg cp *************** *** 318,324 **** @tex @titlepage ! @title Pterodactyl Gnus 0.29 Manual @author by Lars Magne Ingebrigtsen @page --- 318,324 ---- @tex @titlepage ! @title Pterodactyl Gnus 0.30 Manual @author by Lars Magne Ingebrigtsen @page *************** *** 354,360 **** 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. @end ifinfo --- 354,360 ---- spool or your mbox file. All at the same time, if you want to push your luck. ! This manual corresponds to Pterodactyl Gnus 0.30. @end ifinfo *** pub/pgnus/texi/message.texi Sat Sep 12 13:27:52 1998 --- pgnus/texi/message.texi Sun Sep 13 09:36:32 1998 *************** *** 1,7 **** \input texinfo @c -*-texinfo-*- @setfilename message ! @settitle Pterodactyl Message 0.29 Manual @synindex fn cp @synindex vr cp @synindex pg cp --- 1,7 ---- \input texinfo @c -*-texinfo-*- @setfilename message ! @settitle Pterodactyl Message 0.30 Manual @synindex fn cp @synindex vr cp @synindex pg cp *************** *** 42,48 **** @tex @titlepage ! @title Pterodactyl Message 0.29 Manual @author by Lars Magne Ingebrigtsen @page --- 42,48 ---- @tex @titlepage ! @title Pterodactyl Message 0.30 Manual @author by Lars Magne Ingebrigtsen @page *************** *** 83,89 **** * Key Index:: List of Message mode keys. @end menu ! This manual corresponds to Pterodactyl Message 0.29. Message is distributed with the Gnus distribution bearing the same version number as this manual. --- 83,89 ---- * Key Index:: List of Message mode keys. @end menu ! This manual corresponds to Pterodactyl Message 0.30. Message is distributed with the Gnus distribution bearing the same version number as this manual. *** pub/pgnus/texi/ChangeLog Sat Sep 12 13:27:52 1998 --- pgnus/texi/ChangeLog Sun Sep 13 09:36:32 1998 *************** *** 1,3 **** --- 1,7 ---- + 1998-09-13 08:58:56 Lars Magne Ingebrigtsen + + * dir (File): Updated. + 1998-09-12 08:53:05 Lars Magne Ingebrigtsen * emacs-mime.texi: New file. *** pub/pgnus/texi/dir Sat Aug 29 19:54:44 1998 --- pgnus/texi/dir Sun Sep 13 09:36:33 1998 *************** *** 5,9 **** * Menu: ! * Gnus: (gnus). The news reader Gnus. ! * Message: (message). The Message sending thingamabob. --- 5,10 ---- * Menu: ! * Gnus: (gnus). The news reader Gnus. ! * Message: (message). The Message sending thingamabob. ! * Emacs MIME: (emacs-mime). Libraries for handling MIME.