From 7554e4249c821770633b5aea99298d92bf1e5b5d Mon Sep 17 00:00:00 2001 From: ichikawa Date: Sun, 21 Feb 1999 07:12:52 +0000 Subject: [PATCH] Importing pgnus-0.77 --- lisp/ChangeLog | 89 +++++++++++++++++++ lisp/gnus-art.el | 236 +++++++++++++++++++++++---------------------------- lisp/gnus-cite.el | 31 ++++--- lisp/gnus-group.el | 1 + lisp/gnus-msg.el | 8 +- lisp/gnus-picon.el | 3 +- lisp/gnus-start.el | 1 + lisp/gnus-sum.el | 2 + lisp/gnus-util.el | 2 +- lisp/gnus-uu.el | 2 - lisp/gnus.el | 2 +- lisp/mail-source.el | 66 +++++++++----- lisp/message.el | 6 +- lisp/mm-bodies.el | 4 +- lisp/mm-decode.el | 7 +- lisp/mm-util.el | 4 +- lisp/mm-view.el | 25 +++++- lisp/nnmail.el | 27 +++--- lisp/nnml.el | 2 +- texi/ChangeLog | 8 ++ texi/gnus.texi | 43 +++++++++- texi/message.texi | 6 +- 22 files changed, 376 insertions(+), 199 deletions(-) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 750947c..0b9cc8b 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,92 @@ +Sat Feb 20 21:34:28 1999 Lars Magne Ingebrigtsen + + * gnus.el: Pterodactyl Gnus v0.77 is released. + +1999-02-20 17:32:17 Lars Magne Ingebrigtsen + + * gnus-art.el (gnus-displaying-mime): New variable. + (article-narrow-to-head): New function. + + * mail-source.el (mail-source-fetch-pop): Include pre/postscript. + Default to pop instead of pop3. + +1999-02-19 16:16:04 Lars Magne Ingebrigtsen + + * gnus-art.el (article-hide-pgp): Goto body. + + * gnus-uu.el (gnus-uu-digest-mail-forward): Don't kill buffer. + + * gnus-cite.el: Don't use goto-line. + + * gnus-art.el (gnus-article-treat-html): Removed. + (gnus-treat-article): Save restriction. + +1999-02-17 Per Abrahamsen + + * message.el (message-send-mail): Don't untabify. + (message-mode): Don't use tabs for indentation. + +1999-02-19 14:54:13 Lars Magne Ingebrigtsen + + * message.el (message-send-mail): Don't untabify. + + * nnml.el (nnml-save-mail): Typo fix. + +1999-02-19 Per Abrahamsen + + * message.el (message-cite-function): Add + `message-cite-original-without-signature' customization option. + +1999-02-18 Per Abrahamsen + + * nnmail.el (nnmail-fix-eudora-headers): Mark as option to + `nnmail-prepare-incoming-header-hook'. + +1999-02-19 14:41:43 Justin Sheehy + + * gnus-util.el (gnus-make-sort-function-1): Typo fix. + +1999-02-19 14:40:37 Lars Magne Ingebrigtsen + + * gnus-group.el (gnus-group-get-new-news): Require nnmail. + +1999-02-18 Michael Cook + + * Recognize Microsoft Outlook's cite attribution conventions. + +1999-02-19 14:33:11 James H. Cloos, Jr. + + * gnus-sum.el: Bind M. + +1999-02-19 14:31:29 Neil Crellin + + * mail-source.el (mail-source-fetch-pop): Bind pop3-port. + +1999-02-15 Didier Verna + + * gnus-picon.el (gnus-group-display-picons): ensures that + `article-goto-body' really goes to the article body. + +1999-02-19 12:57:19 Lars Magne Ingebrigtsen + + * mm-view.el (mm-inline-text): Bind url-standalone-mode. + + * gnus-msg.el (gnus-summary-mail-forward): Create unique names. + + * mm-view.el (mm-view-message): Enable multibyte. + +1999-02-11 18:37:15 Lars Magne Ingebrigtsen + + * nnmail.el (nnmail-get-new-mail): Message later. + + * mm-util.el (mm-find-charset-region): Revert to checking + multibyte. + +1999-02-11 Matt Pharr + + * gnus-msg.el (gnus-bug): Encode environment info as a MIME + attachment. + Thu Feb 11 04:58:51 1999 Lars Magne Ingebrigtsen * gnus.el: Pterodactyl Gnus v0.76 is released. diff --git a/lisp/gnus-art.el b/lisp/gnus-art.el index 37c6c95..7d4cc63 100644 --- a/lisp/gnus-art.el +++ b/lisp/gnus-art.el @@ -1,3 +1,4 @@ + ;;; gnus-art.el --- article mode commands for Gnus ;; Copyright (C) 1996,97,98,99 Free Software Foundation, Inc. @@ -978,7 +979,6 @@ always hide." (inhibit-point-motion-hooks t) beg) ;; First we narrow to just the headers. - (widen) (goto-char (point-min)) ;; Hide any "From " lines at the beginning of (mail) articles. (while (looking-at "From ") @@ -1033,7 +1033,7 @@ always hide." (list gnus-boring-article-headers) (inhibit-point-motion-hooks t) elem) - (nnheader-narrow-to-headers) + (article-narrow-to-head) (while list (setq elem (pop list)) (goto-char (point-min)) @@ -1120,7 +1120,7 @@ always hide." column) (save-excursion (save-restriction - (message-narrow-to-head) + (article-narrow-to-head) (while (not (eobp)) (cond ((< (setq column (- (gnus-point-at-eol) (point))) @@ -1210,7 +1210,6 @@ MAP is an alist where the elements are on the form (\"from\" \"to\")." (let ((buffer-read-only nil) (width (window-width (get-buffer-window (current-buffer))))) (save-restriction - (widen) (article-goto-body) (let ((adaptive-fill-mode nil)) (while (not (eobp)) @@ -1273,7 +1272,7 @@ MAP is an alist where the elements are on the form (\"from\" \"to\")." (case-fold-search t) from last) (save-restriction - (message-narrow-to-head) + (article-narrow-to-head) (goto-char (point-min)) (setq from (message-fetch-field "from")) (goto-char (point-min)) @@ -1329,7 +1328,7 @@ If PROMPT (the prefix), prompt for a coding system to use." (interactive "P") (save-excursion (save-restriction - (message-narrow-to-head) + (article-narrow-to-head) (let* ((inhibit-point-motion-hooks t) (case-fold-search t) (ct (message-fetch-field "Content-Type" t)) @@ -1363,7 +1362,7 @@ If PROMPT (the prefix), prompt for a coding system to use." (mail-parse-charset gnus-newsgroup-charset) buffer-read-only) (save-restriction - (message-narrow-to-head) + (article-narrow-to-head) (funcall gnus-decode-header-function (point-min) (point-max))))) (defun article-de-quoted-unreadable (&optional force) @@ -1388,37 +1387,37 @@ or not." "Remove any PGP headers and signatures in the current article." (interactive) (save-excursion - (let ((inhibit-point-motion-hooks t) - buffer-read-only beg end) - (widen) - (goto-char (point-min)) - ;; Hide the "header". - (when (search-forward "\n-----BEGIN PGP SIGNED MESSAGE-----\n" nil t) - (push 'pgp gnus-article-wash-types) - (delete-region (1+ (match-beginning 0)) (match-end 0)) - ;; PGP 5 and GNU PG add a `Hash: <>' comment, hide that too - (when (looking-at "Hash:.*$") - (delete-region (point) (1+ (gnus-point-at-eol)))) - (setq beg (point)) - ;; Hide the actual signature. - (and (search-forward "\n-----BEGIN PGP SIGNATURE-----\n" nil t) - (setq end (1+ (match-beginning 0))) - (delete-region - end - (if (search-forward "\n-----END PGP SIGNATURE-----\n" nil t) - (match-end 0) - ;; Perhaps we shouldn't hide to the end of the buffer - ;; if there is no end to the signature? - (point-max)))) - ;; Hide "- " PGP quotation markers. - (when (and beg end) - (narrow-to-region beg end) - (goto-char (point-min)) - (while (re-search-forward "^- " nil t) - (delete-region - (match-beginning 0) (match-end 0))) - (widen)) - (gnus-run-hooks 'gnus-article-hide-pgp-hook))))) + (save-restriction + (let ((inhibit-point-motion-hooks t) + buffer-read-only beg end) + (article-goto-body) + ;; Hide the "header". + (when (re-search-forward "^-----BEGIN PGP SIGNED MESSAGE-----\n" nil t) + (push 'pgp gnus-article-wash-types) + (delete-region (match-beginning 0) (match-end 0)) + ;; PGP 5 and GNU PG add a `Hash: <>' comment, hide that too + (when (looking-at "Hash:.*$") + (delete-region (point) (1+ (gnus-point-at-eol)))) + (setq beg (point)) + ;; Hide the actual signature. + (and (search-forward "\n-----BEGIN PGP SIGNATURE-----\n" nil t) + (setq end (1+ (match-beginning 0))) + (delete-region + end + (if (search-forward "\n-----END PGP SIGNATURE-----\n" nil t) + (match-end 0) + ;; Perhaps we shouldn't hide to the end of the buffer + ;; if there is no end to the signature? + (point-max)))) + ;; Hide "- " PGP quotation markers. + (when (and beg end) + (narrow-to-region beg end) + (goto-char (point-min)) + (while (re-search-forward "^- " nil t) + (delete-region + (match-beginning 0) (match-end 0))) + (widen)) + (gnus-run-hooks 'gnus-article-hide-pgp-hook)))))) (defun article-hide-pem (&optional arg) "Toggle hiding of any PEM headers and signatures in the current article. @@ -1428,7 +1427,6 @@ always hide." (unless (gnus-article-check-hidden-text 'pem arg) (save-excursion (let (buffer-read-only end) - (widen) (goto-char (point-min)) ;; Hide the horrendously ugly "header". (when (and (search-forward @@ -1453,21 +1451,21 @@ always hide." (interactive) (save-excursion (save-restriction - (let ((inhibit-point-motion-hooks t) - (banner (gnus-group-get-parameter gnus-newsgroup-name 'banner)) - (gnus-signature-limit nil) - buffer-read-only beg end) - (when banner - (article-goto-body) - (cond - ((eq banner 'signature) - (when (gnus-article-narrow-to-signature) - (widen) - (forward-line -1) - (delete-region (point) (point-max)))) - ((stringp banner) - (while (re-search-forward banner nil t) - (delete-region (match-beginning 0) (match-end 0)))))))))) + (let ((inhibit-point-motion-hooks t) + (banner (gnus-group-get-parameter gnus-newsgroup-name 'banner)) + (gnus-signature-limit nil) + buffer-read-only beg end) + (when banner + (article-goto-body) + (cond + ((eq banner 'signature) + (when (gnus-article-narrow-to-signature) + (widen) + (forward-line -1) + (delete-region (point) (point-max)))) + ((stringp banner) + (while (re-search-forward banner nil t) + (delete-region (match-beginning 0) (match-end 0)))))))))) (defun article-hide-signature (&optional arg) "Hide the signature in the current article. @@ -1493,6 +1491,16 @@ always hide." (looking-at "[ \t]*$")) (gnus-delete-line)))))) +(defun article-narrow-to-head () + "Narrow the buffer to the head of the message. +Point is left at the beginning of the narrowed-to region." + (narrow-to-region + (goto-char (point-min)) + (if (search-forward "\n\n" nil 1) + (1- (point)) + (point-max))) + (goto-char (point-min))) + (defun article-goto-body () "Place point at the start of the body." (goto-char (point-min)) @@ -1565,7 +1573,6 @@ always hide." (defun gnus-article-narrow-to-signature () "Narrow to the signature; return t if a signature is found, else nil." - (widen) (let ((inhibit-point-motion-hooks t)) (when (gnus-article-search-signature) (forward-line 1) @@ -1606,38 +1613,6 @@ Put point at the beginning of the signature separator." (goto-char cur) nil))) -(eval-and-compile - (autoload 'w3-display "w3-parse") - (autoload 'w3-do-setup "w3" "" t) - (autoload 'w3-region "w3-display" "" t)) - -(defun gnus-article-treat-html () - "Render HTML." - (interactive) - (let ((cbuf (current-buffer))) - (set-buffer gnus-article-buffer) - (let (buf buffer-read-only b e) - (w3-do-setup) - (goto-char (point-min)) - (narrow-to-region - (if (search-forward "\n\n" nil t) - (setq b (point)) - (point-max)) - (setq e (point-max))) - (with-temp-buffer - (insert-buffer-substring gnus-article-buffer b e) - (require 'url) - (save-window-excursion - (w3-region (point-min) (point-max)) - (setq buf (buffer-substring-no-properties (point-min) (point-max))))) - (when buf - (delete-region (point-min) (point-max)) - (insert buf)) - (widen) - (goto-char (point-min)) - (set-window-start (get-buffer-window (current-buffer)) (point-min)) - (set-buffer cbuf)))) - (defun gnus-article-hidden-arg () "Return the current prefix arg as a number, or 0 if no prefix." (list (if current-prefix-arg @@ -1650,7 +1625,6 @@ Arg can be nil or a number. Nil and positive means hide, negative means show, 0 means toggle." (save-excursion (save-restriction - (widen) (let ((hide (gnus-article-hidden-text-p type))) (cond ((or (null arg) @@ -1721,7 +1695,7 @@ how much time has lapsed since DATE." (when (and date (not (string= date ""))) (save-excursion (save-restriction - (nnheader-narrow-to-headers) + (article-narrow-to-head) (let ((buffer-read-only nil)) ;; Delete any old Date headers. (if (re-search-forward date-regexp nil t) @@ -2865,6 +2839,8 @@ If ALL-HEADERS is non-nil, no headers are hidden." (goto-char (widget-get elems :from)) (gnus-article-press-button)) +(defvar gnus-displaying-mime nil) + (defun gnus-display-mime (&optional ihandles) "Display the MIME parts." (save-excursion @@ -2878,7 +2854,8 @@ If ALL-HEADERS is non-nil, no headers are hidden." (set-window-point window point))) (let* ((handles (or ihandles (mm-dissect-buffer) (mm-uu-dissect))) buffer-read-only handle name type b e display) - (unless ihandles + (when (and (not ihandles) + (not gnus-displaying-mime)) ;; Top-level call; we clean up. (mm-destroy-parts gnus-article-mime-handles) (setq gnus-article-mime-handles handles @@ -2890,15 +2867,18 @@ If ALL-HEADERS is non-nil, no headers are hidden." (or (not (stringp (car handles))) (cdr handles))) (progn - (unless ihandles + (when (and (not ihandles) + (not gnus-displaying-mime)) ;; Clean up for mime parts. (article-goto-body) (delete-region (point) (point-max))) - (gnus-mime-display-part handles)) + (let ((gnus-displaying-mime t)) + (gnus-mime-display-part handles))) (save-restriction (article-goto-body) (narrow-to-region (point) (point-max)) - (gnus-treat-article nil 1 1))) + (gnus-treat-article nil 1 1) + (widen))) ;; Highlight the headers. (save-excursion (save-restriction @@ -3143,7 +3123,6 @@ If given a numerical ARG, move forward ARG pages." (save-excursion (set-buffer gnus-article-buffer) (goto-char (point-min)) - (widen) ;; Remove any old next/prev buttons. (when (gnus-visual-p 'page-marker) (let ((buffer-read-only nil)) @@ -3829,7 +3808,7 @@ do the highlighting. See the documentation for those functions." (case-fold-search t) (inhibit-point-motion-hooks t) entry regexp header-face field-face from hpoints fpoints) - (message-narrow-to-head) + (article-narrow-to-head) (while (setq entry (pop alist)) (goto-char (point-min)) (setq regexp (concat "^\\(" @@ -3930,38 +3909,38 @@ specified by `gnus-button-alist'." (interactive) (save-excursion (set-buffer gnus-article-buffer) - (let ((buffer-read-only nil) - (inhibit-point-motion-hooks t) - (case-fold-search t) - (alist gnus-header-button-alist) - entry beg end) - (nnheader-narrow-to-headers) - (while alist - ;; Each alist entry. - (setq entry (car alist) - alist (cdr alist)) - (goto-char (point-min)) - (while (re-search-forward (car entry) nil t) - ;; Each header matching the entry. - (setq beg (match-beginning 0)) - (setq end (or (and (re-search-forward "^[^ \t]" nil t) - (match-beginning 0)) - (point-max))) - (goto-char beg) - (while (re-search-forward (nth 1 entry) end t) - ;; Each match within a header. - (let* ((entry (cdr entry)) - (start (match-beginning (nth 1 entry))) - (end (match-end (nth 1 entry))) - (form (nth 2 entry))) - (goto-char (match-end 0)) - (when (eval form) - (gnus-article-add-button - start end (nth 3 entry) - (buffer-substring (match-beginning (nth 4 entry)) - (match-end (nth 4 entry))))))) - (goto-char end)))) - (widen))) + (save-restriction + (let ((buffer-read-only nil) + (inhibit-point-motion-hooks t) + (case-fold-search t) + (alist gnus-header-button-alist) + entry beg end) + (article-narrow-to-head) + (while alist + ;; Each alist entry. + (setq entry (car alist) + alist (cdr alist)) + (goto-char (point-min)) + (while (re-search-forward (car entry) nil t) + ;; Each header matching the entry. + (setq beg (match-beginning 0)) + (setq end (or (and (re-search-forward "^[^ \t]" nil t) + (match-beginning 0)) + (point-max))) + (goto-char beg) + (while (re-search-forward (nth 1 entry) end t) + ;; Each match within a header. + (let* ((entry (cdr entry)) + (start (match-beginning (nth 1 entry))) + (end (match-end (nth 1 entry))) + (form (nth 2 entry))) + (goto-char (match-end 0)) + (when (eval form) + (gnus-article-add-button + start end (nth 3 entry) + (buffer-substring (match-beginning (nth 4 entry)) + (match-end (nth 4 entry))))))) + (goto-char end))))))) ;;; External functions: @@ -4275,7 +4254,8 @@ For example: (when (and (or (consp val) treated-type) (gnus-treat-predicate val)) - (funcall (cadr elem))))))) + (save-restriction + (funcall (cadr elem)))))))) ;; Dynamic variables. (defvar part-number) diff --git a/lisp/gnus-cite.el b/lisp/gnus-cite.el index 7916ce2..998a196 100644 --- a/lisp/gnus-cite.el +++ b/lisp/gnus-cite.el @@ -104,13 +104,13 @@ The first regexp group should match the Supercite attribution." :type 'integer) (defcustom gnus-cite-attribution-prefix - "In article\\|in <\\|On \\(Mon\\|Tue\\|Wed\\|Thu\\|Fri\\|Sat\\|Sun\\)," + "In article\\|in <\\|On \\(Mon\\|Tue\\|Wed\\|Thu\\|Fri\\|Sat\\|Sun\\),\\| > -----Original Message-----" "*Regexp matching the beginning of an attribution line." :group 'gnus-cite :type 'regexp) (defcustom gnus-cite-attribution-suffix - "\\(\\(wrote\\|writes\\|said\\|says\\|>\\)\\(:\\|\\.\\.\\.\\)\\)[ \t]*$" + "\\(\\(wrote\\|writes\\|said\\|says\\|>\\)\\(:\\|\\.\\.\\.\\)\\|-----Original Message-----\\)[ \t]*$" "*Regexp matching the end of an attribution line. The text matching the first grouping will be used as a button." :group 'gnus-cite @@ -343,7 +343,8 @@ Lines matching `gnus-cite-attribution-suffix' and perhaps skip (gnus-cite-find-prefix number) face (cdr (assoc prefix face-alist))) ;; Add attribution button. - (goto-line number) + (goto-char (point-min)) + (forward-line (1- number)) (when (re-search-forward gnus-cite-attribution-suffix (save-excursion (end-of-line 1) (point)) t) @@ -375,7 +376,7 @@ Lines matching `gnus-cite-attribution-suffix' and perhaps (while numbers (setq number (pop numbers)) (goto-char (point-min)) - (forward-line number) + (forward-line (1- number)) (push (cons (point-marker) "") marks) (while (and numbers (= (1- number) (car numbers))) @@ -384,8 +385,7 @@ Lines matching `gnus-cite-attribution-suffix' and perhaps (forward-line (1- number)) (push (cons (point-marker) prefix) marks))) ;; Skip to the beginning of the body. - (goto-char (point-min)) - (search-forward "\n\n" nil t) + (article-goto-body) (push (cons (point-marker) "") marks) ;; Find the end of the body. (goto-char (point-max)) @@ -435,7 +435,6 @@ If WIDTH (the numerical prefix), use that text width when filling." (fill-column (if width (prefix-numeric-value width) fill-column))) (save-restriction (while (cdr marks) - (widen) (narrow-to-region (caar marks) (caadr marks)) (let ((adaptive-fill-regexp (concat "^" (regexp-quote (cdar marks)) " *")) @@ -569,8 +568,7 @@ See also the documentation for `gnus-article-highlight-citation'." (save-excursion (set-buffer gnus-article-buffer) (gnus-cite-parse-maybe force) - (goto-char (point-min)) - (search-forward "\n\n" nil t) + (article-goto-body) (let ((start (point)) (atts gnus-cite-attribution-alist) (buffer-read-only nil) @@ -594,7 +592,8 @@ See also the documentation for `gnus-article-highlight-citation'." (while total (setq hidden (car total) total (cdr total)) - (goto-line hidden) + (goto-char (point-min)) + (forward-line (1- hidden)) (unless (assq hidden gnus-cite-attribution-alist) (gnus-add-text-properties (point) (progn (forward-line 1) (point)) @@ -614,6 +613,7 @@ See also the documentation for `gnus-article-highlight-citation'." ;;; Internal functions: + (defun gnus-cite-parse-maybe (&optional force) ;; Parse if the buffer has changes since last time. (if (and (not force) @@ -638,9 +638,7 @@ See also the documentation for `gnus-article-highlight-citation'." (defun gnus-cite-parse-wrapper () ;; Wrap chopped gnus-cite-parse - (goto-char (point-min)) - (unless (search-forward "\n\n" nil t) - (goto-char (point-max))) + (article-goto-body) (save-excursion (gnus-cite-parse-attributions)) ;; Try to avoid check citation if there is no reason to believe @@ -907,8 +905,8 @@ See also the documentation for `gnus-article-highlight-citation'." (when face (let ((inhibit-point-motion-hooks t) from to overlay) - (goto-line number) - (unless (eobp) ; Sometimes things become confused. + (goto-char (point-min)) + (when (zerop (forward-line (1- number))) (forward-char (length prefix)) (skip-chars-forward " \t") (setq from (point)) @@ -931,7 +929,8 @@ See also the documentation for `gnus-article-highlight-citation'." (while numbers (setq number (car numbers) numbers (cdr numbers)) - (goto-line number) + (goto-char (point-min)) + (forward-line (1- number)) (cond ((get-text-property (point) 'invisible) (remove-text-properties (point) (progn (forward-line 1) (point)) gnus-hidden-properties)) diff --git a/lisp/gnus-group.el b/lisp/gnus-group.el index 3845b76..30fc67c 100644 --- a/lisp/gnus-group.el +++ b/lisp/gnus-group.el @@ -2901,6 +2901,7 @@ If ARG is a number, it specifies which levels you are interested in re-scanning. If ARG is non-nil and not a number, this will force \"hard\" re-reading of the active files from all servers." (interactive "P") + (require 'nnmail) (let ((gnus-inhibit-demon t) ;; Binding this variable will inhibit multiple fetchings ;; of the same mail source. diff --git a/lisp/gnus-msg.el b/lisp/gnus-msg.el index a6a8387..34f37c9 100644 --- a/lisp/gnus-msg.el +++ b/lisp/gnus-msg.el @@ -655,7 +655,8 @@ If POST, post instead of mail." (save-excursion (set-buffer gnus-original-article-buffer) (setq text (buffer-string))) - (set-buffer (gnus-get-buffer-create " *Gnus forward*")) + (set-buffer (gnus-get-buffer-create + (generate-new-buffer-name " *Gnus forward*"))) (erase-buffer) (insert text) (run-hooks 'gnus-article-decode-hook) @@ -849,7 +850,10 @@ If YANK is non-nil, include the original article." (stringp nntp-server-type)) (insert nntp-server-type)) (insert "\n\n\n\n\n") - (gnus-debug) + (save-excursion + (set-buffer (gnus-get-buffer-create " *gnus environment info*")) + (gnus-debug)) + (insert "<#part type=application/emacs-lisp buffer=\" *gnus environment info*\" disposition=inline><#/part>") (goto-char (point-min)) (search-forward "Subject: " nil t) (message ""))) diff --git a/lisp/gnus-picon.el b/lisp/gnus-picon.el index 1fe2064..e059fdb 100644 --- a/lisp/gnus-picon.el +++ b/lisp/gnus-picon.el @@ -374,7 +374,8 @@ To use: (setq gnus-article-x-face-command 'gnus-picons-display-x-face)" (gnus-put-text-property (match-beginning 0) (match-end 0) 'invisible t) - (article-goto-body) + (let ((article-goto-body-goes-to-point-min-p nil)) + (article-goto-body)) (unless (bobp) (backward-char 1))))) (if (null gnus-picons-piconsearch-url) diff --git a/lisp/gnus-start.el b/lisp/gnus-start.el index 46243b2..646c756 100644 --- a/lisp/gnus-start.el +++ b/lisp/gnus-start.el @@ -854,6 +854,7 @@ prompt the user for the name of an NNTP server to use." "Setup news information. If RAWFILE is non-nil, the .newsrc file will also be read. If LEVEL is non-nil, the news will be set up at level LEVEL." + (require 'nnmail) (let ((init (not (and gnus-newsrc-alist gnus-active-hashtb (not rawfile)))) ;; Binding this variable will inhibit multiple fetchings ;; of the same mail source. diff --git a/lisp/gnus-sum.el b/lisp/gnus-sum.el index 87a2f78..27d3f6e 100644 --- a/lisp/gnus-sum.el +++ b/lisp/gnus-sum.el @@ -1366,6 +1366,7 @@ increase the score of each group you read." "a" gnus-summary-limit-to-author "u" gnus-summary-limit-to-unread "m" gnus-summary-limit-to-marks + "M" gnus-summary-limit-exclude-marks "v" gnus-summary-limit-to-score "*" gnus-summary-limit-include-cached "D" gnus-summary-limit-include-dormant @@ -1782,6 +1783,7 @@ increase the score of each group you read." ["Hide childless dormant" gnus-summary-limit-exclude-childless-dormant t] ;;["Hide thread" gnus-summary-limit-exclude-thread t] + ["Hide marked" gnus-summary-limit-exclude-marks t] ["Show expunged" gnus-summary-show-all-expunged t]) ("Process Mark" ["Set mark" gnus-summary-mark-as-processable t] diff --git a/lisp/gnus-util.el b/lisp/gnus-util.el index 36087d6..47891ca 100644 --- a/lisp/gnus-util.el +++ b/lisp/gnus-util.el @@ -506,7 +506,7 @@ If N, return the Nth ancestor instead." ((gnus-functionp function) ) (t - (error "Invalid sort spec: %s" function))))if + (error "Invalid sort spec: %s" function)))) (if (cdr funs) `(or (,function ,first ,last) (and (not (,function ,last ,first)) diff --git a/lisp/gnus-uu.el b/lisp/gnus-uu.el index c8a7058..bb557c2 100644 --- a/lisp/gnus-uu.el +++ b/lisp/gnus-uu.el @@ -556,8 +556,6 @@ didn't work, and overwrite existing files. Otherwise, ask each time." (delete-region (point) (gnus-point-at-eol)) (insert from)) (message-forward post)) - (delete-file file) - (kill-buffer buf) (setq gnus-uu-digest-from-subject nil))) (defun gnus-uu-digest-post-forward (&optional n) diff --git a/lisp/gnus.el b/lisp/gnus.el index ac5135a..2153901 100644 --- a/lisp/gnus.el +++ b/lisp/gnus.el @@ -259,7 +259,7 @@ is restarted, and sometimes reloaded." :link '(custom-manual "(gnus)Exiting Gnus") :group 'gnus) -(defconst gnus-version-number "0.76" +(defconst gnus-version-number "0.77" "Version number for this version of Gnus.") (defconst gnus-version (format "Pterodactyl Gnus v%s" gnus-version-number) diff --git a/lisp/mail-source.el b/lisp/mail-source.el index 7fef760..4d9c958 100644 --- a/lisp/mail-source.el +++ b/lisp/mail-source.el @@ -69,8 +69,10 @@ (:suffix ".spool") (:predicate identity)) (pop + (:prescript) + (:postscript) (:server (getenv "MAILHOST")) - (:port "pop3") + (:port "pop") (:user (or (user-login-name) (getenv "LOGNAME") (getenv "USER"))) (:program) (:function) @@ -308,8 +310,18 @@ If ARGS, PROMPT is used as an argument to `format'." (defun mail-source-fetch-pop (source callback) "Fetcher for single-file sources." (mail-source-bind (pop source) + (when prescript + (if (fboundp prescript) + (funcall prescript) + (call-process shell-file-name nil nil nil + shell-command-switch + (format-spec + prescript + (format-spec-make ?p password ?t mail-source-crash-box + ?s server ?P port ?u user))))) (let ((from (format "%s:%s:%s" server user port)) - (mail-source-string (format "pop:%s@%s" user server))) + (mail-source-string (format "pop:%s@%s" user server)) + result) (when (and (not (eq authentication 'apop)) (not program)) (setq password @@ -321,24 +333,38 @@ If ARGS, PROMPT is used as an argument to `format'." (push (cons from password) mail-source-password-cache))) (when server (setenv "MAILHOST" server)) - (if (cond - (program - (mail-source-fetch-with-program - (format-spec - program - (format-spec-make ?p password ?t mail-source-crash-box - ?s server ?P port ?u user)))) - (function - (funcall function mail-source-crash-box)) - ;; The default is to use pop3.el. - (t - (let ((pop3-password password) - (pop3-maildrop user) - (pop3-mailhost server) - (pop3-authentication-scheme - (if (eq authentication 'apop) 'apop 'pass))) - (save-excursion (pop3-movemail mail-source-crash-box))))) - (mail-source-callback callback server) + (setq result + (cond + (program + (mail-source-fetch-with-program + (format-spec + program + (format-spec-make ?p password ?t mail-source-crash-box + ?s server ?P port ?u user)))) + (function + (funcall function mail-source-crash-box)) + ;; The default is to use pop3.el. + (t + (let ((pop3-password password) + (pop3-maildrop user) + (pop3-mailhost server) + (pop3-port port) + (pop3-authentication-scheme + (if (eq authentication 'apop) 'apop 'pass))) + (save-excursion (pop3-movemail mail-source-crash-box)))))) + (if result + (progn + (mail-source-callback callback server) + (when prescript + (if (fboundp prescript) + (funcall prescript) + (call-process shell-file-name nil nil nil + shell-command-switch + (format-spec + postscript + (format-spec-make + ?p password ?t mail-source-crash-box + ?s server ?P port ?u user)))))) ;; We nix out the password in case the error ;; was because of a wrong password being given. (setq mail-source-password-cache diff --git a/lisp/message.el b/lisp/message.el index a347dc3..882c2e1 100644 --- a/lisp/message.el +++ b/lisp/message.el @@ -477,6 +477,7 @@ Predefined functions include `message-cite-original' and `message-cite-original-without-signature'. Note that `message-cite-original' uses `mail-citation-hook' if that is non-nil." :type '(radio (function-item message-cite-original) + (function-item message-cite-original-without-signature) (function-item sc-cite-original) (function :tag "Other")) :group 'message-insertion) @@ -1218,6 +1219,7 @@ Point is left at the beginning of the narrowed-to region." (defun message-sort-headers-1 () "Sort the buffer as headers using `message-rank' text props." (goto-char (point-min)) + (require 'sort) (sort-subr nil 'message-next-header (lambda () @@ -1444,6 +1446,8 @@ C-c C-a message-mime-attach-file (attach a file as MIME)." (concat "[ \t]*[-a-z0-9A-Z]*>+[ \t]*\\|" adaptive-fill-first-line-regexp)) (mm-enable-multibyte) + (make-local-variable 'indent-tabs-mode) ;Turn off tabs for indentation. + (setq indent-tabs-mode nil) (run-hooks 'text-mode-hook 'message-mode-hook)) @@ -2093,7 +2097,6 @@ the user from the mailer." (let ((message-deletable-headers (if news nil message-deletable-headers))) (message-generate-headers message-required-mail-headers)) - (untabify (point-min) (point-max)) (let ((mail-parse-charset message-posting-charset)) (mail-encode-encoded-word-buffer)) ;; Let the user do all of the above. @@ -2269,7 +2272,6 @@ to find out how to use this." (message-narrow-to-headers) ;; Insert some headers. (message-generate-headers message-required-news-headers) - (untabify (point-min) (point-max)) (let ((mail-parse-charset message-posting-charset)) (mail-encode-encoded-word-buffer)) ;; Let the user do all of the above. diff --git a/lisp/mm-bodies.el b/lisp/mm-bodies.el index 90de90f..64e6053 100644 --- a/lisp/mm-bodies.el +++ b/lisp/mm-bodies.el @@ -45,7 +45,7 @@ (iso-8859-3 . quoted-printable) (iso-8859-4 . quoted-printable) (iso-8859-5 . base64) - (koi8-r . base64) + (koi8-r . 8bit) (iso-8859-7 . quoted-printable) (iso-8859-8 . quoted-printable) (iso-8859-9 . quoted-printable) @@ -122,7 +122,7 @@ If no encoding was done, nil is returned." ((eq charset mail-parse-charset) bits) (t - (let ((encoding (or (cdr (assq charset mm-body-charset-encoding-alist )) + (let ((encoding (or (cdr (assq charset mm-body-charset-encoding-alist)) 'quoted-printable))) (mm-encode-content-transfer-encoding encoding "text/plain") encoding))))) diff --git a/lisp/mm-decode.el b/lisp/mm-decode.el index 79fcadb..c854662 100644 --- a/lisp/mm-decode.el +++ b/lisp/mm-decode.el @@ -83,6 +83,7 @@ ("text/html" mm-inline-text (locate-library "w3")) ("text/x-vcard" mm-inline-text (locate-library "vcard")) ("message/delivery-status" mm-inline-text t) + ("message/rfc822" mm-inline-message t) ("text/.*" mm-inline-text t) ("audio/wav" mm-inline-audio (and (or (featurep 'nas-sound) (featurep 'native-sound)) @@ -98,11 +99,13 @@ (defvar mm-user-display-methods '(("image/.*" . inline) ("text/.*" . inline) - ("message/delivery-status" . inline))) + ("message/delivery-status" . inline) + ("message/rfc822" . inline))) (defvar mm-user-automatic-display '("text/plain" "text/enriched" "text/richtext" "text/html" - "text/x-vcard" "image/.*" "message/delivery-status" "multipart/.*")) + "text/x-vcard" "image/.*" "message/delivery-status" "multipart/.*" + "message/rfc822")) (defvar mm-attachment-override-types '("text/plain" "text/x-vcard") diff --git a/lisp/mm-util.el b/lisp/mm-util.el index 1634ce3..1807327 100644 --- a/lisp/mm-util.el +++ b/lisp/mm-util.el @@ -252,7 +252,9 @@ See also `with-temp-file' and `with-output-to-string'." (defun mm-find-charset-region (b e) "Return a list of charsets in the region." (cond - ((fboundp 'find-charset-region) + ((and (boundp 'enable-multibyte-characters) + enable-multibyte-characters + (fboundp 'find-charset-region)) (find-charset-region b e)) ((not (boundp 'current-language-environment)) (save-excursion diff --git a/lisp/mm-view.el b/lisp/mm-view.el index a693aaa..9c20184 100644 --- a/lisp/mm-view.el +++ b/lisp/mm-view.el @@ -71,7 +71,8 @@ (save-restriction (narrow-to-region b (point)) (save-window-excursion - (let ((w3-strict-width width)) + (let ((w3-strict-width width) + (url-standalone-mode t)) (w3-region (point-min) (point-max))))) (mm-handle-set-undisplayer handle @@ -133,14 +134,34 @@ (defun mm-w3-prepare-buffer () (require 'w3) - (w3-prepare-buffer)) + (let ((url-standalone-mode t)) + (w3-prepare-buffer))) (defun mm-view-message () + (mm-enable-multibyte) (gnus-article-prepare-display) (run-hooks 'gnus-article-decode-hook) (fundamental-mode) (goto-char (point-min))) +(defun mm-inline-message (handle) + (let ((b (point))) + (save-excursion + (mm-insert-part handle) + (save-restriction + (narrow-to-region b (point)) + (run-hooks 'gnus-article-decode-hook) + (gnus-article-prepare-display) + (mm-handle-set-undisplayer + handle + `(lambda () + (let (buffer-read-only) + (mapc (lambda (prop) + (remove-specifier + (face-property 'default prop) (current-buffer))) + '(background background-pixmap foreground)) + (delete-region ,(point-min-marker) ,(point-max-marker))))))))) + (provide 'mm-view) ;; mm-view.el ends here diff --git a/lisp/nnmail.el b/lisp/nnmail.el index e84537e..54b25ad 100644 --- a/lisp/nnmail.el +++ b/lisp/nnmail.el @@ -793,7 +793,7 @@ If SOURCE is a directory spec, try to return the group name component." (goto-char (point-min)) ;; Find the end of the head. (narrow-to-region - (point-min) + (point-min) (if (search-forward "\n\n" nil t) (1- (point)) ;; This will never happen, but just to be on the safe side -- @@ -1045,6 +1045,9 @@ Return the number of characters in the body." (beginning-of-line) (insert "X-Gnus-Broken-Eudora-")))) +(custom-add-option 'nnmail-prepare-incoming-header-hook + 'nnmail-fix-eudora-headers) + ;;; Utility functions (defun nnmail-split-fancy () @@ -1365,8 +1368,6 @@ See the documentation for the variable `nnmail-split-fancy' for documentation." ((eq source 'procmail) (message "Invalid value for nnmail-spool-file: `procmail'") nil)) - (nnheader-message 4 "%s: Reading incoming mail from %s..." - method (car source)) ;; Hack to only fetch the contents of a single group's spool file. (when (and (eq (car source) 'directory) group) @@ -1379,15 +1380,17 @@ See the documentation for the variable `nnmail-split-fancy' for documentation." (if (member source nnmail-fetched-sources) (setq source nil) (push source nnmail-fetched-sources))) - (when (and source - (mail-source-fetch - source - `(lambda (file orig-file) - (nnmail-split-incoming - file ',(intern (format "%s-save-mail" method)) - ',spool-func (nnmail-get-split-group orig-file source) - ',(intern (format "%s-active-number" method)))))) - (incf i))) + (when source + (nnheader-message 4 "%s: Reading incoming mail from %s..." + method (car source)) + (when (mail-source-fetch + source + `(lambda (file orig-file) + (nnmail-split-incoming + file ',(intern (format "%s-save-mail" method)) + ',spool-func (nnmail-get-split-group orig-file source) + ',(intern (format "%s-active-number" method))))) + (incf i)))) ;; If we did indeed read any incoming spools, we save all info. (unless (zerop i) (nnmail-save-active diff --git a/lisp/nnml.el b/lisp/nnml.el index d4a2a58..ed3e365 100644 --- a/lisp/nnml.el +++ b/lisp/nnml.el @@ -591,7 +591,7 @@ all. This may very well take some time.") (let ((file (concat (nnmail-group-pathname (caar ga) nnml-directory) (int-to-string (cdar ga))))) -z (if first + (if first ;; It was already saved, so we just make a hard link. (funcall nnmail-crosspost-link-function first file t) ;; Save the article. diff --git a/texi/ChangeLog b/texi/ChangeLog index bb263d0..2d732f8 100644 --- a/texi/ChangeLog +++ b/texi/ChangeLog @@ -1,3 +1,11 @@ +1999-02-20 17:33:55 Lars Magne Ingebrigtsen + + * gnus.texi (Mail Source Specifiers): Addition. + +1999-02-11 19:19:02 Carsten Leonhardt + + * gnus.texi (Mail Source Specifiers): Document maildir. + 1999-02-09 16:21:35 Lars Magne Ingebrigtsen * gnus.texi (Charsets): New. diff --git a/texi/gnus.texi b/texi/gnus.texi index 812ebb5..5754dda 100644 --- a/texi/gnus.texi +++ b/texi/gnus.texi @@ -1,7 +1,7 @@ \input texinfo @c -*-texinfo-*- @setfilename gnus -@settitle Pterodactyl Gnus 0.76 Manual +@settitle Pterodactyl Gnus 0.77 Manual @synindex fn cp @synindex vr cp @synindex pg cp @@ -318,7 +318,7 @@ into another language, under the above conditions for modified versions. @tex @titlepage -@title Pterodactyl Gnus 0.76 Manual +@title Pterodactyl Gnus 0.77 Manual @author by Lars Magne Ingebrigtsen @page @@ -354,7 +354,7 @@ can be gotten by any nefarious means you can think of---@sc{nntp}, local spool or your mbox file. All at the same time, if you want to push your luck. -This manual corresponds to Pterodactyl Gnus 0.76. +This manual corresponds to Pterodactyl Gnus 0.77. @end ifinfo @@ -4710,6 +4710,11 @@ Include all cached articles in the limit Exclude all dormant articles from the limit (@code{gnus-summary-limit-exclude-dormant}). +@item / M +@kindex / M (Summary) +@findex gnus-summary-limit-exclude-marks +Exclude all marked articles (@code{gnus-summary-limit-exclude-marks}). + @item / T @kindex / T (Summary) @findex gnus-summary-limit-include-thread @@ -10058,6 +10063,14 @@ The password to use. The values used for these specs are taken from the values you give the corresponding keywords. +@item :prescript +A script to be run before fetching the mail. The syntax is the same as +the @code{:program} keyword. This can also be a function to be run. + +@item :postscript +A script to be run after fetching the mail. The syntax is the same as +the @code{:program} keyword. This can also be a function to be run. + @item :function The function to use to fetch mail from the POP server. The function is called with one parameter---the name of the file where the mail should @@ -10094,6 +10107,30 @@ Use @samp{movemail} to move the mail: :args (format "po:%s %s %s" user mail-source-crash-box password)) @end lisp +@item maildir +Get mail from a maildir. This is a type of mailbox currently only +supported by qmail, where each file in a special directory contains +exactly one mail. + +Keywords: + +@table @code +@item :path +The path of the directory where the mails are stored. The default is +@samp{~/Maildir/new}. + +If you sometimes look at your mail through a pop3 daemon before fetching +them with Gnus, you may also have to fetch your mails from the +@code{cur} directory inside the maildir, like in the following example. + +@end table + +An example maildir mail source: + +@lisp +(maildir :path "/home/user-name/Maildir/cur") +@end lisp + @end table diff --git a/texi/message.texi b/texi/message.texi index 4eab43a..2b3da2a 100644 --- a/texi/message.texi +++ b/texi/message.texi @@ -1,7 +1,7 @@ \input texinfo @c -*-texinfo-*- @setfilename message -@settitle Pterodactyl Message 0.76 Manual +@settitle Pterodactyl Message 0.77 Manual @synindex fn cp @synindex vr cp @synindex pg cp @@ -42,7 +42,7 @@ into another language, under the above conditions for modified versions. @tex @titlepage -@title Pterodactyl Message 0.76 Manual +@title Pterodactyl Message 0.77 Manual @author by Lars Magne Ingebrigtsen @page @@ -83,7 +83,7 @@ Message mode buffers. * Key Index:: List of Message mode keys. @end menu -This manual corresponds to Pterodactyl Message 0.76. Message is +This manual corresponds to Pterodactyl Message 0.77. Message is distributed with the Gnus distribution bearing the same version number as this manual. -- 1.7.10.4