From 4e88b276120e91668e2bf14a87830c64f9750792 Mon Sep 17 00:00:00 2001 From: yamaoka Date: Mon, 18 Feb 2002 02:10:47 +0000 Subject: [PATCH] Synch with Oort Gnus. --- GNUS-NEWS | 24 +++- lisp/ChangeLog | 64 +++++++++ lisp/gnus-agent.el | 7 + lisp/gnus-art.el | 129 +++++++++++------ lisp/gnus-msg.el | 12 +- lisp/gnus-soup.el | 2 +- lisp/gnus-sum.el | 4 +- lisp/gnus-util.el | 8 +- lisp/gnus.el | 6 +- lisp/message-utils.el | 375 +++++++++++++++++++++++++++++++++++++++++++++++++ lisp/message.el | 2 +- lisp/mm-decode.el | 42 ++++-- lisp/mm-view.el | 173 +++++++++++++++++------ texi/ChangeLog | 13 ++ texi/gnus-ja.texi | 64 ++++++--- texi/gnus.texi | 48 +++++-- texi/gnusref.tex | 7 + 17 files changed, 832 insertions(+), 148 deletions(-) create mode 100644 lisp/message-utils.el diff --git a/GNUS-NEWS b/GNUS-NEWS index 5894bd6..8e64d5d 100644 --- a/GNUS-NEWS +++ b/GNUS-NEWS @@ -1,5 +1,5 @@ GNUS NEWS -- history of user-visible changes. -Copyright (C) 1999, 2000, 2001 Free Software Foundation, Inc. +Copyright (C) 1999, 2000, 2001, 2002 Free Software Foundation, Inc. See the end for copying conditions. Please send Gnus bug reports to bugs@gnus.org. @@ -8,6 +8,26 @@ For older news, see Gnus info node "New Features". * Changes in Oort Gnus +** (require 'gnus-load) + +If you use a stand-alone Gnus distribution, you'd better add (require +'gnus-load) into your ~/.emacs after adding the Gnus lisp directory +into load-path. + +File gnus-load.el contains autoload commands, functions and variables, +some of which may not be included in distributions of Emacsen. + +** gnus-slave-unplugged + +A new command which starts gnus offline in slave mode. + +** message-insinuate-rmail + +Adding (message-insinuate-rmail) and (setq mail-user-agent +'gnus-user-agent) in .emacs convinces RMAIL to compose, reply and +forward messages in message-mode, where you can enjoy the power of +MML. + ** message-minibuffer-local-map The line below enables BBDB in resending a message: @@ -206,7 +226,7 @@ ever-changing layouts. ---------------------------------------------------------------------- Copyright information: -Copyright (C) 1999, 2000, 2001 Free Software Foundation, Inc. +Copyright (C) 1999, 2000, 2001, 2002 Free Software Foundation, Inc. Permission is granted to anyone to make or distribute verbatim copies of this document as received, in any medium, provided that the diff --git a/lisp/ChangeLog b/lisp/ChangeLog index d38dd52..976fae3 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,67 @@ +2002-02-17 ShengHuo ZHU + + Some ideas is inspired by code from Hrvoje Niksic + + + * gnus-art.el (gnus-article-wash-function): Set the default to + nil, so that we use mm-text-html-renderer instead. + (article-wash-html): Use mm-text-html-renderer. + + * mm-decode.el (mm-inline-media-tests): Use mm-inline-text-*. + (mm-text-html-renderer): New variable. + (mm-inline-text-html-renderer): Set the default to nil, so that we + use mm-text-html-renderer instead. + + * mm-view.el (mm-inline-text-html): New function. + (mm-text-html-renderer-alist): New variable. + (mm-inline-text-vcard): New function. + (mm-inline-text): Split. + (mm-links-remove-leading-blank): New function. + (mm-inline-render-with-file): New function. + (mm-inline-render-with-stdin): New function. + (mm-inline-render-with-function): New function. + (mm-text-html-washer-alist): New variable. + (mm-inline-wash-with-file): New function. + (mm-inline-wash-with-stdin): New function. + +2002-02-17 ShengHuo ZHU + + * message-utils.el: Fix installation doc. + From: Reiner Steib <4uce.02.r.steib@gmx.net> + +2002-02-16 ShengHuo ZHU + + * gnus-msg.el (gnus-discouraged-post-methods): New variable. + (gnus-post-method): Use it. + (gnus-summary-cancel-article): Find the correct post-method. + + * gnus-soup.el (gnus-soup-send-packet): Via ... using ... + * message.el (message-send-news): Ditto. + Suggested by Lloyd Zusman and IPmonger + + + * gnus.el (gnus-select-method): Fix doc. + (gnus-server-string): Use 'using nntp'. + + * gnus-agent.el (gnus-slave-unplugged): New command. + From: Felix Natter + +2002-02-15 ShengHuo ZHU + + * gnus-art.el (gnus-article-edit-done): Kill-all-local-variables. + Call edit-done-function first, then change the window + configuration. + (gnus-article-edit-mode-map): Add message key bindings. Add menu. + (gnus-article-edit-mode): mml-mode. + + * gnus-util.el (gnus-byte-compile): Work around a bug in XEmacs + 21.4. Suggested by Russ Allbery . + + * message-utils.el: Adopt the file. + + * message-utils.el: New file. + From Holger Schauer + 2002-02-14 ShengHuo ZHU * gnus-sum.el (gnus-summary-move-article): Select-article only diff --git a/lisp/gnus-agent.el b/lisp/gnus-agent.el index 094f9e9..35229ce 100644 --- a/lisp/gnus-agent.el +++ b/lisp/gnus-agent.el @@ -405,6 +405,13 @@ If this is `ask' the hook will query the user." (gnus)) ;;;###autoload +(defun gnus-slave-unplugged (&optional arg) + "Read news as a slave unplugged." + (interactive "P") + (setq gnus-plugged nil) + (gnus arg nil 'slave)) + +;;;###autoload (defun gnus-agentize () "Allow Gnus to be an offline newsreader. The normal usage of this command is to put the following as the diff --git a/lisp/gnus-art.el b/lisp/gnus-art.el index bc3bc20..bd3d950 100644 --- a/lisp/gnus-art.el +++ b/lisp/gnus-art.el @@ -1305,15 +1305,8 @@ It is a string, such as \"PGP\". If nil, ask user." :type 'string :group 'mime-security) -(defcustom gnus-article-wash-function - (cond ((locate-library "w3") - 'gnus-article-wash-html-with-w3) - ((locate-library "w3m") - 'gnus-article-wash-html-with-w3m)) - "Function used for converting HTML into text." - :type '(radio (function-item gnus-article-wash-html-with-w3) - (function-item gnus-article-wash-html-with-w3m)) - :group 'gnus-article) +(defvar gnus-article-wash-function nil + "Function used for converting HTML into text.") ;;; Internal variables @@ -2314,7 +2307,15 @@ If READ-CHARSET, ask for a coding system." (save-window-excursion (save-restriction (narrow-to-region (point) (point-max)) - (funcall gnus-article-wash-function)))))) + (let* ((func (or gnus-article-wash-function mm-text-html-renderer)) + (entry (assq func mm-text-html-washer-alist))) + (if entry + (setq func (cdr entry))) + (cond + ((gnus-functionp func) + (funcall func)) + (t + (apply (car func) (cdr func)))))))))) (defun gnus-article-wash-html-with-w3 () "Wash the current buffer with w3." @@ -5456,17 +5457,67 @@ T-gnus change: Insert an article into `gnus-original-article-buffer'." ;; Should we be using derived.el for this? (unless gnus-article-edit-mode-map - (setq gnus-article-edit-mode-map (make-sparse-keymap)) + (setq gnus-article-edit-mode-map (make-keymap)) (set-keymap-parent gnus-article-edit-mode-map text-mode-map) (gnus-define-keys gnus-article-edit-mode-map + "\C-c?" describe-mode "\C-c\C-c" gnus-article-edit-done - "\C-c\C-k" gnus-article-edit-exit) + "\C-c\C-k" gnus-article-edit-exit + "\C-c\C-f\C-t" message-goto-to + "\C-c\C-f\C-o" message-goto-from + "\C-c\C-f\C-b" message-goto-bcc + ;;"\C-c\C-f\C-w" message-goto-fcc + "\C-c\C-f\C-c" message-goto-cc + "\C-c\C-f\C-s" message-goto-subject + "\C-c\C-f\C-r" message-goto-reply-to + "\C-c\C-f\C-n" message-goto-newsgroups + "\C-c\C-f\C-d" message-goto-distribution + "\C-c\C-f\C-f" message-goto-followup-to + "\C-c\C-f\C-m" message-goto-mail-followup-to + "\C-c\C-f\C-k" message-goto-keywords + "\C-c\C-f\C-u" message-goto-summary + "\C-c\C-f\C-i" message-insert-or-toggle-importance + "\C-c\C-f\C-a" message-gen-unsubscribed-mft + "\C-c\C-b" message-goto-body + "\C-c\C-i" message-goto-signature + + "\C-c\C-t" message-insert-to + "\C-c\C-n" message-insert-newsgroups + "\C-c\C-o" message-sort-headers + "\C-c\C-e" message-elide-region + "\C-c\C-v" message-delete-not-region + "\C-c\C-z" message-kill-to-signature + "\M-\r" message-newline-and-reformat + "\C-c\C-a" mml-attach-file + "\C-a" message-beginning-of-line + "\t" message-tab + "\M-;" comment-region) (gnus-define-keys (gnus-article-edit-wash-map "\C-c\C-w" gnus-article-edit-mode-map) "f" gnus-article-edit-full-stops)) +(easy-menu-define + gnus-article-edit-mode-field-menu gnus-article-edit-mode-map "" + '("Field" + ["Fetch To" message-insert-to t] + ["Fetch Newsgroups" message-insert-newsgroups t] + "----" + ["To" message-goto-to t] + ["From" message-goto-from t] + ["Subject" message-goto-subject t] + ["Cc" message-goto-cc t] + ["Reply-To" message-goto-reply-to t] + ["Summary" message-goto-summary t] + ["Keywords" message-goto-keywords t] + ["Newsgroups" message-goto-newsgroups t] + ["Followup-To" message-goto-followup-to t] + ["Mail-Followup-To" message-goto-mail-followup-to t] + ["Distribution" message-goto-distribution t] + ["Body" message-goto-body t] + ["Signature" message-goto-signature t])) + (define-derived-mode gnus-article-edit-mode text-mode "Article Edit" "Major mode for editing articles. This is an extended text-mode. @@ -5476,6 +5527,9 @@ This is an extended text-mode. (make-local-variable 'gnus-prev-winconf) (set (make-local-variable 'font-lock-defaults) '(message-font-lock-keywords t)) + (set (make-local-variable 'mail-header-separator) "") + (easy-menu-add message-mode-field-menu message-mode-map) + (mml-mode) (setq buffer-read-only nil) (buffer-enable-undo) (widen)) @@ -5517,39 +5571,30 @@ groups." (interactive "P") (let ((func gnus-article-edit-done-function) (buf (current-buffer)) - (start (window-start))) + (start (window-start)) + (p (point)) + (winconf gnus-prev-winconf)) (remove-hook 'gnus-article-mode-hook 'gnus-article-mime-edit-article-unwind) - ;; We remove all text props from the article buffer. - (let ((content - (buffer-substring-no-properties (point-min) (point-max))) - (p (point))) - (erase-buffer) - (insert content) - (let ((winconf gnus-prev-winconf)) - (gnus-article-mode) - (set-window-configuration winconf) - ;; Tippy-toe some to make sure that point remains where it was. - (save-current-buffer - (set-buffer buf) - (set-window-start (get-buffer-window (current-buffer)) start) - (goto-char p)))) + (funcall func arg) + (set-buffer buf) + ;; The cache and backlog have to be flushed somewhat. + (when gnus-keep-backlog + (gnus-backlog-remove-article + (car gnus-article-current) (cdr gnus-article-current))) + ;; Flush original article as well. (save-excursion - (set-buffer buf) - (let ((buffer-read-only nil)) - (funcall func arg)) - ;; The cache and backlog have to be flushed somewhat. - (when gnus-keep-backlog - (gnus-backlog-remove-article - (car gnus-article-current) (cdr gnus-article-current))) - ;; Flush original article as well. - (save-excursion - (when (get-buffer gnus-original-article-buffer) - (set-buffer gnus-original-article-buffer) - (setq gnus-original-article nil))) - (when gnus-use-cache - (gnus-cache-update-article - (car gnus-article-current) (cdr gnus-article-current)))) + (when (get-buffer gnus-original-article-buffer) + (set-buffer gnus-original-article-buffer) + (setq gnus-original-article nil))) + (when gnus-use-cache + (gnus-cache-update-article + (car gnus-article-current) (cdr gnus-article-current))) + ;; We remove all text props from the article buffer. + (kill-all-local-variables) + (gnus-set-text-properties (point-min) (point-max) nil) + (gnus-article-mode) + (set-window-configuration winconf) (set-buffer buf) (set-window-start (get-buffer-window buf) start) (set-window-point (get-buffer-window buf) (point)))) diff --git a/lisp/gnus-msg.el b/lisp/gnus-msg.el index 1202bdb..e0e4c58 100644 --- a/lisp/gnus-msg.el +++ b/lisp/gnus-msg.el @@ -218,6 +218,14 @@ use this option with care." :group 'gnus-message :type '(repeat (symbol :tab "Variable"))) +(defcustom gnus-discouraged-post-methods + '(nndraft nnml nnimap nnmaildir nnmh nnfolder nndir) + "A list of back ends that are not used in \"real\" newsgroups. +This variable is used only when `gnus-post-method' is `current'." + :version "21.3" + :group 'gnus-group-foreign + :type '(repeat (symbol :tab "Back end"))) + ;;; Internal variables. (defvar gnus-inhibit-posting-styles nil @@ -705,7 +713,7 @@ post using the current select method." (let ((articles (gnus-summary-work-articles n)) (message-post-method `(lambda (arg) - (gnus-post-method (not (eq symp 'a)) ,gnus-newsgroup-name))) + (gnus-post-method (eq ',symp 'a) ,gnus-newsgroup-name))) article) (while (setq article (pop articles)) (when (gnus-summary-select-article t nil nil article) @@ -948,7 +956,7 @@ If SILENT, don't prompt the user." method-alist)))) ;; Override normal method. ((and (eq gnus-post-method 'current) - (not (eq (car group-method) 'nndraft)) + (not (memq (car group-method) gnus-discouraged-post-methods)) (gnus-get-function group-method 'request-post t)) (assert (not arg)) group-method) diff --git a/lisp/gnus-soup.el b/lisp/gnus-soup.el index 1461b33..baa6c2b 100644 --- a/lisp/gnus-soup.el +++ b/lisp/gnus-soup.el @@ -556,7 +556,7 @@ Return whether the unpacking was successful." result) (run-hooks 'message-send-news-hook) (gnus-open-server method) - (message "Sending news with %s..." + (message "Sending news via %s..." (gnus-server-string method)) (unless (let ((mail-header-separator "")) (gnus-request-post method)) diff --git a/lisp/gnus-sum.el b/lisp/gnus-sum.el index f9b533f..fc3a99d 100644 --- a/lisp/gnus-sum.el +++ b/lisp/gnus-sum.el @@ -310,13 +310,13 @@ higest-scored article), `unseen' (place point on the subject line of the first unseen article), 'unseen-or-unread' (place point on the subject line of the first unseen article or, if all article have been seen, on the subject line of the first unread article), or a function to be called to -place point on some subject line.." +place point on some subject line." :group 'gnus-group-select :type '(choice (const best) (const unread) (const first) (const unseen) - (const unseen-or-unread))) + (const unseen-or-unread))) (defcustom gnus-dont-select-after-jump-to-other-group nil "If non-nil, don't select the first unread article after entering the diff --git a/lisp/gnus-util.el b/lisp/gnus-util.el index 931f14a..4874d1b 100644 --- a/lisp/gnus-util.el +++ b/lisp/gnus-util.el @@ -1179,7 +1179,9 @@ Return the modified alist." (string-equal (downcase x) (downcase y))))) (defcustom gnus-use-byte-compile t - "If non-nil, byte-compile crucial run-time codes." + "If non-nil, byte-compile crucial run-time codes. +Setting it to `nil' has no effect after first time running +`gnus-byte-compile'." :type 'boolean :version "21.1" :group 'gnus-various) @@ -1188,6 +1190,10 @@ Return the modified alist." "Byte-compile FORM if `gnus-use-byte-compile' is non-nil." (if gnus-use-byte-compile (progn + (condition-case nil + ;; Work around a bug in XEmacs 21.4 + (require 'byte-optimize) + (error)) (require 'bytecomp) (defalias 'gnus-byte-compile 'byte-compile) (byte-compile form)) diff --git a/lisp/gnus.el b/lisp/gnus.el index 86cc938..ce85a84 100644 --- a/lisp/gnus.el +++ b/lisp/gnus.el @@ -1122,8 +1122,8 @@ used to 899, you would say something along these lines: This variable should be a list, where the first element is how the news is to be fetched, the second is the address. -For instance, if you want to get your news via NNTP from -\"flab.flab.edu\", you could say: +For instance, if you want to get your news via \"flab.flab.edu\" using +NNTP, you could say: \(setq gnus-select-method '(nntp \"flab.flab.edu\")) @@ -3276,7 +3276,7 @@ If NEWSGROUP is nil, return the global kill file name instead." (address (nth 1 server))) (if (and address (not (zerop (length address)))) - (format "%s via %s" address (car server)) + (format "%s using %s" address (car server)) (format "%s" (car server))))) (defun gnus-find-method-for-group (group &optional info) diff --git a/lisp/message-utils.el b/lisp/message-utils.el new file mode 100644 index 0000000..c782aad --- /dev/null +++ b/lisp/message-utils.el @@ -0,0 +1,375 @@ +;;; message-utils.el -- utils for message-mode + +;; Copyright (C) 2002 Free Software Foundation, Inc. + +;; Author: Holger Schauer +;; Keywords: utils message + +;; This file is part of GNU Emacs. + +;; GNU Emacs is free software; you can redistribute it and/or modify +;; it under the terms of the GNU General Public License as published by +;; the Free Software Foundation; either version 2 of the License, or +;; (at your option) any later version. +;; +;; GNU Emacs is distributed in the hope that it will be useful, +;; but WITHOUT ANY WARRANTY; without even the implied warranty of +;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +;; GNU General Public License for more details. +;; +;; You should have received a copy of the GNU General Public License +;; along with GNU Emacs; see the file COPYING. If not, write to the +;; Free Software Foundation, Inc., 59 Temple Place - Suite 330, +;; Boston, MA 02111-1307, USA. + +;;; Commentary: + +;; This file contains some small additions to message mode: +;; * inserting files in a message and explicit marking it +;; as something somebody else has created, +;; * change Subject: header and add (was: ) +;; * strip (was: ) from Subject: headers +;; * add a X-No-Archieve: Yes header and a note in the body +;; * a function for cross-post and followup-to messages +;; * replace To: header with contents of Cc: or Bcc: header. +;; + +;; This file is adopt from the link below when the revision is 0.8. +;; http://www.coling.uni-freiburg.de/~schauer/resources/emacs/message-utils.el.gz + +;;; Installation: (TODO: merge into message.el) + +;; .. is easy as in most cases. Add +;; (autoload 'message-mark-inserted-region "message-utils" nil t) +;; (autoload 'message-mark-insert-file "message-utils" nil t) +;; (autoload 'message-strip-subject-was "message-utils" nil t) +;; (autoload 'message-change-subject "message-utils" nil t) +;; (autoload 'message-xpost-fup2 "message-utils" nil t) +;; (autoload 'message-add-archive-header "message-utils" nil t) +;; (autoload 'message-reduce-to-to-cc "message-utils" nil t) +;; as well as some keybindings like +;; (define-key message-mode-map '[(control c) m] 'message-mark-inserted-region) +;; (define-key message-mode-map '[(control c) f] 'message-mark-insert-file) +;; (define-key message-mode-map '[(control c) x] 'message-xpost-fup2) +;; (define-key message-mode-map '[(control c) s] 'message-change-subject) +;; (define-key message-mode-map '[(control c) a] 'message-add-archive-header) +;; (define-key message-mode-map '[(control c) t] 'message-reduce-to-to-cc) +;; (add-hook 'message-header-setup-hook 'message-strip-subject-was) +;; to your .gnus or to your .emacs. +;; You might also want to add something along the following lines: +;; (defun message-utils-setup () +;; "Add menu-entries for message-utils." +;; (easy-menu-add-item nil '("Message") +;; ["Insert Region Marked" message-mark-inserted-region t] "Spellcheck") +;; (easy-menu-add-item nil '("Message") +;; ["Insert File Marked" message-mark-insert-file t] "Spellcheck") +;; (easy-menu-add-item nil '("Field") +;; ["Crosspost / Followup" message-xpost-fup2 t] "----") +;; (easy-menu-add-item nil '("Field") +;; ["New Subject" message-change-subject t] "----") +;; (easy-menu-add-item nil '("Field") +;; ["Reduce To: to Cc:" message-reduce-to-to-cc t] "----") +;; (easy-menu-add-item nil '("Field") +;; [ "X-No-Archive:" message-add-archive-header t ])) +;; (add-hook 'message-mode-hook 'message-utils-setup) + +;;; Code: + +(require 'message) + +;;; ************** +;;; Inserting and marking ... + +; We try to hook the vars into the message customize group + +(defcustom message-begin-inserted-text-mark +"--8<------------------------schnipp------------------------->8---\n" +"How to mark the beginning of some inserted text." + :type 'string + :group 'message-various) + +(defcustom message-end-inserted-text-mark +"--8<------------------------schnapp------------------------->8---\n" +"How to mark the end of some inserted text." + :type 'string + :group 'message-various) + +;;;###autoload +(defun message-mark-inserted-region (beg end) + "Mark some region in the current article with enclosing tags. +See `message-begin-inserted-text-mark' and `message-end-inserted-text-mark'." + (interactive "r") + (save-excursion + ; add to the end of the region first, otherwise end would be invalid + (goto-char end) + (insert message-end-inserted-text-mark) + (goto-char beg) + (insert message-begin-inserted-text-mark))) + +;;;###autoload +(defun message-mark-insert-file (file) + "Inserts FILE at point, marking it with enclosing tags. +See `message-begin-inserted-text-mark' and `message-end-inserted-text-mark'." + (interactive "fFile to insert: ") + ;; reverse insertion to get correct result. + (let ((p (point))) + (insert message-end-inserted-text-mark) + (goto-char p) + (insert-file-contents file) + (goto-char p) + (insert message-begin-inserted-text-mark))) + +;;; ************** +;;; Subject mangling + +(defcustom message-subject-was-regexp + "[ \t]*\\((*[Ww][Aa][SsRr]:[ \t]*.*)\\)" + "*Regexp matching \"(was: )\" in the subject line." + :group 'message-various + :type 'regexp) + +;;;###autoload +(defun message-strip-subject-was () + "Remove trailing \"(Was: )\" from subject lines." + (message-narrow-to-head) + (let* ((subject (message-fetch-field "Subject")) + (pos)) + (cond (subject + (setq pos (or (string-match message-subject-was-regexp subject) 0)) + (cond ((> pos 0) + (message-goto-subject) + (message-delete-line) + (insert (concat "Subject: " + (substring subject 0 pos) "\n"))))))) + (widen)) + +;;; Suggested by Jonas Steverud @ www.dtek.chalmers.se/~d4jonas/ +;;;###autoload +(defun message-change-subject (new-subject) + "Ask for new Subject: header, append (was: )." + (interactive + (list + (read-from-minibuffer "New subject: "))) + (cond ((and (not (or (null new-subject) ; new subject not empty + (zerop (string-width new-subject)) + (string-match "^[ \t]*$" new-subject)))) + (save-excursion + (let ((old-subject (message-fetch-field "Subject"))) + (cond ((not (string-match + (concat "^[ \t]*" + (regexp-quote new-subject) + " \t]*$") + old-subject)) ; yes, it really is a new subject + ;; delete eventual Re: prefix + (setq old-subject + (message-strip-subject-re old-subject)) + (message-goto-subject) + (message-delete-line) + (insert (concat "Subject: " + new-subject + " (was: " + old-subject ")\n"))))))))) + + +;;; ************** +;;; X-Archive-Header: No + +(defcustom message-archive-header + "X-No-Archive: Yes\n" + "Header to insert when you don't want your article to be archived by deja.com." + :type 'string + :group 'message-various) + +(defcustom message-archive-note + "X-No-Archive: Yes - save http://deja.com/" + "Note to insert why you wouldn't want this posting archived." + :type 'string + :group 'message-various) + +(defun message-add-archive-header () + "Insert \"X-No-Archive: Yes\" in the header and a note in the body. +When called with a prefix argument, ask for a text to insert." + (interactive) + (if current-prefix-arg + (setq message-archive-note + (read-from-minibuffer "Reason for No-Archive: " + (cons message-archive-note 0)))) + (save-excursion + (insert message-archive-note) + (newline) + (message-add-header message-archive-header) + (message-sort-headers))) + +;;; ************** +;;; Crossposts and Followups + +; inspired by JoH-followup-to by Jochem Huhman +; new suggestions by R. Weikusat + +(defvar message-xpost-old-target nil + "Old target for cross-posts or follow-ups.") +(make-variable-buffer-local 'message-xpost-old-target) + +(defcustom message-xpost-default t + "When non-nil `mesage-xpost-fup2' will normally perform a crosspost. +If nil, `message-xpost-fup2' will only do a followup. Note that you +can explicitly override this setting by calling `message-xpost-fup2' +with a prefix." + :type 'boolean + :group 'message-various) + +(defun message-xpost-fup2-header (target-group) + "Mangles FollowUp-To and Newsgroups header to point to TARGET-GROUP. +With prefix-argument just set Follow-Up, don't cross-post." + (interactive + (list ; Completion based on Gnus + (completing-read "Follwup To: " + (if (boundp 'gnus-newsrc-alist) + gnus-newsrc-alist) + nil nil '("poster" . 0) + (if (boundp 'gnus-group-history) + 'gnus-group-history)))) + (message-remove-header "Follow[Uu]p-[Tt]o" t) + (message-goto-newsgroups) + (beginning-of-line) + ;; if we already did a crosspost before, kill old target + (if (and message-xpost-old-target + (re-search-forward + (regexp-quote (concat "," message-xpost-old-target)) + nil t)) + (replace-match "")) + ;; unless (followup is to poster or user explicitly asked not + ;; to cross-post, or target-group is already in Newsgroups) + ;; add target-group to Newsgroups line. + (cond ((and (or (and message-xpost-default (not current-prefix-arg)) ; def: xpost, req:no + (and (not message-xpost-default) current-prefix-arg)) ; def: no-xpost, req:yes + (not (string-match "poster" target-group)) + (not (string-match (regexp-quote target-group) + (message-fetch-field "Newsgroups")))) + (end-of-line) + (insert-string (concat "," target-group)))) + (end-of-line) ; ensure Followup: comes after Newsgroups: + ;; unless new followup would be identical to Newsgroups line + ;; make a new Followup-To line + (if (not (string-match (concat "^[ \t]*" + target-group + "[ \t]*$") + (message-fetch-field "Newsgroups"))) + (insert (concat "\nFollowup-To: " target-group))) + (setq message-xpost-old-target target-group)) + + +(defcustom message-xpost-note + "Crosspost & Followup-To: " + "Note to insert before signature to notify of xpost and follow-up." + :type 'string + :group 'message-various) + +(defcustom message-fup2-note + "Followup-To: " + "Note to insert before signature to notify of follow-up only." + :type 'string + :group 'message-various) + +(defun message-xpost-insert-note (target-group xpost in-old old-groups) + "Insert a in message body note about a set Followup or Crosspost. +If there have been previous notes, delete them. TARGET-GROUP specifies the +group to Followup-To. When XPOST is t, insert note about +crossposting. IN-OLD specifies whether TARGET-GROUP is a member of +OLD-GROUPS. OLD-GROUPS lists the old-groups the posting would have +been made to before the user asked for a Crosspost." + ;; start scanning body for previous uses + (message-goto-signature) + (let ((head (re-search-backward + (concat "^" mail-header-separator) + nil t))) ; just search in body + (message-goto-signature) + (while (re-search-backward + (concat "^" (regexp-quote message-xpost-note) ".*") + head t) + (message-delete-line)) + (message-goto-signature) + (while (re-search-backward + (concat "^" (regexp-quote message-fup2-note) ".*") + head t) + (message-delete-line)) + ;; insert new note + (message-goto-signature) + (previous-line 2) + (open-line 1) + (if (or in-old + (not xpost) + (string-match "^[ \t]*poster[ \t]*$" target-group)) + (insert (concat message-fup2-note target-group "\n")) + (insert (concat message-xpost-note target-group "\n"))))) + +(defcustom message-xpost-note-function + 'message-xpost-insert-note + "Function to use to insert note about Crosspost or Followup-To. +The function will be called with four arguments. The function should not +only insert a note, but also ensure old notes are deleted. See the +documentation for `message-xpost-insert-note'. " + :type 'function + :group 'message-various) + +;;;###autoload +(defun message-xpost-fup2 (target-group) + "Crossposts message and sets Followup-To to TARGET-GROUP. +With prefix-argument just set Follow-Up, don't cross-post." + (interactive + (list ; Completion based on Gnus + (completing-read "Follwup To: " + (if (boundp 'gnus-newsrc-alist) + gnus-newsrc-alist) + nil nil '("poster" . 0) + (if (boundp 'gnus-group-history) + 'gnus-group-history)))) + (cond ((not (or (null target-group) ; new subject not empty + (zerop (string-width target-group)) + (string-match "^[ \t]*$" target-group))) + (save-excursion + (let* ((old-groups (message-fetch-field "Newsgroups")) + (in-old (string-match + (regexp-quote target-group) old-groups))) + ;; check whether target exactly matches old Newsgroups + (cond ((or (not in-old) + (not (string-match + (concat "^[ \t]*" + (regexp-quote target-group) + "[ \t]*$") + old-groups))) + ;; yes, Newsgroups line must change + (message-xpost-fup2-header target-group) + ;; insert note whether we do xpost or fup2 + (funcall message-xpost-note-function + target-group + (if (or (and message-xpost-default (not current-prefix-arg)) + (and (not message-xpost-default) current-prefix-arg)) + t) + in-old old-groups)))))))) + + +;;; ************** +;;; Reduce To: to Cc: or Bcc: header + +(defun message-reduce-to-to-cc () + "Replace contents of To: header with contents of Cc: or Bcc: header." + (interactive) + (let ((cc-content (message-fetch-field "cc")) + (bcc nil)) + (if (and (not cc-content) + (setq cc-content (message-fetch-field "bcc"))) + (setq bcc t)) + (cond (cc-content + (save-excursion + (message-goto-to) + (message-delete-line) + (insert (concat "To: " cc-content "\n")) + (message-remove-header (if bcc + "bcc" + "cc"))))))) + +;;; provide ourself +(provide 'message-utils) + +;;; message-utils.el ends here diff --git a/lisp/message.el b/lisp/message.el index 36d7ef1..f62c295 100644 --- a/lisp/message.el +++ b/lisp/message.el @@ -3695,7 +3695,7 @@ Otherwise, generate and save a value for `canlock-password' first." (backward-char 1) (run-hooks 'message-send-news-hook) (gnus-open-server method) - (message "Sending news with %s..." (gnus-server-string method)) + (message "Sending news via %s..." (gnus-server-string method)) (gnus-request-post method) )) diff --git a/lisp/mm-decode.el b/lisp/mm-decode.el index 7a9d5bd..6883c97 100644 --- a/lisp/mm-decode.el +++ b/lisp/mm-decode.el @@ -31,6 +31,7 @@ (require 'term)) (eval-and-compile + (autoload 'executable-find "executable") (autoload 'mm-inline-partial "mm-partial") (autoload 'mm-inline-external-body "mm-extern") (autoload 'mm-insert-inline "mm-view")) @@ -95,20 +96,30 @@ `(list ,buffer ,type ,encoding ,undisplayer ,disposition ,description ,cache ,id)) -(defcustom mm-inline-text-html-renderer - (cond ((locate-library "w3") - 'mm-inline-text-html-render-with-w3) - ((locate-library "w3m") - 'mm-inline-text-html-render-with-w3m)) - "Function used for rendering HTML contents. The function will be -called with a MIME handle as the argument. There are two pre-defined -functions: `mm-inline-text-html-render-with-w3', which uses Emacs/w3; -and `mm-inline-text-html-render-with-w3m', which uses emacs-w3m." - :type '(radio (function-item mm-inline-text-html-render-with-w3) - (function-item mm-inline-text-html-render-with-w3m) - (function)) +(defcustom mm-text-html-renderer + (cond ((locate-library "w3") 'w3) + ((locate-library "w3m") 'w3m) + ((executable-find "links") 'links) + ((executable-find "lynx") 'lynx)) + "Render of HTML contents. +It is one of defined renderer types, or a rendering function. +The defined renderer types are: +`w3' : using Emacs/W3; +`w3m' : using emacs-w3m; +`links': using links; +`lynx' : using lynx." + :type '(choice (symbol w3) + (symbol w3m) + (symbol links) + (symbol lynx) + (function)) + :version "21.3" :group 'mime-display) +(defvar mm-inline-text-html-renderer nil + "Function used for rendering inline HTML contents. +It is suggested to customize `mm-text-html-renderer' instead.") + (defcustom mm-inline-text-html-with-images nil "If non-nil, Gnus will allow retrieving images in the HTML contents with tags. It has no effect on Emacs/w3. For emacs-w3m, the @@ -174,11 +185,12 @@ images, however this behavior may be changed in the future." ("application/emacs-lisp" mm-display-elisp-inline identity) ("application/x-emacs-lisp" mm-display-elisp-inline identity) ("text/html" - mm-inline-text + mm-inline-text-html (lambda (handle) - (gnus-functionp mm-inline-text-html-renderer))) + (or mm-inline-text-html-renderer + mm-text-html-renderer))) ("text/x-vcard" - mm-inline-text + mm-inline-text-vcard (lambda (handle) (or (featurep 'vcard) (locate-library "vcard")))) diff --git a/lisp/mm-view.el b/lisp/mm-view.el index a28c5ff..534bfd7 100644 --- a/lisp/mm-view.el +++ b/lisp/mm-view.el @@ -37,6 +37,28 @@ (unless (fboundp 'diff-mode) (autoload 'diff-mode "diff-mode" "" t nil))) +(defvar mm-text-html-renderer-alist + '((w3 . mm-inline-text-html-render-with-w3) + (w3m . mm-inline-text-html-render-with-w3m) + (links mm-inline-render-with-file + mm-links-remove-leading-blank + "links" "-dump" file) + (lynx mm-inline-render-with-stdin nil + "lynx" "-dump" "-force_html" "-stdin")) + "The attributes of renderer types.") + +(defvar mm-text-html-washer-alist + '((w3 . gnus-article-wash-html-with-w3) + (w3m . gnus-article-wash-html-with-w3m) + (links mm-inline-wash-with-file + mm-links-remove-leading-blank + "links" "-dump" file) + (lynx mm-inline-wash-with-stdin nil + "lynx" "-dump" "-force_html" "-stdin")) + "The attributes of washer types.") + +;;; Internal variables. + ;;; ;;; Functions for displaying various formats inline ;;; @@ -279,55 +301,114 @@ will not be substituted.") (delete-region ,(point-min-marker) ,(point-max-marker)))))))) -(defun mm-inline-text (handle) - (let ((type (mm-handle-media-subtype handle)) - buffer-read-only) +(defun mm-links-remove-leading-blank () + ;; Delete the annoying three spaces preceding each line of links + ;; output. + (goto-char (point-min)) + (while (re-search-forward "^ " nil t) + (delete-region (match-beginning 0) (match-end 0)))) + +(defun mm-inline-wash-with-file (post-func cmd &rest args) + (let ((file (make-temp-name + (expand-file-name "mm" mm-tmp-directory)))) + (write-region (point-min) (point-max) file nil 'silent) + (delete-region (point-min) (point-max)) + (unwind-protect + (apply 'call-process cmd nil t nil (mapcar 'eval args)) + (delete-file file)) + (and post-func (funcall post-func)))) + +(defun mm-inline-wash-with-stdin (post-func cmd &rest args) + (apply 'call-process-region (point-min) (point-max) + cmd t t nil args) + (and post-func (funcall post-func))) + +(defun mm-inline-render-with-file (handle post-func cmd &rest args) + (let ((source (mm-get-part handle))) + (mm-insert-inline + handle + (with-temp-buffer + (insert source) + (apply 'mm-inline-wash-with-file post-func cmd args) + (buffer-string))))) + +(defun mm-inline-render-with-stdin (handle post-func cmd &rest args) + (let ((source (mm-get-part handle))) + (mm-insert-inline + handle + (with-temp-buffer + (insert source) + (apply 'mm-inline-wash-with-stdin post-func cmd args) + (buffer-string))))) + +(defun mm-inline-render-with-function (handle func &rest args) + (let ((source (mm-get-part handle))) + (mm-insert-inline + handle + (with-temp-buffer + (insert source) + (apply func args) + (buffer-string))))) + +(defun mm-inline-text-html (handle) + (let* ((func (or mm-inline-text-html-renderer mm-text-html-renderer)) + (entry (assq func mm-text-html-renderer-alist)) + buffer-read-only) + (if entry + (setq func (cdr entry))) (cond - ((equal type "html") - (funcall mm-inline-text-html-renderer handle)) - ((equal type "x-vcard") - (mm-insert-inline - handle - (concat "\n-- \n" - (ignore-errors - (if (fboundp 'vcard-pretty-print) - (vcard-pretty-print (mm-get-part handle)) - (vcard-format-string - (vcard-parse-string (mm-get-part handle) - 'vcard-standard-filter))))))) + ((gnus-functionp func) + (funcall func handle)) (t - (let ((b (point)) - (charset (mail-content-type-get - (mm-handle-type handle) 'charset))) - (if (or (eq charset 'gnus-decoded) - ;; This is probably not entirely correct, but - ;; makes rfc822 parts with embedded multiparts work. - (eq mail-parse-charset 'gnus-decoded)) - (save-restriction - (narrow-to-region (point) (point)) - (mm-insert-part handle) - (goto-char (point-max))) - (insert (mm-decode-string (mm-get-part handle) charset))) - (when (and (equal type "plain") - (equal (cdr (assoc 'format (mm-handle-type handle))) - "flowed")) - (save-restriction - (narrow-to-region b (point)) - (goto-char b) - (fill-flowed) - (goto-char (point-max)))) + (apply (car func) handle (cdr func)))))) + +(defun mm-inline-text-vcard (handle) + (let (buffer-read-only) + (mm-insert-inline + handle + (concat "\n-- \n" + (ignore-errors + (if (fboundp 'vcard-pretty-print) + (vcard-pretty-print (mm-get-part handle)) + (vcard-format-string + (vcard-parse-string (mm-get-part handle) + 'vcard-standard-filter)))))))) + +(defun mm-inline-text (handle) + (let ((b (point)) + (type (mm-handle-media-subtype handle)) + (charset (mail-content-type-get + (mm-handle-type handle) 'charset)) + buffer-read-only) + (if (or (eq charset 'gnus-decoded) + ;; This is probably not entirely correct, but + ;; makes rfc822 parts with embedded multiparts work. + (eq mail-parse-charset 'gnus-decoded)) (save-restriction - (narrow-to-region b (point)) - (set-text-properties (point-min) (point-max) nil) - (when (or (equal type "enriched") - (equal type "richtext")) - (enriched-decode (point-min) (point-max))) - (mm-handle-set-undisplayer - handle - `(lambda () - (let (buffer-read-only) - (delete-region ,(point-min-marker) - ,(point-max-marker))))))))))) + (narrow-to-region (point) (point)) + (mm-insert-part handle) + (goto-char (point-max))) + (insert (mm-decode-string (mm-get-part handle) charset))) + (when (and (equal type "plain") + (equal (cdr (assoc 'format (mm-handle-type handle))) + "flowed")) + (save-restriction + (narrow-to-region b (point)) + (goto-char b) + (fill-flowed) + (goto-char (point-max)))) + (save-restriction + (narrow-to-region b (point)) + (set-text-properties (point-min) (point-max) nil) + (when (or (equal type "enriched") + (equal type "richtext")) + (enriched-decode (point-min) (point-max))) + (mm-handle-set-undisplayer + handle + `(lambda () + (let (buffer-read-only) + (delete-region ,(point-min-marker) + ,(point-max-marker)))))))) (defun mm-insert-inline (handle text) "Insert TEXT inline from HANDLE." diff --git a/texi/ChangeLog b/texi/ChangeLog index 4ba5d65..caacb60 100644 --- a/texi/ChangeLog +++ b/texi/ChangeLog @@ -1,3 +1,16 @@ +2002-02-16 Simon Josefsson + + * gnus.texi (Top): Change description of Posting Server node. + (Composing Messages): Ditto. + (Posting Server): Add some mail stuff. + (IMAP): Terminate @, from Emacs Gnus manual. + (Thwarting Email Spam): Use @sc. + +2002-02-16 ShengHuo ZHU + + * gnusref.tex (subsection*{Notes}): Update. + From: Felix Natter + 2002-02-14 ShengHuo ZHU * gnus.texi (Document Groups): Addition. diff --git a/texi/gnus-ja.texi b/texi/gnus-ja.texi index 1adac97..abc0006 100644 --- a/texi/gnus-ja.texi +++ b/texi/gnus-ja.texi @@ -712,7 +712,8 @@ Article Buffer Composing Messages * Mail:: $B%a!<%k$HJVEz(B -* Posting Server:: $B$I$N%5!<%P!<$rDL$7$FEj9F$9$k$Y$-$+(B? +* Posting Server:: $B$I$N%5!<%P!<$rDL$7$F%K%e!<%9$rEj9F$^$?$O(B + $B%a!<%k$rAw?.$9$k$Y$-$+(B? * Mail and Post:: $BF1;~$K%a!<%k$r=P$7JVEz$9$k(B * Archived Messages:: $BAw$C$?%a%C%;!<%8$r(B gnus $B$,Cy$a$F$*$/$H$3(B $B$m(B @@ -10042,7 +10043,8 @@ GNUS $B$d(B Gnus $B$G$O!"$3$N$?$A$N0-$$LdBj$G6C$+$5$l$J$$$h$&$K$9$k$K$O!"35N, @menu * Mail:: $B%a!<%k$HJVEz(B -* Posting Server:: $B$I$N%5!<%P!<$rDL$7$FEj9F$9$k$Y$-$+(B? +* Posting Server:: $B$I$N%5!<%P!<$rDL$7$F%K%e!<%9$rEj9F$^$?$O(B + $B%a!<%k$rAw?.$9$k$Y$-$+(B? * Mail and Post:: $BF1;~$K%a!<%k$r=P$7JVEz$9$k(B * Archived Messages:: $BAw$C$?%a%C%;!<%8$r(B gnus $B$,Cy$a$F$*$/$H$3(B $B$m(B @@ -10082,15 +10084,18 @@ Superseding} $B$r;2>H$7$F$/$@$5$$!#(B $B?R$M$F$/$l$F$"$j$,$H$&!#$"$J$?$r:($_$^$9!#(B +$B$=$l$OHs>o$KJ#;($K$J$jF@$^$9!#(B + @vindex gnus-post-method -$B$=$l$OHs>o$KJ#;($K$J$jF@$^$9!#IaDL$O!"(Bgnus $B$O9VFIMQ$HF1$8A*BrJ}K!$r;H$C(B -$B$FEj9F$7$^$9(B ($B$3$N$3$H$O!"$"$J$?$,$?$/$5$s$N%0%k!<%W$r0[$J$C$?%5!<%P!<$G(B -$B9VFI$7$F$$$k>l9g$K!"$?$V$sET9g$,NI$$$N$G$9(B)$B!#$7$+$7!"$"$J$?$,9VFI$7$F$$(B -$B$k$=$N%5!<%P!<$,Ej9F$r5v2D$;$:!"FI$`$3$H$N$_$r5v2D$7$F$$$k$N$J$i$P!"$*$=(B -$B$i$/$"$J$?$N(B ($BHs>o$KCNE*$G$H$s$G$b$J$/6=L#?<$$(B) $B5-;v$rEj9F$9$k$?$a$K!"B>(B -$B$N%5!<%P!<$r;H$$$?$$$H;W$&$G$7$g$&!#(B@code{gnus-post-method} $B$rB>$NJ}K!$K(B -$B@_Dj$9$k;v$,$G$-$^$9!#(B +$B%K%e!<%9$rEj9F$9$k$H$-!"DL>o(B Message $B$O(B @code{message-send-news} $B$r8F$S(B +$B=P$7$^$9(B (@pxref{News Variables, , News Variables, message-ja, Message +Manual})$B!#IaDL$O!"(Bgnus $B$O9VFIMQ$HF1$8A*BrJ}K!$r;H$C$FEj9F$7$^$9(B ($B$3$N$3(B +$B$H$O!"$"$J$?$,$?$/$5$s$N%0%k!<%W$r0[$J$C$?%5!<%P!<$G9VFI$7$F$$$k>l9g$K!"(B +$B$?$V$sET9g$,NI$$$N$G$9(B)$B!#$7$+$7!"$"$J$?$,9VFI$7$F$$$k$=$N%5!<%P!<$,Ej9F(B +$B$r5v2D$;$:!"FI$`$3$H$N$_$r5v2D$7$F$$$k$N$J$i$P!"$*$=$i$/$"$J$?$N(B ($BHs>o$K(B +$BCNE*$G$H$s$G$b$J$/6=L#?<$$(B) $B5-;v$rEj9F$9$k$?$a$K!"B>$N%5!<%P!<$r;H$$$?$$(B +$B$H;W$&$G$7$g$&!#(B@code{gnus-post-method} $B$rB>$NJ}K!$K@_Dj$9$k;v$,$G$-$^$9!#(B @lisp (setq gnus-post-method '(nnspool "")) @@ -10110,6 +10115,27 @@ gnus $B$O>o$KEj9F$K$I$NJ}K!$r;H$&$+$r$"$J$?$K?R$M$^$9!#(B $B:G8e$K!"$"$J$?$,$$$D$G$b4pK\$NA*BrJ}K!$r;H$C$FEj9F$7$?$$$N$J$i$P!"$3$NJQ(B $B?t$r(B @code{native} $B$K$7$F2<$5$$!#(B +$B%a!<%k$rAw?.$9$k$H$-$K!"(BMessage $B$O(B @code{message-send-mail-function} $B$r(B +$B8F$S=P$7$^$9!#%G%#%U%)%k%H$N4X(B +$B?t(B @code{message-send-mail-with-sendmail} $B$O5-;v$r=gHVBT$A$KF~(B +$B$l(B (queuing) $B$?$jAw?.$9$k$?$a$K!"%P%$%J%j!<$G(B @code{sendmail} $B$K%Q%$%W$7(B +$B$^$9!#%m!<%+%k%7%9%F%`$,(B @code{sendmail} $B$G%a!<%k$rAw?.$9$k$h$&$K@_Dj$5(B +$B$l$F$$$J$/$F$b!"$"$J$?$,1s3V(B @sc{smtp} $B%5!<%P!<$K@\B3$9$k8"Mx$r;}$C$F$$(B +$B$k$J$i$P!"(B +@code{message-send-mail-function} $B$r(B @code{smtpmail-send-it} $B$K@_Dj$9$k(B +$B$3$H$,$G$-$^$9!#(B@code{smtpmail} $B%Q%C%1!<%8$r;H$&$?$a$K@5$7$$@_Dj$,$J$5$l(B +$B$F$$$k$+$I$&$+3NG'$7$F2<$5$$!#Nc$G$9(B: + +@lisp +(setq message-send-mail-function 'smtpmail-send-it + smtpmail-default-smtp-server "YOUR SMTP HOST") +@end lisp + +$BB>$N2DG=$J(B @code{message-send-mail-function} $B$NA*Br;h(B +$B$O(B @code{message-send-mail-with-mh}, +@code{message-send-mail-with-qmail} $B$*$h$S(B @code{feedmail-send-it} $B$r4^(B +$B$_$^$9!#(B + @node Mail and Post @section $B%a!<%k$HEj9F(B @@ -11567,11 +11593,11 @@ gnus $B$O$U$D$&F1$8J}$r;H$C$F$_$l$P!"5-;v$N.?M?t$KMxMQ$5$l$F$$$k%m!<%+%k%K%e!<%9%0%k!<%W$r9VFI$7$F$$(B $B$^$9!#$=$l$i$O(B @sc{nntp} $B$GG[Aw$5$l$k!"%K%e!<%9!"$G$9!#;d$?$A$O<+J,$N;E(B @@ -16071,7 +16097,7 @@ $ emacs -batch -l ~/.gnus.el -f gnus-agent-batch @item J S @kindex J S ($B%(!<%8%'%s%H(B $B%0%k!<%W(B) @findex gnus-group-send-queue -$B2<=q$-(B (queue) $B%0%k!<%W$K$"$kAw?.2DG=$J%a%C%;!<%8$rA4$FAw?.$9(B +$B=gHVBT$A(B (queue) $B%0%k!<%W$K$"$kAw?.2DG=$J%a%C%;!<%8$rA4$FAw?.$9(B $B$k(B (@code{gnus-group-send-queue})$B!#(B@xref{Drafts}$B!#(B @item J a @@ -20050,10 +20076,10 @@ Gnus $B$O!"%9%3%"IU$1!"%9%l%C%I$N7A@.!"%9%l%C%IHf3S$J$I$r9T$&$H$-$K!"(B @samp{spam} $B%0%k!<%W$K9T$-$^$9!#(B($B$3$N%"%$%G%"$O$*$=$i$/(B Tim Pierce $B;a$K(B $B$h$k$b$N$G$9!#(B) -$B$3$l$K2C$($F!"B?$/$N%a!<%k(B spam $B20$O!"$"$J$?$N$H$3$m$N(B @code{smtp} $B%5!<(B -$B%P!<$HD>@\OC$7!"(B@code{To} $B%X%C%@!<$K$"$J$?$N%a!<%k%"%I%l%9$,L@<($5$l$J$$(B -$B$h$&$K$7$^$9!#$J$s$G$=$s$J$3$H$r$9$k$N$+$O$o$+$j$^$;$s$,(B --- $B$*$=$i$/;d(B -$B$?$A$NN"$r$+$/5!9=$NN"$r$+$/$?$a$+$J(B? $B$I$A$i$K$7$F$b!"BP=h$O4JC1$J$3$H$G(B +$B$3$l$K2C$($F!"B?$/$N%a!<%k(B spam $B20$O!"$"$J$?$N$H$3$m$N(B @sc{smtp} $B%5!<%P!<(B +$B$HD>@\OC$7!"(B@code{To} $B%X%C%@!<$K$"$J$?$N%a!<%k%"%I%l%9$,L@<($5$l$J$$$h$&(B +$B$K$7$^$9!#$J$s$G$=$s$J$3$H$r$9$k$N$+$O$o$+$j$^$;$s$,(B --- $B$*$=$i$/;d$?$A(B +$B$NN"$r$+$/5!9=$NN"$r$+$/$?$a$+$J(B? $B$I$A$i$K$7$F$b!"BP=h$O4JC1$J$3$H$G(B $B$9(B --- $B$"$J$?08$F$G$J$$$b$N$rA4It(B @samp{spam} $B%0%k!<%W$K$$$l$k$@$1$G$9!#(B $B$3$l$O$*9%$_J,N%5,B'$N:G8e$K$3$s$JIw$KF~$l$k$3$H$G$G$-$^$9!#(B diff --git a/texi/gnus.texi b/texi/gnus.texi index 8d2b8d0..75c035e 100644 --- a/texi/gnus.texi +++ b/texi/gnus.texi @@ -631,7 +631,7 @@ Article Buffer Composing Messages * Mail:: Mailing and replying. -* Posting Server:: What server should you post via? +* Posting Server:: What server should you post and mail via? * Mail and Post:: Mailing and posting at the same time. * Archived Messages:: Where Gnus stores the messages you've sent. * Posting Styles:: An easier way to specify who you are. @@ -10541,7 +10541,7 @@ on your setup (@pxref{Posting Server}). @menu * Mail:: Mailing and replying. -* Posting Server:: What server should you post via? +* Posting Server:: What server should you post and mail via? * Mail and Post:: Mailing and posting at the same time. * Archived Messages:: Where Gnus stores the messages you've sent. * Posting Styles:: An easier way to specify who you are. @@ -10581,15 +10581,18 @@ When you press those magical @kbd{C-c C-c} keys to ship off your latest Thank you for asking. I hate you. -@vindex gnus-post-method +It can be quite complicated. -It can be quite complicated. Normally, Gnus will post using the same -select method as you're reading from (which might be convenient if -you're reading lots of groups from different private servers). -However. If the server you're reading from doesn't allow posting, -just reading, you probably want to use some other server to post your -(extremely intelligent and fabulously interesting) articles. You can -then set the @code{gnus-post-method} to some other method: +@vindex gnus-post-method +When posting news, Message usually invokes @code{message-send-news} +(@pxref{News Variables, , News Variables, message, Message Manual}). +Normally, Gnus will post using the same select method as you're +reading from (which might be convenient if you're reading lots of +groups from different private servers). However. If the server +you're reading from doesn't allow posting, just reading, you probably +want to use some other server to post your (extremely intelligent and +fabulously interesting) articles. You can then set the +@code{gnus-post-method} to some other method: @lisp (setq gnus-post-method '(nnspool "")) @@ -10610,6 +10613,23 @@ for posting. Finally, if you want to always post using the native select method, you can set this variable to @code{native}. +When sending mail, Message invokes @code{message-send-mail-function}. +The default function, @code{message-send-mail-with-sendmail}, pipes +your article to the @code{sendmail} binary for further queuing and +sending. When your local system is not configured for sending mail +using @code{sendmail}, and you have access to a remote @sc{smtp} +server, you can set @code{message-send-mail-function} to +@code{smtpmail-send-it} and make sure to setup the @code{smtpmail} +package correctly. An example: + +@lisp +(setq message-send-mail-function 'smtpmail-send-it + smtpmail-default-smtp-server "YOUR SMTP HOST") +@end lisp + +Other possible choises for @code{message-send-mail-function} includes +@code{message-send-mail-with-mh}, @code{message-send-mail-with-qmail}, +and @code{feedmail-send-it}. @node Mail and Post @section Mail and Post @@ -12116,7 +12136,7 @@ mail, is that the transport mechanism has very little to do with how they want to treat a message. Many people subscribe to several mailing lists. These are transported -via SMTP, and are therefore mail. But we might go for weeks without +via @sc{smtp}, and are therefore mail. But we might go for weeks without answering, or even reading these messages very carefully. We may not need to save them because if we should need to read one again, they are archived somewhere else. @@ -14642,10 +14662,10 @@ Please note that the value of @code{nnimap-stream} is a symbol! @dfn{kerberos4:} Connect with Kerberos 4. Requires the @samp{imtest} program. @item @dfn{starttls:} Connect via the STARTTLS extension (similar to -SSL). Requires the external library @samp{starttls.el} and program +SSL)@. Requires the external library @samp{starttls.el} and program @samp{starttls}. @item -@dfn{ssl:} Connect through SSL. Requires OpenSSL (the program +@dfn{ssl:} Connect through SSL@. Requires OpenSSL (the program @samp{openssl}) or SSLeay (@samp{s_client}) as well as the external library @samp{ssl.el}. @item @@ -20504,7 +20524,7 @@ This says that all mail to this address is suspect, but if it has a header, it's probably ok. All the rest goes to the @samp{spam} group. (This idea probably comes from Tim Pierce.) -In addition, many mail spammers talk directly to your @code{smtp} server +In addition, many mail spammers talk directly to your @sc{smtp} server and do not include your email address explicitly in the @code{To} header. Why they do this is unknown---perhaps it's to thwart this thwarting scheme? In any case, this is trivial to deal with---you just diff --git a/texi/gnusref.tex b/texi/gnusref.tex index b8b270f..f820fd8 100644 --- a/texi/gnusref.tex +++ b/texi/gnusref.tex @@ -617,9 +617,16 @@ RET & (BUTTON-2) Toggle display of the MIME object.\\ v & (M-RET) Prompt for a method and then view object using this method.\\ o & Prompt for a filename and save the MIME object.\\ + C-o & Prompt for a filename to save the MIME object to and remove it.\\ c & {\bf Copy} the MIME object to a new buffer and display this buffer.\\ + i & Display the MIME object in this buffer.\\ + C & Copy the MIME object to a new buffer and display this buffer using {\bf Charset} \\ + E & View internally. \\ + e & View {\bf externally}. \\ t & View the MIME object as a different {\bf type}.\\ + p & {\bf Print} the MIME object.\\ $\mid$ & Pipe the MIME object to a process.\\ + . & Take action on the MIME object.\\ \end{keys} } } -- 1.7.10.4