From: yamaoka Date: Mon, 4 Mar 2002 00:36:08 +0000 (+0000) Subject: Synch with Oort Gnus. X-Git-Tag: t-gnus-6_15_6-01-quimby~27 X-Git-Url: http://git.chise.org/gitweb/?a=commitdiff_plain;h=cd51308638ab73183c37be00eb7e2ed2a2fdbe6f;p=elisp%2Fgnus.git- Synch with Oort Gnus. --- diff --git a/ChangeLog b/ChangeLog index d495895..76de73d 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2002-03-04 Katsumi Yamaoka + + * lisp/nnheader.el (mm-7bit-chars): Copied from mm-bodies.el. + (mm-multibyte-p): New alias. + (mm-char-int): Alias to `char-int'. + 2002-02-26 TSUCHIYA Masatoshi * lisp/gnus-art.el (gnus-request-article-this-buffer): Sync up diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 0948d48..cefeaa4 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,41 @@ +2002-03-02 ShengHuo ZHU + + * gnus-util.el (gnus-multiple-choice): Use message. XEmacs only + takes one argument in read-char. + + * message.el (message-fix-before-sending): Forward a char. + Check mmu-multibyte-p, add control-1. + +2002-03-01 ShengHuo ZHU + + * gnus-start.el (gnus-read-init-file): Ditto. + + * gnus-agent.el (gnus-agent-fetch-session): Ditto. + + * dgnushack.el (dgnushack-make-load): Ditto. + + * mail-source.el (mail-source-fetch): Extract the right error + code. + + * message.el (message-fix-before-sending): Check illegible text. + + * gnus-util.el (gnus-multiple-choice): New function. + + * gnus-kill.el (gnus-score-insert-help): Removed, because it is + also defined in gnus-score.el. + +2002-03-01 Paul Jarc + + * message.el (message-get-reply-headers): downcase email addresses + for comaparisons for duplicate removal. + +2002-03-01 ShengHuo ZHU + + * mm-view.el (mm-view-pkcs7-verify): New function. A bogus + implementation of PKCS#7, which just allows users read the + message. + (mm-view-pkcs7): Use it. + 2002-02-27 ShengHuo ZHU * gnus.el (large-newsgroup-initial): New parameter. @@ -22,7 +60,7 @@ * html2text.el (html2text-clean-anchor): If there is no HREF, insert nothing. - + * mml.el (mml-generate-mime-1): Add cdr. From: andre@slamdunknetworks.com @@ -40,7 +78,7 @@ * gnus-sum.el: Add gnus-article-outlook-deuglify-article. * deuglify.el: Change copy right. Add autoload. Add coding-system. - + * deuglify.el: New file. The original file name is gnus-outlook-deuglify.el from Raymond Scholz . diff --git a/lisp/dgnushack.el b/lisp/dgnushack.el index 55e67e3..258db72 100644 --- a/lisp/dgnushack.el +++ b/lisp/dgnushack.el @@ -1,5 +1,5 @@ ;;; dgnushack.el --- a hack to set the load path for byte-compiling -;; Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001 +;; Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002 ;; Free Software Foundation, Inc. ;; Author: Lars Magne Ingebrigtsen @@ -465,8 +465,11 @@ Try to re-configure with --with-addpath=FLIM_PATH and run make again. (unless (or (condition-case code (require 'w3-parse) (error - (message "No w3: %s %s retrying..." code - (locate-library "w3-parse")) + (message "No w3: %s%s, retrying..." + (error-message-string code) + (if (setq code (locate-library "w3-parse")) + (concat " (" code ")") + "")) nil)) ;; Maybe mis-configured Makefile is used (e.g. ;; configured for FSFmacs but XEmacs is running). @@ -489,17 +492,29 @@ Try to re-configure with --with-addpath=FLIM_PATH and run make again. (condition-case code (progn (require 'mh-e) nil) (error - (message "No mh-e: %s %s (ignored)" code (locate-library "mh-e")) + (message "No mh-e: %s%s (ignored)" + (error-message-string code) + (if (setq code (locate-library "mh-e")) + (concat " (" code ")") + "")) '("gnus-mh.el"))) (condition-case code (progn (require 'xml) nil) (error - (message "No xml: %s %s (ignored)" code (locate-library "xml")) + (message "No xml: %s%s (ignored)" + (error-message-string code) + (if (setq code (locate-library "xml")) + (concat " (" code ")") + "")) '("nnrss.el"))) (condition-case code (progn (require 'bbdb) nil) (error - (message "No bbdb: %s %s (ignored)" code (locate-library "bbdb")) + (message "No bbdb: %s%s (ignored)" + (error-message-string code) + (if (setq code (locate-library "bbdb")) + (concat " (" code ")") + "")) '("gnus-bbdb.el"))) (unless (featurep 'xemacs) '("gnus-xmas.el" "messagexmas.el" "nnheaderxm.el")) diff --git a/lisp/gnus-agent.el b/lisp/gnus-agent.el index 35229ce..d945cac 100644 --- a/lisp/gnus-agent.el +++ b/lisp/gnus-agent.el @@ -1229,12 +1229,12 @@ the actual number of articles toggled is returned." (gnus-agent-fetch-group-1 group gnus-command-method)))))) (error (unless (funcall gnus-agent-confirmation-function - (format "Error (%s). Continue? " err)) + (format "Error (%s). Continue? " (cadr err))) (error "Cannot fetch articles into the Gnus agent"))) (quit (unless (funcall gnus-agent-confirmation-function (format "Quit fetching session (%s). Continue? " - err)) + (cadr err))) (signal 'quit "Cannot fetch articles into the Gnus agent")))) (pop methods)) (run-hooks 'gnus-agent-fetch-hook) diff --git a/lisp/gnus-art.el b/lisp/gnus-art.el index 996b70a..ef90e96 100644 --- a/lisp/gnus-art.el +++ b/lisp/gnus-art.el @@ -2328,7 +2328,7 @@ If READ-CHARSET, ask for a coding system." (url-standalone-mode t) (url-gateway-unplugged t) (w3-honor-stylesheets nil)) - (condition-case var + (condition-case () (w3-region (point-min) (point-max)) (error)))) diff --git a/lisp/gnus-kill.el b/lisp/gnus-kill.el index b134be9..dd6a774 100644 --- a/lisp/gnus-kill.el +++ b/lisp/gnus-kill.el @@ -428,16 +428,6 @@ Returns the number of articles marked as read." 0)))) ;; Parse a Gnus killfile. -(defun gnus-score-insert-help (string alist idx) - (save-excursion - (pop-to-buffer "*Score Help*") - (buffer-disable-undo) - (erase-buffer) - (insert string ":\n\n") - (while alist - (insert (format " %c: %s\n" (caar alist) (nth idx (car alist)))) - (setq alist (cdr alist))))) - (defun gnus-kill-parse-gnus-kill-file () (goto-char (point-min)) (gnus-kill-file-mode) diff --git a/lisp/gnus-start.el b/lisp/gnus-start.el index 9fb8a95..8f9befe 100644 --- a/lisp/gnus-start.el +++ b/lisp/gnus-start.el @@ -457,7 +457,7 @@ Can be used to turn version control on or off." (condition-case var (load file nil t) (error - (error "Error in %s: %s" file var))))))))) + (error "Error in %s: %s" file (cadr var)))))))))) ;; For subscribing new newsgroup @@ -1945,7 +1945,7 @@ newsgroup." (goto-char (point-min)) (let (group max min) (while (not (eobp)) - (condition-case err + (condition-case () (progn (narrow-to-region (point) (gnus-point-at-eol)) ;; group gets set to a symbol interned in the hash table diff --git a/lisp/gnus-util.el b/lisp/gnus-util.el index e8fbc36..45f6743 100644 --- a/lisp/gnus-util.el +++ b/lisp/gnus-util.el @@ -1341,6 +1341,57 @@ SPEC is a predicate specifier that contains stuff like `or', `and', contents) (nth 2 value)))) +(defun gnus-multiple-choice (prompt choice &optional idx) + "Ask user a multiple choice question. +CHOICE is a list of the choice char and help message at IDX." + (let (tchar buf) + (save-window-excursion + (save-excursion + (while (not tchar) + (message "%s (%s?): " + prompt + (mapconcat (lambda (s) (char-to-string (car s))) + choice "")) + (setq tchar (read-char)) + (when (not (assq tchar choice)) + (setq tchar nil) + (setq buf (get-buffer-create "*Gnus Help*")) + (pop-to-buffer buf) + (fundamental-mode) ; for Emacs 20.4+ + (buffer-disable-undo) + (erase-buffer) + (insert prompt ":\n\n") + (let ((max -1) + (list choice) + (alist choice) + (idx (or idx 1)) + (i 0) + n width pad format) + ;; find the longest string to display + (while list + (setq n (length (nth idx (car list)))) + (unless (> max n) + (setq max n)) + (setq list (cdr list))) + (setq max (+ max 4)) ; %c, `:', SPACE, a SPACE at end + (setq n (/ (1- (window-width)) max)) ; items per line + (setq width (/ (1- (window-width)) n)) ; width of each item + ;; insert `n' items, each in a field of width `width' + (while alist + (if (< i n) + () + (setq i 0) + (delete-char -1) ; the `\n' takes a char + (insert "\n")) + (setq pad (- width 3)) + (setq format (concat "%c: %-" (int-to-string pad) "s")) + (insert (format format (caar alist) (nth idx (car alist)))) + (setq alist (cdr alist)) + (setq i (1+ i)))))))) + (if (buffer-live-p buf) + (kill-buffer buf)) + tchar)) + (provide 'gnus-util) ;;; gnus-util.el ends here diff --git a/lisp/mail-source.el b/lisp/mail-source.el index 3409021..bc2314d 100644 --- a/lisp/mail-source.el +++ b/lisp/mail-source.el @@ -466,7 +466,8 @@ Return the number of files that were found." (funcall function source callback) (error (unless (yes-or-no-p - (format "Mail source error (%s). Continue? " err)) + (format "Mail source error (%s). Continue? " + (cadr err))) (error "Cannot get new mail")) 0))))))))) diff --git a/lisp/message.el b/lisp/message.el index f62c295..124620d 100644 --- a/lisp/message.el +++ b/lisp/message.el @@ -3181,7 +3181,45 @@ used to distinguish whether the invisible text is a MIME part or not." (set-window-start (selected-window) (gnus-point-at-bol)) (unless (yes-or-no-p "Invisible text found and made visible; continue posting? ") - (error "Invisible text found and made visible")))))) + (error "Invisible text found and made visible"))))) + (message-check 'illegible-text + (let (found choice) + (message-goto-body) + (skip-chars-forward mm-7bit-chars) + (while (not (eobp)) + (when (let ((char (char-after))) + (or (< (mm-char-int char) 128) + (and (mm-multibyte-p) + (memq (char-charset char) + '(eight-bit-control eight-bit-graphic + control-1))))) + (add-text-properties (point) (1+ (point)) '(highlight t)) + (setq found t)) + (forward-char) + (skip-chars-forward mm-7bit-chars)) + (when found + (setq choice + (gnus-multiple-choice + "Illegible text found. Continue posting? " + '((?d "Remove and continue posting") + (?r "Replace with dots and continue posting") + (?e "Continue editing")))) + (if (eq choice ?e) + (error "Illegible text found")) + (message-goto-body) + (skip-chars-forward mm-7bit-chars) + (while (not (eobp)) + (when (let ((char (char-after))) + (or (< (mm-char-int char) 128) + (and (mm-multibyte-p) + (memq (char-charset char) + '(eight-bit-control eight-bit-graphic + control-1))))) + (delete-char 1) + (if (eq choice ?r) + (insert "."))) + (forward-char) + (skip-chars-forward mm-7bit-chars)))))) (defun message-add-action (action &rest types) "Add ACTION to be performed when doing an exit of type TYPES." @@ -5244,11 +5282,11 @@ responses here are directed to other addresses."))) ;; Perhaps "Mail-Copies-To: never" removed the only address? (if (string-equal recipients "") (setq recipients author)) - ;; Convert string to a list of (("foo@bar" . "Name ") ...). + ;; Convert string to a list of (("foo@bar" . "Name ") ...). (setq recipients (mapcar (lambda (addr) - (cons (mail-strip-quoted-names addr) addr)) + (cons (downcase (mail-strip-quoted-names addr)) addr)) (message-tokenize-header recipients))) ;; Remove first duplicates. (Why not all duplicates? Is this a bug?) (let ((s recipients)) diff --git a/lisp/mm-view.el b/lisp/mm-view.el index f021ec6..cc90410 100644 --- a/lisp/mm-view.el +++ b/lisp/mm-view.el @@ -145,7 +145,7 @@ ;; Don't let w3 set the global version of ;; this variable. (fill-column fill-column)) - (condition-case var + (condition-case () (w3-region (point-min) (point-max)) (error (delete-region (point-min) (point-max)) @@ -572,8 +572,25 @@ will not be substituted.") (defun mm-view-pkcs7 (handle) (case (mm-view-pkcs7-get-type handle) (enveloped (mm-view-pkcs7-decrypt handle)) + (signed (mm-view-pkcs7-verify handle)) (otherwise (error "Unknown or unimplemented PKCS#7 type")))) +(defun mm-view-pkcs7-verify (handle) + ;; A bogus implementation of PKCS#7. FIXME:: + (mm-insert-part handle) + (goto-char (point-min)) + (if (search-forward "Content-Type: " nil t) + (delete-region (point-min) (match-beginning 0))) + (goto-char (point-max)) + (if (re-search-backward "--\r?\n?" nil t) + (delete-region (match-end 0) (point-max))) + (goto-char (point-min)) + (while (search-forward "\r\n" nil t) + (replace-match "\n")) + (message "Verify signed PKCS#7 message is unimplemented.") + (sit-for 1) + t) + (defun mm-view-pkcs7-decrypt (handle) (insert-buffer (mm-handle-buffer handle)) (goto-char (point-min)) diff --git a/lisp/nnheader.el b/lisp/nnheader.el index f759abe..23bee21 100644 --- a/lisp/nnheader.el +++ b/lisp/nnheader.el @@ -104,7 +104,7 @@ This variable is a substitute for `mm-text-coding-system-for-write'.") (autoload 'gnus-point-at-eol "gnus-util") (autoload 'gnus-buffer-live-p "gnus-util")) -;; mm- stuff. +;; mm-util stuff. (unless (featurep 'mm-util) ;; Should keep track of `mm-image-load-path' in mm-util.el. (defun nnheader-image-load-path (&optional package) @@ -226,7 +226,20 @@ Equivalent to `progn' in XEmacs" (charsets-to-mime-charset (list item)))) (t 'iso-8859-1)))) - (defalias 'mm-guess-mime-charset 'nnheader-guess-mime-charset)) + (defalias 'mm-guess-mime-charset 'nnheader-guess-mime-charset) + + (defalias 'mm-char-int 'char-int) + + ;; Should keep track of the same alias in mm-util.el. + (defalias 'mm-multibyte-p + (static-cond ((and (featurep 'xemacs) (featurep 'mule)) + (lambda nil t)) + ((featurep 'xemacs) + (lambda nil nil)) + ((boundp 'MULE) + (lambda nil mc-flag)) + (t + (lambda nil enable-multibyte-characters))))) ;; mail-parse stuff. (unless (featurep 'mail-parse) @@ -407,6 +420,12 @@ given, the return value will not contain the last newline." (defalias 'mail-header-field-value 'std11-field-value)) +;; Should keep track of the same variable in mm-bodies.el. +;; Don't use `defvar-maybe', it won't create a byte-code!!! +;; 8bit treatment gets any char except: 0x32 - 0x7f, CR, LF, TAB, BEL, +;; BS, vertical TAB, form feed, and ^_ +(defvar mm-7bit-chars "\x20-\x7f\r\n\t\x7\x8\xb\xc\x1f") + ;;; Header access macros. ;; These macros may look very much like the ones in GNUS 4.1. They diff --git a/texi/ChangeLog b/texi/ChangeLog index 977d0a0..289ad9e 100644 --- a/texi/ChangeLog +++ b/texi/ChangeLog @@ -1,3 +1,10 @@ +2002-03-01 Paul Jarc + + * message.texi (Mailing Lists): 'use is the default for + message-use-mail-followup-to, not nil; 'use is also not t. + Mention why an unsubscribed list poster might use MFT, and how to + disable MFT for a single message. + 2002-02-25 Katsumi Yamaoka * gnus.texi (Splitting Mail): Addition. @@ -13,9 +20,9 @@ 2002-02-20 ShengHuo ZHU - * gnus.texi (Slave Gnusae): Addition. - From David S. Goldberg - + * gnus.texi (Slave Gnusae): Addition. + From David S. Goldberg + 2002-02-18 ShengHuo ZHU * emacs-mime.texi (mailcap): Addition. diff --git a/texi/message-ja.texi b/texi/message-ja.texi index f9052c4..5620d36 100644 --- a/texi/message-ja.texi +++ b/texi/message-ja.texi @@ -354,6 +354,11 @@ non @sc{mime}-savvy versions of gnus would do. は、投稿者がすでにそのメーリングリストを購読している場合が該当します。 @item +メーリングリストに投稿する人は、返事をメーリングリストと投稿者にも送信す +べきであることを、MFT を使って表現することができます。これは、投稿者がそ +のメーリングリストを購読していない場合が該当します。 + +@item メッセージがいくつかのメーリングリストに投稿されている場合に、それ以降の 議論を一つのメーリングリストだけで行なうことを指定するためにも MFT は使 われます。議論がいくつかのメーリングリストで行なわれてしまうとばらばらに @@ -428,19 +433,25 @@ gnus にはこの変数の好適な候補であるところの、あらかじめ定義されている関 さあ用意ができました。いつものようにメッセージの作成を始めましょう。そし ていつも通りに送信しましょう。メッセージが送出される直前 -に gnus の MFT を作る仕掛けが動作して、メッセージがすでに MFT ヘッダーを -持っているかどうかを調べます。もしそれが一つなら、それは放っておかれます。 -無かった場合は受取人のアドレスのリスト (To: と Cc: ヘッダーにある) を、 -それらの一つが購読しているメーリングリストのアドレスかどうかを調べます。 -それらのどれもがメーリングリストのアドレスでなかったら、MFT は作られませ -ん。それ以外の場合には MFT がその他のヘッダーに付け加えられ、その値 -は To: と Cc: にあるすべてのアドレスに設定されます。 +に gnus の MFT を作る仕掛けが動作して、メッセージがすでに MFT フィールド +を持っているかどうかを調べます。もしそれが一つなら、それは放っておかれま +す (ただしその場合にそれが空っぽだったら、そのフィールドは削除され自動生 +成されたもので置き換えられることもありません。これは個々のメッセージにつ +いて MFT の生成を禁止させる基本です)。無かった場合は受取人のアドレスのリ +スト (To: と Cc: ヘッダーにある) を、それらの一つが購読しているメーリン +グリストのアドレスかどうかを調べます。それらのどれもがメーリングリストの +アドレスでなかったら、MFT は作られません。それ以外の場合には MFT がその +他のヘッダーに付け加えられ、その値は To: と Cc: にあるすべてのアドレスに +設定されます。 うーむ。そうするとあなたは「購読していないメーリングリストにメールを送信 -するときはどうなるの?」と尋ねますね。えーと、親切な Gnus タワーの人たち -が、この目的で使えるすべての既知のメーリングリストのアドレスのデータベー -スの作成にいそしんでいます。それまでは、@kbd{C-c C-f C-m} を使って手動 -で MFT ヘッダーを挿入するなどして下さい!! +するときはどうなるの? 私は余分のコピーが欲しいことを MFT で言いたい」と +尋ねますね (たぶん他の人は MFT が無かった場合と同様に処理してしまうだろ +うけれど、誰かの to-address グループパラメータを上書きするために、明示的 +な MFT を使うことができるのです)。えーと、親切な Gnus タワーの人たちが、 +この目的で使えるすべての既知のメーリングリストのアドレスのデータベースの +作成にいそしんでいます。それまでは、@kbd{C-c C-f C-m} を使って手動で MFT +ヘッダーを挿入するなどして下さい!! @c @node Honoring an MFT post @subsection MFT 投稿の尊重 @@ -452,15 +463,15 @@ gnus にはこの変数の好適な候補であるところの、あらかじめ定義されている関 以下のどれかになります: @table @code -@item t +@item use 常に MFT を尊重します。フォローアップ記事の To: と Cc: ヘッダーは、元の -記事の MFT ヘッダーから引き出します。 +記事の MFT ヘッダーから引き出します。これがディフォルトです。 @item nil 常に MFT を尊重しません (完璧に無視)。 @item ask -どうするか尋ねます。これがディフォルトです。 +どうするか尋ねます。 @end table MFT を尊重することは良いネチケット (nettiquette) であると考えられていま diff --git a/texi/message.texi b/texi/message.texi index 211229b..c17e36b 100644 --- a/texi/message.texi +++ b/texi/message.texi @@ -333,6 +333,11 @@ sent to just the list, and not the poster as well. This will happen if the poster is already subscribed to the list. @item +A mailing list poster can use MFT to express that responses should be +sent to the list and the poster as well. This will happen if the poster +is not subscribed to the list. + +@item If a message is posted to several mailing lists, MFT may also be used to direct the following discussion to one list only, because discussions that are spread over several lists tend to be fragmented @@ -405,21 +410,26 @@ set this variable to the name of the file and life would be good. You can use one or more of the above variables. All their values are ``added'' in some way that works :-) -Now you are all set. Just start composing a message as you normally -do. And just send it; as always. Just before the message is sent -out, Gnus' MFT generation thingy kicks in and checks if the message -already has a MFT header. If there is one, the header is left alone. -If not then the list of recipient addresses (in the To: and Cc: -headers) is checked to see if one of them is a list address you are -subscribed to. If none of them is a list address, then no MFT is -generated; otherwise, a MFT is added to the other headers and set to -the value of all addresses in To: and Cc: +Now you are all set. Just start composing a message as you normally do. +And just send it; as always. Just before the message is sent out, Gnus' +MFT generation thingy kicks in and checks if the message already has a +MFT field. If there is one, it is left alone. (Except if it's empty - +in that case, the field is removed and is not replaced with an +automatically generated one. This lets you disable MFT generation on a +per-message basis.) If there is none, then the list of recipient +addresses (in the To: and Cc: headers) is checked to see if one of them +is a list address you are subscribed to. If none of them is a list +address, then no MFT is generated; otherwise, a MFT is added to the +other headers and set to the value of all addresses in To: and Cc: Hm. ``So'', you ask, ``what if I send an email to a list I am not -subscribed to?'' Well, the kind folks at Gnus Towers are working on a -database of all known mailing list addresses that can be used for this -purpose. Till then, you could, like, insert a MFT header manually, -with the help of @kbd{C-c C-f C-m} !! +subscribed to? I want my MFT to say that I want an extra copy.'' (This +is supposed to be interpreted by others the same way as if there were no +MFT, but you can use an explicit MFT to override someone else's +to-address group parameter.) Well, the kind folks at Gnus Towers are +working on a database of all known mailing list addresses that can be +used for this purpose. Till then, you could, like, insert a MFT header +manually, with the help of @kbd{C-c C-f C-m} !! @c @node Honoring an MFT post @subsection Honoring an MFT post @@ -430,15 +440,15 @@ header, Gnus' action will depend on the value of the variable @code{message-use-mail-followup-to}. This variable can be one of: @table @code -@item t +@item use Always honor MFTs. The To: and Cc: headers in your followup will be - derived from the MFT header of the original post. + derived from the MFT header of the original post. This is the default. @item nil Always dishonor MFTs (just ignore the darned thing) @item ask -Gnus will prompt you for an action. This is the default. +Gnus will prompt you for an action. @end table