From: yamaoka Date: Sun, 11 Jul 1999 22:09:38 +0000 (+0000) Subject: Importing Pterodactyl Gnus v0.95. X-Git-Tag: pgnus-0_95~1 X-Git-Url: http://git.chise.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=3aca09c100b6c60da9524bebf9c9eed6ad3e0174;p=elisp%2Fgnus.git- Importing Pterodactyl Gnus v0.95. --- diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 826fa9f..09a7cf5 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,7 +1,125 @@ +Fri Jul 9 22:21:16 1999 Lars Magne Ingebrigtsen + + * gnus.el: Pterodactyl Gnus v0.95 is released. + +1999-07-09 21:46:05 Lars Magne Ingebrigtsen + + * mm-decode.el (mm-mailcap-command): New function. + (mm-display-external): Use it. + + * gnus-art.el (article-make-date-line): Work for India. + + * mm-encode.el (mm-qp-or-base64): Typo. + + * gnus-topic.el (gnus-topic-goto-topic): Made into command. + +Fri Jul 9 19:28:29 1999 Lars Magne Ingebrigtsen + + * gnus.el: Pterodactyl Gnus v0.94 is released. + +1999-07-09 21:19:23 Stainless Steel Rat + + * pop3.el: New version. + +1999-07-09 20:01:44 Lars Magne Ingebrigtsen + + * mm-encode.el (mm-qp-or-base64): New function. + (mm-content-transfer-encoding): Use it. + + * gnus-util.el (gnus-parse-netrc): Allow quoted names. + +1999-07-08 Shenghuo ZHU + + * mm-decode.el (mm-display-external): Fix typo and use 'non-viewer. + + * mailcap.el (mailcap-mailcap-entry-passes-test): Add needsterminal. + +1999-07-09 18:52:22 Lars Magne Ingebrigtsen + + * gnus-art.el (gnus-mime-view-part-as-media): New command and + keystroke. + + * mailcap.el (mailcap-mime-types): New function. + + * nnmh.el (nnmh-request-group): Update nnmh-group-alist. + + * message.el (message-goto-eoh): Really go to the end. + +1999-07-09 18:40:23 Puneet Goel + + * message.el (message-make-date): Do the right thing in with + sub-hour time zones. + +1999-07-09 18:36:21 Lars Magne Ingebrigtsen + + * gnus-group.el (gnus-group-make-menu-bar): Removed double bug + report. + +1999-07-08 Shenghuo ZHU + + * nnfolder.el (nnfolder-request-rename-group): Create directory. + +1999-07-08 Shenghuo ZHU + + * mailcap.el (mailcap-parse-mailcap): Skip \;. + (mailcap-parse-mailcap-extras): Fix "nonterminal;" and empty name, + and use t as default value. + +Wed Jul 7 18:40:30 1999 Shenghuo ZHU + + * gnus-sum.el (gnus-get-newsgroup-headers): Don't assume + gnus-summary-buffer is live. + +1999-07-09 17:44:03 Robert Pluim + + * mm-util.el (mm-enable-multibyte): Check whether var bound. + +1999-07-09 17:31:39 Lars Magne Ingebrigtsen + + * message.el (message-bounce): Do MIME bounces MIMEy. + + * gnus-sum.el (gnus-summary-read-group-1): Update mark positions. + +1999-07-08 08:41:10 Lars Magne Ingebrigtsen + + * mailcap.el (mailcap-mime-extensions): Changed patch to + text/x-patch. + + * mm-decode.el (mm-display-external): Wrong placement of paren. + Wed Jul 7 13:09:51 1999 Lars Magne Ingebrigtsen * gnus.el: Pterodactyl Gnus v0.93 is released. +1999-07-08 Alexandre Oliva + + * gnus-cus.el (gnus-group-parameters): New entries for + gnus-group-split. + + * gnus-mlspl.el: Renamed functions and variables so as to + start with gnus-group-split. + * gnus.el: Adjust autoload entries. + +1999-07-07 ??:??:?? Alexandre Oliva + + * gnus-mlspl.el: Removed trailing t from comment and provide. + Renamed functions and variables to start with gnus-mlsplit. + Added autoload comments. + * gnus.el: Added autoload entries. + +1999-07-06 05:37:46 Alexandre Oliva + + * nnmail.el (nnmail-split-it): Search the regexp multiple times, + so that matches excluded by RESTRICTs do not cause the whole split + to be ignored. This also fixes a long-standing bug in which a + split with \N substitutions wouldn't cause cross-posting as + expected. + + * nnmail.el (nnmail-split-fancy): Document RESTRICT clauses. + (nnmail-split-it): Implement them. + + * nnmail.el (nnmail-split-fancy): Document ! splits. + 1999-07-07 10:41:11 Stainless Steel Rat * pop3.el: New version. diff --git a/lisp/gnus-art.el b/lisp/gnus-art.el index 90505b8..9836d8a 100644 --- a/lisp/gnus-art.el +++ b/lisp/gnus-art.el @@ -1844,8 +1844,8 @@ should replace the \"Date:\" one, or should be added below it." ;; buggy dates. ((eq type 'local) (let ((tz (car (current-time-zone)))) - (format "Date: %s %s%04d" (current-time-string time) - (if (> tz 0) "+" "-") (abs (/ tz 36))))) + (format "Date: %s %s%02d%02d" (current-time-string time) + (if (> tz 0) "+" "-") (/ tz 3600) (/ (% tz 3600) 60)))) ;; Convert to Universal Time. ((eq type 'ut) (concat "Date: " @@ -2687,14 +2687,15 @@ If ALL-HEADERS is non-nil, no headers are hidden." (?e gnus-tmp-dots ?s))) (defvar gnus-mime-button-commands - '((gnus-article-press-button "\r" "Toggle Display") - (gnus-mime-view-part "v" "View Interactively...") - (gnus-mime-save-part "o" "Save...") - (gnus-mime-copy-part "c" "View As Text, In Other Buffer") - (gnus-mime-inline-part "i" "View As Text, In This Buffer") - (gnus-mime-internalize-part "E" "View Internally") - (gnus-mime-externalize-part "e" "View Externally") - (gnus-mime-pipe-part "|" "Pipe To Command..."))) + '((gnus-article-press-button "\r" "Toggle Display") + (gnus-mime-view-part "v" "View Interactively...") + (gnus-mime-view-part-as-type "t" "View As Type...") + (gnus-mime-save-part "o" "Save...") + (gnus-mime-copy-part "c" "View As Text, In Other Buffer") + (gnus-mime-inline-part "i" "View As Text, In This Buffer") + (gnus-mime-internalize-part "E" "View Internally") + (gnus-mime-externalize-part "e" "View Externally") + (gnus-mime-pipe-part "|" "Pipe To Command..."))) (defun gnus-article-mime-part-status () (if gnus-article-mime-handle-alist-1 @@ -2762,6 +2763,14 @@ If ALL-HEADERS is non-nil, no headers are hidden." (let ((data (get-text-property (point) 'gnus-data))) (mm-interactively-view-part data))) +(defun gnus-mime-view-part-as-media () + "Choose a MIME media type, and view the part as such." + (interactive + (list (completing-read "View as MIME type: " mailcap-mime-types))) + (gnus-article-check-buffer) + (let ((handle (get-text-property (point) 'gnus-data))) + (gnus-mm-display-part handle))) + (defun gnus-mime-copy-part (&optional handle) "Put the the MIME part under point into a new buffer." (interactive) diff --git a/lisp/gnus-cus.el b/lisp/gnus-cus.el index 71c36af..8127d65 100644 --- a/lisp/gnus-cus.el +++ b/lisp/gnus-cus.el @@ -1,6 +1,6 @@ ;;; gnus-cus.el --- customization commands for Gnus ;; -;; Copyright (C) 1996 Free Software Foundation, Inc. +;; Copyright (C) 1996,1999 Free Software Foundation, Inc. ;; Author: Per Abrahamsen ;; Keywords: news @@ -56,7 +56,7 @@ if that value is non-nil." ;;; Group Customization: -(defconst gnus-group-parameters +(defcustom gnus-group-parameters '((to-address (gnus-email-address :tag "To Address") "\ This will be used when doing followups and posts. @@ -71,14 +71,63 @@ not. Let's say there's a group on the server that is called `fa.4ad-l'. This is a real newsgroup, but the server has gotten the articles from a mail-to-news gateway. Posting directly to this group is therefore impossible--you have to send mail to the mailing list -address instead.") +address instead. + +The gnus-group-split mail splitting mechanism will behave as if this +address was listed in gnus-group-split Addresses (see below).") (to-list (gnus-email-address :tag "To List") "\ This address will be used when doing a `a' in the group. It is totally ignored when doing a followup--except that if it is present in a news group, you'll get mail group semantics when doing -`f'.") +`f'. + +The gnus-group-split mail splitting mechanism will behave as if this +address was listed in gnus-group-split Addresses (see below).") + + (extra-aliases (choice + :tag "Extra Aliases" + (list + :tag "List" + (editable-list + :inline t + (gnus-email-address :tag "Address"))) + (gnus-email-address :tag "Address")) "\ +Store messages posted from or to this address in this group. + +You must be using gnus-group-split for this to work. The VALUE of the +nnmail-split-fancy SPLIT generated for this group will match these +addresses.") + + (split-regexp (regexp :tag "gnus-group-split Regular Expression") "\ +Like gnus-group-split Address, but expects a regular expression.") + + (split-exclude (list :tag "gnus-group-split Restricts" + (editable-list + :inline t (regexp :tag "Restrict"))) "\ +Regular expression that cancels gnus-group-split matches. + +Each entry is added to the nnmail-split-fancy SPLIT as a separate +RESTRICT clause.") + + (split-spec (choice :tag "gnus-group-split Overrider" + (sexp :tag "Fancy Split") + (const :tag "Catch All" catch-all) + (const :tag "Ignore" nil)) "\ +Override all other gnus-group-split fields. + +In `Fancy Split', you can enter any nnmail-split-fancy SPLIT. Note +that the name of this group won't be automatically assumed, you have +to add it to the SPLITs yourself. This means you can use such splits +to split messages to other groups too. + +If you select `Catch All', this group will get postings for any +messages not matched in any other group. It overrides the variable +gnus-group-split-default-catch-all-group. + +Selecting `Ignore' forces no SPLIT to be generated for this group, +disabling all other gnus-group-split fields.") (broken-reply-to (const :tag "Broken Reply To" t) "\ Ignore `Reply-To' headers in this group. diff --git a/lisp/gnus-group.el b/lisp/gnus-group.el index 4e8f15f..5cd3cd8 100644 --- a/lisp/gnus-group.el +++ b/lisp/gnus-group.el @@ -725,7 +725,6 @@ ticked: The number of ticked articles." ["Pack packet" gnus-soup-pack-packet (fboundp 'gnus-soup-pack-packet)] ["Save areas" gnus-soup-save-areas (fboundp 'gnus-soup-pack-packet)] ["Brew SOUP" gnus-group-brew-soup (fboundp 'gnus-soup-pack-packet)]) - ["Send a bug report" gnus-bug t] ["Send a mail" gnus-group-mail t] ["Post an article..." gnus-group-post-news t] ["Check for new news" gnus-group-get-new-news t] diff --git a/lisp/gnus-mlspl.el b/lisp/gnus-mlspl.el index eacdd13..8936bc5 100644 --- a/lisp/gnus-mlspl.el +++ b/lisp/gnus-mlspl.el @@ -24,62 +24,64 @@ (require 'gnus-group) (require 'nnmail) -(defvar gnus-mlsplit-updated-hook nil +(defvar gnus-group-split-updated-hook nil "Hook called just after nnmail-split-fancy is updated by -gnus-mlsplit-update") +gnus-group-split-update") -(defvar gnus-mlsplit-default-catch-all-group "mail.misc" - "Group used by gnus-mlsplit and -gnus-mlsplit-update as default catch-all group") +(defvar gnus-group-split-default-catch-all-group "mail.misc" + "Group used by gnus-group-split and gnus-group-split-update as +default catch-all group") ;;;###autoload -(defun gnus-mlsplit-setup (&optional auto-update catch-all) - "Sets things up so that nnmail-split-fancy is used for mail splitting, -and defines the variable nnmail-split-fancy according with group parameters. - -if AUTO-UPDATE is non-nil (prefix argument accepted, if called interactive), -makes sure nnmail-split-fancy is re-computed before getting new mail, -by adding gnus-mlsplit-update to nnmail-pre-get-new-mail-hook." +(defun gnus-group-split-setup (&optional auto-update catch-all) + "Sets things up so that nnmail-split-fancy is used for mail +splitting, and defines the variable nnmail-split-fancy according with +group parameters. + +if AUTO-UPDATE is non-nil (prefix argument accepted, if called +interactive), makes sure nnmail-split-fancy is re-computed before +getting new mail, by adding gnus-group-split-update to +nnmail-pre-get-new-mail-hook." (interactive "P") (setq nnmail-split-methods 'nnmail-split-fancy) (when catch-all - (setq gnus-mlsplit-default-catch-all-group catch-all)) - (gnus-mlsplit-update) + (setq gnus-group-split-default-catch-all-group catch-all)) + (gnus-group-split-update) (when auto-update - (add-hook 'nnmail-pre-get-new-mail-hook 'gnus-mlsplit-update))) + (add-hook 'nnmail-pre-get-new-mail-hook 'gnus-group-split-update))) ;;;###autoload -(defun gnus-mlsplit-update (&optional catch-all) +(defun gnus-group-split-update (&optional catch-all) "Computes nnmail-split-fancy from group params, by calling -\(gnus-mlsplit-fancy nil nil DEFAULTGROUP)" +\(gnus-group-split-fancy nil nil DEFAULTGROUP)" (interactive) (setq nnmail-split-fancy - (gnus-mlsplit-fancy - nil nil (or catch-all gnus-mlsplit-default-catch-all-group))) - (run-hooks 'gnus-mlsplit-updated-hook) + (gnus-group-split-fancy + nil nil (or catch-all gnus-group-split-default-catch-all-group))) + (run-hooks 'gnus-group-split-updated-hook) ) ;;;###autoload -(defun gnus-mlsplit () - "Uses information from group parameters in order to split mail. -See gnus-mlsplit-fancy for more information. +(defun gnus-group-split () + "Uses information from group parameters in order to split mail. See +gnus-group-split-fancy for more information. If no group is defined as catch-all, the value of -gnus-mlsplit-default-catch-all-group is used. +gnus-group-split-default-catch-all-group is used. -gnus-mlsplit is a valid value for nnmail-split-methods." +gnus-group-split is a valid value for nnmail-split-methods." (let (nnmail-split-fancy) - (gnus-mlsplit-update - gnus-mlsplit-default-catch-all-group) + (gnus-group-split-update + gnus-group-split-default-catch-all-group) (nnmail-split-fancy))) ;;;###autoload -(defun gnus-mlsplit-fancy +(defun gnus-group-split-fancy (&optional groups no-crosspost catch-all) - "Uses information from group parameters in order to split mail. -It can be embedded into nnmail-split-fancy lists with the SPLIT + "Uses information from group parameters in order to split mail. It +can be embedded into nnmail-split-fancy lists with the SPLIT -\(: gnus-mlsplit-fancy GROUPS NO-CROSSPOST CATCH-ALL\) +\(: gnus-group-split-fancy GROUPS NO-CROSSPOST CATCH-ALL\) GROUPS may be a regular expression or a list of group names, that will be used to select candidate groups. If it is ommited or nil, all @@ -94,7 +96,7 @@ split-regexp matches the empty string, nor is there a selected group whose SPLIT-SPEC is 'catch-all, this group name will be appended to the returned SPLIT list, as the last element in a '| SPLIT. -For each selected group, a SPLIT is composed like this: if split-spec +For each selected group, a SPLIT is composed like this: if SPLIT-SPEC is specified, this split is returned as-is (unless it is nil: in this case, the group is ignored). Otherwise, if TO-ADDRESS, TO-LIST and/or EXTRA-ALIASES are specified, a regexp that matches any of them is @@ -116,7 +118,7 @@ nnml:mail.foo: nnml:mail.others: \((split-spec . catch-all)) -Calling (gnus-mlsplit-fancy nil nil \"mail.misc\") returns: +Calling (gnus-group-split-fancy nil nil \"mail.misc\") returns: \(| (& (any \"\\\\(bar@femail\\\\.com\\\\|.*@femail\\\\.com\\\\)\" \"nnml:mail.bar\") diff --git a/lisp/gnus-sum.el b/lisp/gnus-sum.el index 2b175b6..0b1c359 100644 --- a/lisp/gnus-sum.el +++ b/lisp/gnus-sum.el @@ -2792,6 +2792,7 @@ If NO-DISPLAY, don't generate a summary buffer." (gnus-summary-set-local-parameters gnus-newsgroup-name) (gnus-update-format-specifications nil 'summary 'summary-mode 'summary-dummy) + (gnus-update-summary-mark-positions) ;; Do score processing. (when gnus-use-scoring (gnus-possibly-score-headers)) @@ -4569,7 +4570,9 @@ The resulting hash table is returned, or nil if no Xrefs were found." headers id end ref (mail-parse-charset gnus-newsgroup-charset) (mail-parse-ignored-charsets - (save-excursion (set-buffer gnus-summary-buffer) + (save-excursion (condition-case nil + (set-buffer gnus-summary-buffer) + (error)) gnus-newsgroup-ignored-charsets))) (save-excursion (set-buffer nntp-server-buffer) diff --git a/lisp/gnus-topic.el b/lisp/gnus-topic.el index ed63e62..97da766 100644 --- a/lisp/gnus-topic.el +++ b/lisp/gnus-topic.el @@ -149,11 +149,20 @@ with some simple extensions. (gnus-group-topic group)))) (defun gnus-topic-goto-topic (topic) - "Go to TOPIC." (when topic (gnus-goto-char (text-property-any (point-min) (point-max) 'gnus-topic (intern topic))))) +(defun gnus-topic-jump-to-topic (topic) + "Go to TOPIC." + (interactive + (list (completing-read "Go to topic: " + (mapcar 'list (gnus-topic-list)) + nil t))) + (dolist (topic (gnus-current-topics topic)) + (gnus-topic-fold t)) + (gnus-topic-goto-topic topic)) + (defun gnus-current-topic () "Return the name of the current topic." (let ((result @@ -507,9 +516,9 @@ articles in the topic and its subtopics." (car gnus-group-list-mode) (cdr gnus-group-list-mode) nil nil topic level)) -(defun gnus-topic-fold (&optional insert) +(defun gnus-topic-fold (&optional insert topic) "Remove/insert the current topic." - (let ((topic (gnus-group-topic-name))) + (let ((topic (or topic (gnus-group-topic-name)))) (when topic (save-excursion (if (not (gnus-group-active-topic-p)) @@ -932,6 +941,7 @@ articles in the topic and its subtopics." "c" gnus-topic-copy-group "h" gnus-topic-hide-topic "s" gnus-topic-show-topic + "j" gnus-topic-jump-to-topic "M" gnus-topic-move-matching "C" gnus-topic-copy-matching "\C-i" gnus-topic-indent @@ -963,6 +973,7 @@ articles in the topic and its subtopics." ["Copy matching" gnus-topic-copy-matching t] ["Move matching" gnus-topic-move-matching t]) ("Topics" + ["Goto" gnus-topic-jump-to-topic t] ["Show" gnus-topic-show-topic t] ["Hide" gnus-topic-hide-topic t] ["Delete" gnus-topic-delete t] diff --git a/lisp/gnus-util.el b/lisp/gnus-util.el index 350926c..aacb877 100644 --- a/lisp/gnus-util.el +++ b/lisp/gnus-util.el @@ -816,9 +816,12 @@ ARG is passed to the first function." (if (eq (char-after) ?#) (goto-char (point-max)) (unless (eobp) - (setq elem (buffer-substring - (point) (progn (skip-chars-forward "^\t ") - (point)))) + (setq elem + (if (= (following-char) ?\") + (read (current-buffer)) + (buffer-substring + (point) (progn (skip-chars-forward "^\t ") + (point))))) (cond ((equal elem "macdef") ;; We skip past the macro definition. diff --git a/lisp/gnus.el b/lisp/gnus.el index 6aa4bf9..6b317de 100644 --- a/lisp/gnus.el +++ b/lisp/gnus.el @@ -260,7 +260,7 @@ is restarted, and sometimes reloaded." :link '(custom-manual "(gnus)Exiting Gnus") :group 'gnus) -(defconst gnus-version-number "0.93" +(defconst gnus-version-number "0.95" "Version number for this version of Gnus.") (defconst gnus-version (format "Pterodactyl Gnus v%s" gnus-version-number) @@ -1761,8 +1761,9 @@ gnus-newsrc-hashtb should be kept so that both hold the same information.") ("gnus-vm" :interactive t gnus-summary-save-in-vm gnus-summary-save-article-vm) ("gnus-draft" :interactive t gnus-draft-mode gnus-group-send-drafts) - ("gnus-mlspl" gnus-mlsplit gnus-mlsplit-fancy) - ("gnus-mlspl" :interactive t gnus-mlsplit-setup gnus-mlsplit-update)))) + ("gnus-mlspl" gnus-group-split gnus-group-split-fancy) + ("gnus-mlspl" :interactive t gnus-group-split-setup + gnus-group-split-update)))) ;;; gnus-sum.el thingies diff --git a/lisp/mail-source.el b/lisp/mail-source.el index 63929ca..de61819 100644 --- a/lisp/mail-source.el +++ b/lisp/mail-source.el @@ -309,8 +309,7 @@ If ARGS, PROMPT is used as an argument to `format'." (if (and (symbolp script) (fboundp script)) (funcall script) (mail-source-call-script - (format-spec - script spec)))) + (format-spec script spec)))) (when delay (sleep-for delay))) @@ -398,9 +397,8 @@ If ARGS, PROMPT is used as an argument to `format'." (mail-source-callback callback server) (mail-source-run-script postscript - (format-spec-make - ?p password ?t mail-source-crash-box - ?s server ?P port ?u user))) + (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/mailcap.el b/lisp/mailcap.el index 93b50b1..7a1c05b 100644 --- a/lisp/mailcap.el +++ b/lisp/mailcap.el @@ -384,6 +384,11 @@ If FORCE, re-parse even if already parsed." (skip-chars-forward "; \t\n") (setq save-pos (point)) (skip-chars-forward "^;\n") + ;;; skip \; + (while (eq (char-before) ?\\) + (backward-delete-char 1) + (skip-chars-forward ";") + (skip-chars-forward "^;\n")) (if (eq (or (char-after save-pos) 0) ?') (setq viewer (progn (narrow-to-region (1+ save-pos) (point)) @@ -419,14 +424,13 @@ If FORCE, re-parse even if already parsed." (skip-chars-forward " \n\t;") (while (not (eobp)) (setq done nil) - (skip-chars-forward " \";\n\t") (setq name-pos (point)) - (skip-chars-forward "^ \n\t=") + (skip-chars-forward "^ \n\t=;") (downcase-region name-pos (point)) (setq name (buffer-substring name-pos (point))) (skip-chars-forward " \t\n") (if (not (eq (char-after (point)) ?=)) ; There is no value - (setq value nil) + (setq value t) (skip-chars-forward " \t\n=") (setq val-pos (point)) (if (memq (char-after val-pos) '(?\" ?')) @@ -445,7 +449,8 @@ If FORCE, re-parse even if already parsed." (skip-chars-forward ";")) (setq done t)))) (setq value (buffer-substring val-pos (point)))) - (setq results (cons (cons name value) results))) + (setq results (cons (cons name value) results)) + (skip-chars-forward " \";\n\t")) results))) (defun mailcap-mailcap-entry-passes-test (info) @@ -456,6 +461,7 @@ If FORCE, re-parse even if already parsed." ) (setq status (and test (split-string (cdr test) " "))) (if (and (or (assoc "needsterm" info) + (assoc "needsterminal" info) (assoc "needsx11" info)) (not (getenv "DISPLAY"))) (setq status nil) @@ -740,7 +746,7 @@ this type is returned." (".nc" . "application/x-netcdf") (".nc" . "application/x-netcdf") (".oda" . "application/oda") - (".patch" . "application/x-patch") + (".patch" . "text/x-patch") (".pbm" . "image/x-portable-bitmap") (".pdf" . "application/pdf") (".pgm" . "image/portable-graymap") @@ -872,6 +878,10 @@ The path of COMMAND will be returned iff COMMAND is a command." (not (file-directory-p file))) (throw 'found file)))))))) +(defun mailcap-mime-types () + "Return a list of MIME media types." + (delete-duplicates (mapcar 'cdr mailcap-mime-extensions))) + (provide 'mailcap) ;;; mailcap.el ends here diff --git a/lisp/message.el b/lisp/message.el index 7b4525c..6e45b2a 100644 --- a/lisp/message.el +++ b/lisp/message.el @@ -1520,7 +1520,7 @@ C-c C-a mml-attach-file (attach a file as MIME)." "Move point to the end of the headers." (interactive) (message-goto-body) - (forward-line -2)) + (forward-line -1)) (defun message-goto-signature () "Move point to the beginning of the message signature. @@ -2701,7 +2701,7 @@ If NOW, use that time instead." parse-time-months)))) (format-time-string "%Y %H:%M:%S " now) ;; We do all of this because XEmacs doesn't have the %z spec. - (format "%s%02d%02d" sign (/ zone 3600) (% zone 3600))))) + (format "%s%02d%02d" sign (/ zone 3600) (/ (% zone 3600) 60))))) (defun message-make-message-id () "Make a unique Message-ID." @@ -3861,33 +3861,27 @@ This only makes sense if the current message is a bounce message than contains some mail you have written which has been bounced back to you." (interactive) - (let ((cur (current-buffer)) + (let ((handles (mm-dissect-buffer)) boundary) (message-pop-to-buffer (message-buffer-name "bounce")) - (insert-buffer-substring cur) - (undo-boundary) - (message-narrow-to-head) - (if (and (message-fetch-field "Mime-Version") - (setq boundary (message-fetch-field "Content-Type"))) - (if (string-match "boundary=\"\\([^\"]+\\)\"" boundary) - (setq boundary (concat (match-string 1 boundary) " *\n" - "Content-Type: message/rfc822")) - (setq boundary nil))) - (widen) - (goto-char (point-min)) - (search-forward "\n\n" nil t) - (or (and boundary - (re-search-forward boundary nil t) - (forward-line 2)) - (and (re-search-forward message-unsent-separator nil t) - (forward-line 1)) - (re-search-forward "^Return-Path:.*\n" nil t)) - ;; We remove everything before the bounced mail. - (delete-region - (point-min) - (if (re-search-forward "^[^ \n\t]+:" nil t) - (match-beginning 0) - (point))) + (if (stringp (car handles)) + ;; This is a MIME bounce. + (mm-insert-part (car (last handles))) + ;; This is a non-MIME bounce, so we try to remove things + ;; manually. + (mm-insert-part (car (last handles))) + (undo-boundary) + (goto-char (point-min)) + (search-forward "\n\n" nil t) + (or (and (re-search-forward message-unsent-separator nil t) + (forward-line 1)) + (re-search-forward "^Return-Path:.*\n" nil t)) + ;; We remove everything before the bounced mail. + (delete-region + (point-min) + (if (re-search-forward "^[^ \n\t]+:" nil t) + (match-beginning 0) + (point)))) (save-restriction (message-narrow-to-head) (message-remove-header message-ignored-bounced-headers t) diff --git a/lisp/mm-decode.el b/lisp/mm-decode.el index 8b5b91a..0b5f57f 100644 --- a/lisp/mm-decode.el +++ b/lisp/mm-decode.el @@ -317,7 +317,7 @@ external if displayed external." (let ((mm (current-buffer)) (non-viewer (assoc "non-viewer" (mailcap-mime-info - (mm-handle-media-type handle)) t))) + (mm-handle-media-type handle) t)))) (unwind-protect (if method (funcall method) @@ -330,9 +330,10 @@ external if displayed external." (let* ((dir (make-temp-name (expand-file-name "emm." mm-tmp-directory))) (filename (mail-content-type-get (mm-handle-disposition handle) 'filename)) - (needsterm (assoc "needsterm" - (mailcap-mime-info - (mm-handle-media-type handle)) t)) + (mime-info (mailcap-mime-info + (mm-handle-media-type handle) t)) + (needsterm (or (assoc "needsterm" mime-info) + (assoc "needsterminal" mime-info))) process file buffer) ;; We create a private sub-directory where we store our files. (make-directory dir) @@ -349,16 +350,36 @@ external if displayed external." (start-process "*display*" nil "xterm" "-e" shell-file-name "-c" - (format method - (mm-quote-arg file))) + (mm-mailcap-command + method file (mm-handle-type handle))) (start-process "*display*" (setq buffer (generate-new-buffer "*mm*")) shell-file-name - "-c" (format method - (mm-quote-arg file))))) + "-c" + (mm-mailcap-command + method file (mm-handle-type handle))))) (mm-handle-set-undisplayer handle (cons file buffer))) (message "Displaying %s..." (format method file)))))) +(defun mm-mailcap-command (method file type-list) + (let ((ctl (cdr type-list)) + (beg 0) + out sub total) + (while (string-match "%{\\([^}]+\\)}\\|%s\\|%t" method beg) + (push (substring method beg (match-beginning 0)) out) + (setq beg (match-end 0) + total (match-string 0 method) + sub (match-string 1 method)) + (cond + ((string= total "%s") + (push (mm-quote-arg file) out)) + ((string= total "%t") + (push (mm-quote-arg (car type-list)) out)) + (t + (push (mm-quote-arg (or (cdr (assq (intern sub) ctl)) "")) out)))) + (push (substring method beg (length method)) out) + (mapconcat 'identity (nreverse out) ""))) + (defun mm-remove-parts (handles) "Remove the displayed MIME parts represented by HANDLE." (if (and (listp handles) diff --git a/lisp/mm-encode.el b/lisp/mm-encode.el index fbc2d7c..d2de87d 100644 --- a/lisp/mm-encode.el +++ b/lisp/mm-encode.el @@ -28,12 +28,15 @@ (require 'mailcap) (defvar mm-content-transfer-encoding-defaults - '(("text/.*" quoted-printable) + '(("text/x-patch" 8bit) + ("text/.*" qp-or-base64) ("message/rfc822" 8bit) ("application/emacs-lisp" 8bit) ("application/x-patch" 8bit) - (".*" base64)) - "Alist of regexps that match MIME types and their encodings.") + (".*" qp-or-base64)) + "Alist of regexps that match MIME types and their encodings. +If the encoding is `qp-or-base64', then either quoted-printable +or base64 will be used, depending on what is more efficient.") (defun mm-insert-rfc822-headers (charset encoding) "Insert text/plain headers with CHARSET and ENCODING." @@ -110,14 +113,38 @@ The encoding used is returned." (insert "\n")) (defun mm-content-transfer-encoding (type) - "Return a CTE suitable for TYPE." + "Return a CTE suitable for TYPE to encode the current buffer." (let ((rules mm-content-transfer-encoding-defaults)) (catch 'found (while rules (when (string-match (caar rules) type) - (throw 'found (cadar rules))) + (throw 'found + (if (eq (cadar rules) 'qp-or-base64) + (mm-qp-or-base64) + (cadar rules)))) (pop rules))))) +(defun mm-qp-or-base64 () + (save-excursion + (save-restriction + (narrow-to-region (point-min) (min (+ (point-min) 1000) (point-max))) + (goto-char (point-min)) + (let ((8bit 0)) + (cond + ((not (featurep 'mule)) + (while (re-search-forward "[^\x00-\x7f]" nil t) + (incf 8bit))) + (t + ;; Mule version + (while (not (eobp)) + (skip-chars-forward "\0-\177") + (unless (eobp) + (forward-char 1) + (incf 8bit))))) + (if (> (/ (* 8bit 1.0) (buffer-size)) 0.166) + 'quoted-printable + 'base64))))) + (provide 'mm-encode) ;;; mm-encode.el ends here diff --git a/lisp/mm-util.el b/lisp/mm-util.el index 0fa5e3c..a8e8f8b 100644 --- a/lisp/mm-util.el +++ b/lisp/mm-util.el @@ -186,6 +186,7 @@ used as the line break code type of the coding system." (defsubst mm-enable-multibyte () "Enable multibyte in the current buffer." (when (and (fboundp 'set-buffer-multibyte) + (boundp 'enable-multibyte-characters) (default-value 'enable-multibyte-characters)) (set-buffer-multibyte t))) diff --git a/lisp/nnfolder.el b/lisp/nnfolder.el index b0dd971..b79299c 100644 --- a/lisp/nnfolder.el +++ b/lisp/nnfolder.el @@ -450,7 +450,9 @@ If NIL, NNFOLDER-FILE-CODING-SYSTEM is used.") (ignore-errors (rename-file buffer-file-name - (nnfolder-group-pathname new-name)) + (let ((new-file (nnfolder-group-pathname new-name))) + (gnus-make-directory (file-name-directory new-file)) + new-file)) t) ;; That went ok, so we change the internal structures. (let ((entry (assoc group nnfolder-group-alist))) diff --git a/lisp/nnmh.el b/lisp/nnmh.el index c41ea70..cfe41ab 100644 --- a/lisp/nnmh.el +++ b/lisp/nnmh.el @@ -173,11 +173,14 @@ '<)) (cond (dir + (setq nnmh-group-alist + (delq (assoc group nnmh-group-alist) nnmh-group-alist)) + (push (list group (cons (car dir) (car (last dir)))) + nnmh-group-alist) (nnheader-report 'nnmh "Selected group %s" group) (nnheader-insert "211 %d %d %d %s\n" (length dir) (car dir) - (progn (while (cdr dir) (setq dir (cdr dir))) (car dir)) - group)) + (car (last dir)) group)) (t (nnheader-report 'nnmh "Empty group %s" group) (nnheader-insert (format "211 0 1 0 %s\n" group)))))))))) diff --git a/lisp/pop3.el b/lisp/pop3.el index 7c745a8..c19a77f 100644 --- a/lisp/pop3.el +++ b/lisp/pop3.el @@ -4,7 +4,7 @@ ;; Author: Richard L. Pieri ;; Keywords: mail, pop3 -;; Version: 1.3r +;; Version: 1.3s ;; This file is part of GNU Emacs. @@ -37,7 +37,7 @@ (require 'mail-utils) (provide 'pop3) -(defconst pop3-version "1.3r") +(defconst pop3-version "1.3s") (defvar pop3-maildrop (or (user-login-name) (getenv "LOGNAME") (getenv "USER") nil) "*POP3 maildrop.") @@ -146,8 +146,7 @@ Returns the process associated with the connection." ;; (insert command "\r\n")) (setq pop3-read-point (point)) (goto-char (point-max)) - (process-send-string process command) - (process-send-string process "\r\n") + (process-send-string process (concat command "\r\n")) ) (defun pop3-read-response (process &optional return) @@ -253,7 +252,7 @@ Return the response string if optional second argument is non-nil." (let ((size (- (point-max) (point-min)))) (goto-char (point-min)) (widen) - (forward-line -2) + (forward-line -1) (insert (format "Content-Length: %s\n" size))) ))))) diff --git a/texi/ChangeLog b/texi/ChangeLog index 893bd16..42c9e20 100644 --- a/texi/ChangeLog +++ b/texi/ChangeLog @@ -1,3 +1,12 @@ +1999-07-09 19:41:34 Lars Magne Ingebrigtsen + + * gnus.texi (Using MIME): Addition. + (Topic Commands): Addition. + +1999-07-06 05:37:46 Alexandre Oliva + + * gnus.texi (Fancy Mail Splitting): Document RESTRICT. + 1999-07-07 10:26:59 Robin S. Socha * gnus.texi (Scoring Tips): Typo. diff --git a/texi/gnus.texi b/texi/gnus.texi index 564d93c..93f8e06 100644 --- a/texi/gnus.texi +++ b/texi/gnus.texi @@ -1,7 +1,7 @@ @c \input texinfo @c -*-texinfo-*- @setfilename gnus -@settitle Pterodactyl Gnus 0.93 Manual +@settitle Pterodactyl Gnus 0.95 Manual @synindex fn cp @synindex vr cp @synindex pg cp @@ -319,7 +319,7 @@ into another language, under the above conditions for modified versions. @tex @titlepage -@title Pterodactyl Gnus 0.93 Manual +@title Pterodactyl Gnus 0.95 Manual @author by Lars Magne Ingebrigtsen @page @@ -355,7 +355,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.93. +This manual corresponds to Pterodactyl Gnus 0.95. @end ifinfo @@ -2721,6 +2721,11 @@ Move the current group to some other topic (@code{gnus-topic-move-group}). This command uses the process/prefix convention (@pxref{Process/Prefix}). +@item T j +@kindex T j (Topic) +@findex gnus-topic-jump-to-topic +Go to a topic (@code{gnus-topic-jump-to-topic}). + @item T c @kindex T c (Topic) @findex gnus-topic-copy-group @@ -8347,6 +8352,11 @@ Prompt for a file name, and then save the @sc{mime} object Copy the @sc{mime} object to a fresh buffer and display this buffer (@code{gnus-mime-copy-part}). +@findex gnus-mime-view-part-as-type +@item t (Article) +View the @sc{mime} object as if it were a different @sc{mime} media type +(@code{gnus-mime-view-part-as-type}. + @findex gnus-mime-pipe-part @item | (Article) Output the @sc{mime} object to a process (@code{gnus-mime-pipe-part}). diff --git a/texi/message.texi b/texi/message.texi index c394868..9cb2fa4 100644 --- a/texi/message.texi +++ b/texi/message.texi @@ -1,7 +1,7 @@ \input texinfo @c -*-texinfo-*- @setfilename message -@settitle Pterodactyl Message 0.93 Manual +@settitle Pterodactyl Message 0.95 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.93 Manual +@title Pterodactyl Message 0.95 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.93. Message is +This manual corresponds to Pterodactyl Message 0.95. Message is distributed with the Gnus distribution bearing the same version number as this manual.