From: yamaoka Date: Sun, 12 Jan 2003 08:11:53 +0000 (+0000) Subject: Synch with Oort Gnus. X-Git-Tag: t-gnus-6_15_12-00-quimby~3 X-Git-Url: http://git.chise.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=73cc6933d9e43c38fa39a62e305e4b81dc4c664a;p=elisp%2Fgnus.git- Synch with Oort Gnus. --- diff --git a/lisp/ChangeLog b/lisp/ChangeLog index efdaa6e..27ae1ea 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,66 @@ +2003-01-12 Jesper Harder + + * message.el (message-fetch-reply-field): Narrow to headers. + + * gnus-msg.el (gnus-inews-do-gcc): Don't try to mark GCC's as read + if Gnus isn't alive. + +2002-01-11 Kevin Greiner + + * gnus-agent.el (gnus-agent-fetch-group-1): Remove downloadable + marks from articles that are already stored in the agent. + (gnus-agent-backup-overview-buffer): New debug tool. Creates a + backup copy of an invalid .overview file for later analysis. + +2003-01-12 Gregorio Gervasio, Jr. + + * gnus-sum.el (gnus-summary-exit): Reverse change to make group + exit work with two frames. + +2003-01-11 Fran,Ag(Bois-David Collin + + * message.el (message-forward-make-body): Use mule4. + +2003-01-11 Lars Magne Ingebrigtsen + + * message.el (message-mode-map): Move wide-reply command. + +2003-01-10 Reiner Steib + + * deuglify.el (gnus-outlook-deuglify-attrib-verb-regexp): Added + castellano. + (gnus-outlook-display-hook): New variable. + (gnus-outlook-display-article-buffer): New function. + (gnus-outlook-unwrap-lines, gnus-outlook-repair-attribution) + (gnus-outlook-deuglify-article): Made them interactive and added + optional arg. Use `g-o-d-a-b'. + (gnus-article-outlook-deuglify-article): Use `g-o-d-a-b'. + + * gnus-sum.el: Added autoloads. + (gnus-summary-mode-map): Added gnus-summary-wash-deuglify-map. + (gnus-summary-make-menu-bar): Added "(Outlook) Deuglify" menu. + +2003-01-11 Lars Magne Ingebrigtsen + + * gnus-art.el (gnus-display-mime): Use the mime emulation + variable. + + * gnus-sum.el (gnus-article-emulate-mime): New variable. + + * gnus-start.el (gnus-read-newsrc-el-file): Make sure that the + newsrc-alist is initialized properly. + + * mail-source.el (mail-sources): Autoload. + + * gnus-sum.el (gnus-summary-make-false-root-always): Default to + nil. + + * gnus-msg.el (gnus-configure-posting-styles): Make sure we don't + insert two newlines. + + * message.el (message-check-news-header-syntax): Compute the + header length correctly. + 2002-01-10 Kevin Greiner * gnus-agent.el (gnus-agent-expire): Do not remove article from diff --git a/lisp/deuglify.el b/lisp/deuglify.el index d78c251..1f15364 100644 --- a/lisp/deuglify.el +++ b/lisp/deuglify.el @@ -266,7 +266,7 @@ :group 'gnus-outlook-deuglify) (defcustom gnus-outlook-deuglify-attrib-verb-regexp - "wrote\\|writes\\|says\\|schrieb\\|schreibt\\|meinte\\|skrev\\|a écrit\\|schreef" + "wrote\\|writes\\|says\\|schrieb\\|schreibt\\|meinte\\|skrev\\|a écrit\\|schreef\\|escribió" "Regular expression matching the verb used in an attribution line." :type 'string :group 'gnus-outlook-deuglify) @@ -277,17 +277,35 @@ :type 'string :group 'gnus-outlook-deuglify) +;;;###autoload +(defcustom gnus-outlook-display-hook nil + "A hook called after an deuglified article has been prepared. +It is run after `gnus-article-prepare-hook'." + :type 'hook + :group 'gnus-outlook-deuglify) ;; Functions +(defun gnus-outlook-display-article-buffer () + "Redisplay current buffer or article buffer." + (with-current-buffer (or gnus-article-buffer (current-buffer)) + ;; "Emulate" `gnus-article-prepare-display' without calling + ;; it. Calling `gnus-article-prepare-display' on an already + ;; prepared article removes all MIME parts. I'm unsure whether + ;; this is a bug or not. + (gnus-article-highlight t) + (gnus-treat-article nil) + (gnus-run-hooks 'gnus-article-prepare-hook + 'gnus-outlook-display-hook))) + ;;;###autoload -(defun gnus-outlook-unwrap-lines () - "Unwrap lines that appear to be wrapped citation lines. +(defun gnus-outlook-unwrap-lines (&optional nodisplay) + "Unwrap lines that appear to be wrapped citation lines. You can control what lines will be unwrapped by frobbing -`gnus-outlook-deuglify-unwrap-min' and -`gnus-outlook-deuglify-unwrap-max', indicating the miminum and maximum -length of an unwrapped citation line." - (interactive) +`gnus-outlook-deuglify-unwrap-min' and `gnus-outlook-deuglify-unwrap-max', +indicating the miminum and maximum length of an unwrapped citation line. If +NODISPLAY is non-nil, don't redisplay the article buffer." + (interactive "P") (save-excursion (let ((case-fold-search nil) (inhibit-read-only t) @@ -308,7 +326,8 @@ length of an unwrapped citation line." (< (+ len12 len3) gnus-outlook-deuglify-unwrap-max)) (progn (replace-match "\\1\\2 \\3") - (goto-char (match-beginning 0)))))))))) + (goto-char (match-beginning 0))))))))) + (unless nodisplay (gnus-outlook-display-article-buffer))) (defun gnus-outlook-rearrange-article (attr-start) "Put the text from `attr-start' to the end of buffer at the top of the article buffer." @@ -400,45 +419,46 @@ length of an unwrapped citation line." (match-beginning 0))))))) ;;;###autoload -(defun gnus-outlook-repair-attribution () - "Repair a broken attribution line." - (interactive) - (or - (gnus-outlook-repair-attribution-other) - (gnus-outlook-repair-attribution-block) - (gnus-outlook-repair-attribution-outlook))) - -(defun gnus-outlook-rearrange-citation () - "Repair broken citations." - (let ((attrib-start (gnus-outlook-repair-attribution))) +(defun gnus-outlook-repair-attribution (&optional nodisplay) + "Repair a broken attribution line. +If NODISPLAY is non-nil, don't redisplay the article buffer." + (interactive "P") + (let ((attrib-start + (or + (gnus-outlook-repair-attribution-other) + (gnus-outlook-repair-attribution-block) + (gnus-outlook-repair-attribution-outlook)))) + (unless nodisplay (gnus-outlook-display-article-buffer)) + attrib-start)) + +(defun gnus-outlook-rearrange-citation (&optional nodisplay) + "Repair broken citations. +If NODISPLAY is non-nil, don't redisplay the article buffer." + (interactive "P") + (let ((attrib-start (gnus-outlook-repair-attribution 'nodisplay))) ;; rearrange citations if an attribution line has been recognized (if attrib-start - (gnus-outlook-rearrange-article attrib-start)))) + (gnus-outlook-rearrange-article attrib-start))) + (unless nodisplay (gnus-outlook-display-article-buffer))) ;;;###autoload -(defun gnus-outlook-deuglify-article () - "Deuglify broken Outlook (Express) articles." - (interactive) +(defun gnus-outlook-deuglify-article (&optional nodisplay) + "Deuglify broken Outlook (Express) articles. +If NODISPLAY is non-nil, don't redisplay the article buffer." + (interactive "P") ;; apply treatment of dumb quotes (gnus-article-treat-dumbquotes) ;; repair wrapped cited lines - (gnus-outlook-unwrap-lines) + (gnus-outlook-unwrap-lines 'nodisplay) ;; repair attribution line - (gnus-outlook-rearrange-citation)) + (gnus-outlook-rearrange-citation 'nodisplay) + (unless nodisplay (gnus-outlook-display-article-buffer))) ;;;###autoload (defun gnus-article-outlook-deuglify-article () "Deuglify broken Outlook (Express) articles and redisplay." (interactive) - (gnus-outlook-deuglify-article) - (with-current-buffer (or gnus-article-buffer (current-buffer)) - ;; "Emulate" `gnus-article-prepare-display' without calling - ;; it. Calling `gnus-article-prepare-display' on an already - ;; prepared article removes all MIME parts. I'm unsure whether - ;; this is a bug or not. - (gnus-article-highlight t) - (gnus-treat-article nil) - (gnus-run-hooks 'gnus-article-prepare-hook))) + (gnus-outlook-deuglify-article nil)) (provide 'deuglify) diff --git a/lisp/gnus-agent.el b/lisp/gnus-agent.el index 68304b3..ed45a64 100644 --- a/lisp/gnus-agent.el +++ b/lisp/gnus-agent.el @@ -839,7 +839,7 @@ Optional arg ALL, if non-nil, means to fetch all articles." (setq fetched-articles (gnus-agent-fetch-articles gnus-newsgroup-name articles))))) (save-excursion -(dolist (article articles) + (dolist (article articles) (setq gnus-newsgroup-downloadable (delq article gnus-newsgroup-downloadable)) (if gnus-agent-mark-unread-after-downloaded @@ -1137,11 +1137,24 @@ This can be added to `gnus-select-article-hook' or (gnus-agent-check-overview-buffer)) (pop crosses)))) +(defun gnus-agent-backup-overview-buffer () + (when gnus-newsgroup-name + (let ((root (gnus-agent-article-name ".overview" gnus-newsgroup-name)) + (cnt 0) + name) + (while (file-exists-p (setq name (concat root "~" (int-to-string (setq cnt (1+ cnt))) "~")))) + (write-region (point-min) (point-max) name nil 'no-msg) + (gnus-message 1 "Created backup copy of overview in %s." name) + ) + ) + t) + (defun gnus-agent-check-overview-buffer (&optional buffer) "Check the overview file given for sanity. In particular, checks that the file is sorted by article number and that there are no duplicates." - (let ((prev-num -1)) + (let ((prev-num -1) + (backed-up nil)) (save-excursion (when buffer (set-buffer buffer)) @@ -1157,22 +1170,30 @@ and that there are no duplicates." (cond ((or (not (integerp cur)) (not (eq (char-after) ?\t))) + (or backed-up + (setq backed-up (gnus-agent-backup-overview-buffer))) (gnus-message 1 "Overview buffer contains garbage '%s'." (buffer-substring p (gnus-point-at-eol)))) ((= cur prev-num) - (gnus-message 1 + (or backed-up + (setq backed-up (gnus-agent-backup-overview-buffer))) + (gnus-message 1 "Duplicate overview line for %d" cur) (delete-region (point) (progn (forward-line 1) (point)))) ((< cur 0) - (gnus-message 1 "Junk article number %d" cur) + (or backed-up + (setq backed-up (gnus-agent-backup-overview-buffer))) + (gnus-message 1 "Junk article number %d" cur) (delete-region (point) (progn (forward-line 1) (point)))) ((< cur prev-num) (sort-numeric-fields 1 (point-min) (point-max)) (goto-char (point-min)) (setq prev-num -1) - (gnus-message 1 "Overview buffer not sorted!")) + (or backed-up + (setq backed-up (gnus-agent-backup-overview-buffer))) + (gnus-message 1 "Overview buffer not sorted!")) (t (setq prev-num cur))) (forward-line 1))))))) @@ -1613,51 +1634,47 @@ of FILE placing the combined headers in nntp-server-buffer." (unless (and (eq predicate 'gnus-agent-false) (not marked-articles)) - (let* ((arts (list nil)) - (arts-tail arts) - (alist (gnus-agent-load-alist group)) - (chunk-size 0) - (marked-articles marked-articles) - fetched-articles) - (while (setq gnus-headers (pop gnus-newsgroup-headers)) - (let ((num (mail-header-number gnus-headers))) - ;; Determine if this article is already in the cache - (while (and alist - (> num (caar alist))) - (setq alist (cdr alist))) - - (unless (and (eq num (caar alist)) - (cdar alist)) - - ;; Determine if this article was marked for download. - (while (and marked-articles - (> num (car marked-articles))) - (setq marked-articles - (cdr marked-articles))) - - ;; When this article is marked, or selected by the - ;; predicate, add it to the download list - (when (or (eq num (car marked-articles)) - (let ((gnus-score - (or (cdr (assq num gnus-newsgroup-scored)) - gnus-summary-default-score))) - (funcall predicate))) - (gnus-agent-append-to-list arts-tail num))))) - - ;; Fetch all selected articles - (when (cdr arts) + (let ((arts (list nil))) + (let ((arts-tail arts) + (alist (gnus-agent-load-alist group)) + (marked-articles marked-articles)) + (while (setq gnus-headers (pop gnus-newsgroup-headers)) + (let ((num (mail-header-number gnus-headers))) + ;; Determine if this article is already in the cache + (while (and alist + (> num (caar alist))) + (setq alist (cdr alist))) + + (unless (and (eq num (caar alist)) + (cdar alist)) + + ;; Determine if this article was marked for download. + (while (and marked-articles + (> num (car marked-articles))) + (setq marked-articles + (cdr marked-articles))) + + ;; When this article is marked, or selected by the + ;; predicate, add it to the download list + (when (or (eq num (car marked-articles)) + (let ((gnus-score + (or (cdr (assq num gnus-newsgroup-scored)) + gnus-summary-default-score))) + (funcall predicate))) + (gnus-agent-append-to-list arts-tail num)))))) + + (let (fetched-articles) + ;; Fetch all selected articles (setq gnus-newsgroup-undownloaded (gnus-sorted-ndifference gnus-newsgroup-undownloaded - (setq fetched-articles (gnus-agent-fetch-articles group (cdr arts))))) + (setq fetched-articles (if (cdr arts) (gnus-agent-fetch-articles group (cdr arts)) nil)))) (let ((unfetched-articles (gnus-sorted-ndifference (cdr arts) fetched-articles))) (if gnus-newsgroup-active (progn - (dolist (article (cdr arts)) - (setq gnus-newsgroup-downloadable - (delq article gnus-newsgroup-downloadable)) + (dolist (article marked-articles) (when (gnus-summary-goto-subject article nil t) - (gnus-summary-update-download-mark article))) + (gnus-summary-set-agent-mark article t))) (dolist (article fetched-articles) (if gnus-agent-mark-unread-after-downloaded (gnus-summary-mark-article article gnus-unread-mark))) diff --git a/lisp/gnus-art.el b/lisp/gnus-art.el index ded6756..55c8eb4 100644 --- a/lisp/gnus-art.el +++ b/lisp/gnus-art.el @@ -4715,9 +4715,10 @@ If no internal viewer is available, use an external viewer." ;; We have to do this since selecting the window ;; may change the point. So we set the window point. (set-window-point window point))) - (let* ((handles (or ihandles (mm-dissect-buffer - nil gnus-article-loose-mime) - (mm-uu-dissect))) + (let* ((handles (or ihandles + (mm-dissect-buffer nil gnus-article-loose-mime) + (and gnus-article-emulate-mime + (mm-uu-dissect)))) buffer-read-only handle name type b e display) (when (and (not ihandles) (not gnus-displaying-mime)) diff --git a/lisp/gnus-fun.el b/lisp/gnus-fun.el index 1ee48ce..53499f3 100644 --- a/lisp/gnus-fun.el +++ b/lisp/gnus-fun.el @@ -85,6 +85,7 @@ Output to the current buffer, replace text, and don't mingle error." (when (file-exists-p file) (let ((done nil) (attempt "") + (step 72) (quant 16)) (while (and (not done) (> quant 1)) @@ -104,10 +105,14 @@ Output to the current buffer, replace text, and don't mingle error." (insert attempt) (base64-encode-region (point-min) (point-max)) (goto-char (point-min)) - (forward-line 1) - (while (not (eobp)) - (insert " ") - (forward-line 1)) + (while (search-forward "\n" nil t) + (replace-match "")) + (goto-char (point-min)) + (while (> (- (point-max) (point)) + step) + (forward-char step) + (insert "\n ") + (setq step 76)) (buffer-string)) nil)))) diff --git a/lisp/gnus-msg.el b/lisp/gnus-msg.el index 21b6907..a672c03 100644 --- a/lisp/gnus-msg.el +++ b/lisp/gnus-msg.el @@ -1809,6 +1809,7 @@ this is a reply." group (gnus-status-message method)) (sit-for 2)) (when (and group-art + (gnus-alive-p) (or gnus-gcc-mark-as-read gnus-inews-mark-gcc-as-read)) (gnus-group-mark-article-read group (cdr group-art))) @@ -2016,7 +2017,9 @@ this is a reply." (let ((value ,(cdr result))) (when value (message-goto-eoh) - (insert ,header ": " value "\n")))))))) + (insert ,header ": " value) + (unless (bolp) + (insert "\n"))))))))) nil 'local)) (when (or name address) (add-hook 'message-setup-hook diff --git a/lisp/gnus-start.el b/lisp/gnus-start.el index e5576e3..ded65bb 100644 --- a/lisp/gnus-start.el +++ b/lisp/gnus-start.el @@ -2190,20 +2190,20 @@ If FORCE is non-nil, the .newsrc file is read." ;; (< version 5.090009)) ;; (setq gnus-format-specs gnus-default-format-specs))) (when gnus-newsrc-assoc - (setq gnus-newsrc-alist gnus-newsrc-assoc))) - (gnus-make-hashtable-from-newsrc-alist) - (when (file-newer-than-file-p file ding-file) - ;; Old format quick file - (gnus-message 5 "Reading %s..." file) - ;; The .el file is newer than the .eld file, so we read that one - ;; as well. - (gnus-read-old-newsrc-el-file file))) - (when (and gnus-product-directory - (file-directory-p gnus-product-directory)) - (let ((list gnus-product-variable-file-list)) - (while list - (apply 'gnus-product-read-variable-file-1 (car list)) - (setq list (cdr list))))))) + (setq gnus-newsrc-alist gnus-newsrc-assoc)))) + (gnus-make-hashtable-from-newsrc-alist) + (when (file-newer-than-file-p file ding-file) + ;; Old format quick file + (gnus-message 5 "Reading %s..." file) + ;; The .el file is newer than the .eld file, so we read that one + ;; as well. + (gnus-read-old-newsrc-el-file file))) + (when (and gnus-product-directory + (file-directory-p gnus-product-directory)) + (let ((list gnus-product-variable-file-list)) + (while list + (apply 'gnus-product-read-variable-file-1 (car list)) + (setq list (cdr list)))))) ;;(defun gnus-re-read-newsrc-el-file (file) ;; "Attempt to re-read .newsrc.eld file. Returns `nil' if successful. diff --git a/lisp/gnus-sum.el b/lisp/gnus-sum.el index 7312f0c..7329a7c 100644 --- a/lisp/gnus-sum.el +++ b/lisp/gnus-sum.el @@ -57,6 +57,9 @@ (autoload 'gnus-article-outlook-deuglify-article "deuglify" "Deuglify broken Outlook (Express) articles and redisplay." t) +(autoload 'gnus-outlook-unwrap-lines "deuglify" nil t) +(autoload 'gnus-outlook-repair-attribution "deuglify" nil t) +(autoload 'gnus-outlook-rearrange-citation "deuglify" nil t) (defcustom gnus-kill-summary-on-exit t "*If non-nil, kill the summary buffer when you exit from it. @@ -120,7 +123,7 @@ given by the `gnus-summary-same-subject' variable.)" (const adopt) (const empty))) -(defcustom gnus-summary-make-false-root-always t +(defcustom gnus-summary-make-false-root-always nil "Always make a false dummy root." :group 'gnus-thread :type 'boolean) @@ -1086,6 +1089,14 @@ the MIME-Version header is missed." :type 'boolean :group 'gnus-article) +(defcustom gnus-article-emulate-mime t + "If non-nil, use MIME emulation for uuencode and the like. +This means that Gnus will search message bodies for text that look +like uuencoded bits, yEncoded bits, and so on, and present that using +the normal Gnus MIME machinery." + :type 'boolean + :group 'gnus-article) + ;;; Internal variables (defvar gnus-summary-display-cache nil) @@ -1802,7 +1813,14 @@ increase the score of each group you read." "a" gnus-article-strip-headers-in-body ;; mnemonic: wash archive "p" gnus-article-verify-x-pgp-sig "d" gnus-article-treat-dumbquotes - "k" gnus-article-outlook-deuglify-article) + "k" gnus-article-outlook-deuglify-article) ;; mnemonic: outloo*k* + + (gnus-define-keys (gnus-summary-wash-deuglify-map "Y" gnus-summary-wash-map) + ;; mnemonic: deuglif*Y* + "u" gnus-outlook-unwrap-lines + "a" gnus-outlook-repair-attribution + "c" gnus-outlook-rearrange-citation + "f" gnus-article-outlook-deuglify-article) ;; mnemonic: full deuglify (gnus-define-keys (gnus-summary-wash-hide-map "W" gnus-summary-wash-map) "a" gnus-article-hide @@ -2100,7 +2118,12 @@ gnus-summary-show-article-from-menu-as-charset-%s" cs)))) ["URLs" gnus-article-unsplit-urls t] ["Verify X-PGP-Sig" gnus-article-verify-x-pgp-sig t] ["HZ" gnus-article-decode-HZ t] - ["OutlooK deuglify" gnus-article-outlook-deuglify-article t] + ("(Outlook) Deuglify" + ["Unwrap lines" gnus-outlook-unwrap-lines t] + ["Repair attribution" gnus-outlook-repair-attribution t] + ["Rearrange citation" gnus-outlook-rearrange-citation t] + ["Full (Outlook) deuglify" + gnus-article-outlook-deuglify-article t]) ) ("Output" ["Save in default format" gnus-summary-save-article @@ -6405,7 +6428,10 @@ If FORCE (the prefix), also save the .newsrc file(s)." (set-buffer gnus-group-buffer) (gnus-summary-clear-local-variables) (let ((gnus-summary-local-variables gnus-newsgroup-variables)) - (gnus-summary-clear-local-variables))) + (gnus-summary-clear-local-variables)) + ;; Return to group mode buffer. + (when (eq mode 'gnus-summary-mode) + (gnus-kill-buffer buf))) (setq gnus-current-select-method gnus-select-method) (pop-to-buffer gnus-group-buffer) (if (not quit-config) @@ -6420,9 +6446,6 @@ If FORCE (the prefix), also save the .newsrc file(s)." (set-window-start (selected-window) (point)) (goto-char group-point))) (gnus-handle-ephemeral-exit quit-config)) - ;; Return to group mode buffer. - (when (eq mode 'gnus-summary-mode) - (gnus-kill-buffer buf)) ;; Clear the current group name. (unless quit-config (setq gnus-newsgroup-name nil))))) @@ -10816,7 +10839,8 @@ If REVERSE, save parts that do not match TYPE." (set-buffer gnus-article-buffer) (let ((handles (or gnus-article-mime-handles (mm-dissect-buffer nil gnus-article-loose-mime) - (mm-uu-dissect)))) + (and gnus-article-emulate-mime + (mm-uu-dissect))))) (when handles (gnus-summary-save-parts-1 type dir handles reverse) (unless gnus-article-mime-handles ;; Don't destroy this case. diff --git a/lisp/mail-source.el b/lisp/mail-source.el index fd193b5..4ef4770 100644 --- a/lisp/mail-source.el +++ b/lisp/mail-source.el @@ -55,6 +55,7 @@ (list 'const (car a))) imap-stream-alist))) +;;;###autoload (defcustom mail-sources nil "*Where the mail backends will look for incoming mail. This variable is a list of mail source specifiers. diff --git a/lisp/message.el b/lisp/message.el index 43cc1e4..079faca 100644 --- a/lisp/message.el +++ b/lisp/message.el @@ -1755,7 +1755,9 @@ is used by default." (defun message-fetch-reply-field (header) "Fetch field HEADER from the message we're replying to." (message-with-reply-buffer - (message-fetch-field header))) + (save-restriction + (mail-narrow-to-head) + (message-fetch-field header)))) (defun message-set-work-buffer () (if (get-buffer " *message work*") @@ -2249,7 +2251,7 @@ Point is left at the beginning of the narrowed-to region." (define-key message-mode-map "\C-c\C-fc" 'message-goto-mail-copies-to) (define-key message-mode-map "\C-c\C-t" 'message-insert-to) - (define-key message-mode-map "\C-c\M-t" 'message-insert-wide-reply) + (define-key message-mode-map "\C-c\C-fw" 'message-insert-wide-reply) (define-key message-mode-map "\C-c\C-n" 'message-insert-newsgroups) (define-key message-mode-map "\C-c\C-l" 'message-to-list-only) @@ -4323,16 +4325,20 @@ Otherwise, generate and save a value for `canlock-password' first." ;; Check long header lines. (message-check 'long-header-lines (let ((start (point)) + (header nil) + (length 0) found) (while (and (not found) (re-search-forward "^\\([^ \t:]+\\): " nil t)) - (when (> (- (point) start) 998) - (setq found t)) + (if (> (- (point) (match-beginning 0)) 998) + (setq found t + length (- (point) (match-beginning 0))) + (setq header (match-string-no-properties 1))) (setq start (match-beginning 0)) (forward-line 1)) (if found - (y-or-n-p (format "Your %s header is too long. Really post? " - (match-string 1))) + (y-or-n-p (format "Your %s header is too long (%d). Really post? " + header length)) t))) ;; Check for multiple identical headers. (message-check 'multiple-headers diff --git a/texi/ChangeLog b/texi/ChangeLog index 3f686d8..a96296f 100644 --- a/texi/ChangeLog +++ b/texi/ChangeLog @@ -1,3 +1,20 @@ +2003-01-11 Lars Magne Ingebrigtsen + + * message.texi (Header Commands): Addition. + +2003-01-10 Reiner Steib + + * gnus.texi (Article Washing): Added gnus-outlook-unwrap-lines, + gnus-outlook-repair-attribution, gnus-outlook-rearrange-citation. + +2003-01-11 Lars Magne Ingebrigtsen + + * gnus.texi: Change .gnus to .gnus.el. + (Agent Commands): Remove batch here. + (MIME Commands): Add. + + * message.texi (Canceling News): Document canlock. + 2003-01-10 Alex Schroeder * gnus.texi (Creating a spam-stat dictionary): Explain how using diff --git a/texi/gnus-ja.texi b/texi/gnus-ja.texi index b53dcdf..e511f93 100644 --- a/texi/gnus-ja.texi +++ b/texi/gnus-ja.texi @@ -2984,7 +2984,7 @@ See also @code{gnus-group-ignored-charsets-alist}. @end ignore @item posting-style @cindex posting-style -$B$3$N%0%k!<%W$NDI2C$NEj9FMM<0$r$3$3$N$_$KJ]B8$9$k$3$H$,$G$-$^(B +$B$3$N%0%k!<%W$NDI2C$NEj9FMM<0$r$3$3$KJ]B8$9$k$3$H$,$G$-$^(B $B$9(B (@pxref{Posting Styles})$B!#=q<0$O(B @code{gnus-posting-style} $BO"A[%j%9%H(B $B$HF1$8$G$9$,!"$3$3$K$O%0%k!<%WL>$K9gCW$9$k@55,I=8=$O$"$j$^$;$s(B ($BEvA3$G(B $B$9(B)$B!#$3$N%0%k!<%W$NMM<0$NMWAG$O(B @code{gnus-posting-styles} $B$G8+$D$+$C$?(B @@ -2997,6 +2997,7 @@ See also @code{gnus-group-ignored-charsets-alist}. @example (posting-style (name "Funky Name") + ("X-My-Header" "Funky Value") (signature "Funky Signature")) @end example @@ -8139,11 +8140,35 @@ Sm*rtq**t*s $B$O$b$C$HB?$/$N0zMQJ8;z$rDs6!$9$k$?$a$K!"%^"#"#"#%="#"#$,>!o$K4JC1$G$9!#$"$J$?$N%a!<%k%P%C%/(B $B$1$G!"$"$H$N$3$H$O<+F0E*$K5/$3$j$^$9!#(B $BNc$($P!"(B@code{nnml} ($B$3$l$O(B "$B0l%a!<%k0l%U%!%$%k(B" $B%P%C%/%(%s%I$G$9(B) $B$r;H(B -$B$$$?$$$J$i!"C5n2DG=$r;HMQ$9$k$H!"(Bgnus $B$O$"$J$?$,FI$s$@(B $BA4$F$N5-;v$r!"$=$l$,4{FI$G$"$C$?$+L$FI$G$"$C$?$+$K4X$o$i$:!"4|8B@Z$l>C5n(B $B2DG=$H$7$F0u$rIU$1$^$9!#4{FI$N0u$NIU$$$?5-;v$,<+F0E*$K4|8B@Z$l>C5n2DG=$H(B -$B$7$F0uIU$1$i$l$k$N$rHr$1$k$?$a$K!"0J2<$N$h$&$J$b$N$r(B @file{.gnus} $B%U%!%$(B -$B%k$K=q$/;v$,$G$-$^$9(B: +$B$7$F0uIU$1$i$l$k$N$rHr$1$k$?$a$K!"0J2<$N$h$&$J$b$N$r(B @file{.gnus.el} $B%U%!(B +$B%$%k$K=q$/;v$,$G$-$^$9(B: @vindex gnus-mark-article-hook @lisp @@ -16588,14 +16614,6 @@ file * Server Agent Commands:: @end menu -$B40A4$K%P%C%A$GF0:n$5$;$k$K$O!"%3%^%s%I9T$+$i0J2<$N$*$^$8$J$$$ro$K4JC1$G$9!#(B $B0J2<$N%7%'%k%9%/%j%W%H$OI,MW$J$3$H$rA4$F$d$C$F$/$l$k$G$7$g$&!#(B +@c TRANSLATEME! +You can run a complete batch command from the command line with the +following incantation: + @example #!/bin/sh -emacs -batch -l ~/.emacs -f gnus-agent-batch >/dev/null +emacs -batch -l ~/.emacs -f -l ~/.gnus.el gnus-agent-batch >/dev/null 2>&1 @end example @node Control Agents @@ -19805,8 +19827,8 @@ Gnus $B$O$5$^$6$^$J@)8f;R(B @dfn{handlers} $B$rDj5A$9$k$3$H$K$h$C$F$=$N$h$&$J $B$O(B @code{gnus-demon-timestep} $BIC$N$3$H$G$9!#$3$l$O=i4|@_Dj$G$O(B 60 $B$G$9!#(B $B$b$7$3$NJQ?t$rJQ99$9$k$H!"A4$F$N@)8f;R$N7W;~$K1F6A$rM?$($^$9!#(B) -$B$H$$$&$o$1$G!"@)8f;R$rDI2C$7$?$1$l$P!"(B@file{.gnus} $B%U%!%$%k$K!"0J2<$N$h(B -$B$&$J$b$N$r=q$/$3$H$,$G$-$^$9!#(B +$B$H$$$&$o$1$G!"@)8f;R$rDI2C$7$?$1$l$P!"(B@file{.gnus.el} $B%U%!%$%k$K!"0J2<$N(B +$B$h$&$J$b$N$r=q$/$3$H$,$G$-$^$9!#(B @findex gnus-demon-add-handler @lisp @@ -19820,8 +19842,8 @@ Gnus $B$O$5$^$6$^$J@)8f;R(B @dfn{handlers} $B$rDj5A$9$k$3$H$K$h$C$F$=$N$h$&$J @findex gnus-demon-add-disconnection $B$3$N$?$a$N4{@=4X?t$,$$$/$D$+:n@.$5$l$F$$$^$9!#(B @code{gnus-demon-add-nocem}, @code{gnus-demon-add-disconnection}, @code{gnus-demon-add-nntp-close-connection}, @code{gnus-demon-add-scan-timestamps}, @code{gnus-demon-add-rescan}, @code{gnus-demon-add-scanmail} $B$G(B -$B$9!#$3$l$i$NG=NO$,M_$7$1$l$P!"C1$K$3$l$i$N4X?t$r(B @file{.gnus} $B$KF~$l$F$/(B -$B$@$5$$!#(B +$B$9!#$3$l$i$NG=NO$,M_$7$1$l$P!"C1$K$3$l$i$N4X?t$r(B @file{.gnus.el} $B$KF~$l(B +$B$F$/$@$5$$!#(B @findex gnus-demon-init @findex gnus-demon-cancel @@ -22582,7 +22604,7 @@ Gnus $B$OIaDL$N(B Emacs $B$NJ}K!$G<+F0J]B8$5$l$k%I%j%V%k%P%C%U%!$rJ];}$7$F$$$ @item Gnus $B$O:#$d%U%!%$%k(B @file{.emacs} $B$r$0$A$c$0$A$c$K$9$k;v$rHr$1$k$?$a$K@l(B -$BMQ$N5/F0%U%!%$%k(B (@file{.gnus}) $B$r;}$D$h$&$K$J$j$^$7$?!#(B +$BMQ$N5/F0%U%!%$%k(B (@file{.gnus.el}) $B$r;}$D$h$&$K$J$j$^$7$?!#(B @item $B%0%k!<%W$H5-;v$NN>J}$K%W%m%;%90u$rIU$1$k$3$H$,$G$-!"A4$F$N0u$NIU$$$?9`L\(B diff --git a/texi/gnus.texi b/texi/gnus.texi index a6abec7..4025d03 100644 --- a/texi/gnus.texi +++ b/texi/gnus.texi @@ -2890,7 +2890,7 @@ See also @code{gnus-group-ignored-charsets-alist}. @item posting-style @cindex posting-style -You can store additional posting style information for this group only +You can store additional posting style information for this group here (@pxref{Posting Styles}). The format is that of an entry in the @code{gnus-posting-styles} alist, except that there's no regexp matching the group name (of course). Style elements in this group parameter will @@ -2903,6 +2903,7 @@ like this in the group parameters: @example (posting-style (name "Funky Name") + ("X-My-Header" "Funky Value") (signature "Funky Signature")) @end example @@ -8300,11 +8301,34 @@ apostrophe or quotation mark, then try this wash. @item W k @kindex W k (Summary) +@kindex W Y f (Summary) @findex gnus-article-outlook-deuglify-article @cindex Outlook Express -Deuglify broken Outlook (Express) articles and redisplay +Deuglify broken Outlook (Express) articles. (@code{gnus-article-outlook-deuglify-article}). +@item W Y u +@kindex W Y u (Summary) +@findex gnus-outlook-unwrap-lines +Unwrap lines that appear to be wrapped citation lines. You can control +what lines will be unwrapped by frobbing +@code{gnus-outlook-deuglify-unwrap-min} and +@code{gnus-outlook-deuglify-unwrap-max}, indicating the miminum and +maximum length of an unwrapped citation line. +(@code{gnus-outlook-deuglify-article}). + +@item W Y a +@kindex W Y a (Summary) +@findex gnus-outlook-repair-attribution +Repair a broken attribution line +(@code{gnus-outlook-repair-attribution}). + +@item W Y c +@kindex W Y c (Summary) +@findex gnus-outlook-rearrange-citation +Repair broken citations by rearranging the text. +(@code{gnus-outlook-rearrange-citation}). + @item W w @kindex W w (Summary) @findex gnus-article-fill-cited-article @@ -8931,6 +8955,21 @@ To have all Vcards be ignored, you'd say something like this: '("text/x-vcard")) @end lisp +@item gnus-article-loose-mime +@vindex gnus-article-loose-mime +If non-@code{nil}, Gnus won't required the @samp{MIME-Version} header +before interpreting the message as a @sc{mime} message. This helps +when reading messages from certain broken mail user agents. The +default is @code{nil}. + +@item gnus-article-emulate-mime +@vindex gnus-article-emulate-mime +There are other, non-@sc{mime} encoding methods used. The most common +is @samp{uuencode}, but yEncode is also getting to be popular. If +This variable is non-@code{nil}, Gnus will look in message bodies to +see if it finds these encodings, and if so, it'll run them through the +Gnus @sc{mime} machinery. The default is @code{t}. + @item gnus-unbuttonized-mime-types @vindex gnus-unbuttonized-mime-types This is a list of regexps. @sc{mime} types that match a regexp from @@ -9017,7 +9056,7 @@ such unenlightened users, you can make live easier by adding @end lisp @noindent -to your @file{.gnus} file. +to your @file{.gnus.el} file. @end table @@ -12541,7 +12580,7 @@ mail back end of your choice into @code{gnus-secondary-select-methods}, and things will happen automatically. For instance, if you want to use @code{nnml} (which is a "one file per -mail" back end), you could put the following in your @file{.gnus} file: +mail" back end), you could put the following in your @file{.gnus.el} file: @lisp (setq gnus-secondary-select-methods '((nnml ""))) @@ -13623,7 +13662,7 @@ However, if you change group parameters, you'd have to update @code{nnmail-split-fancy} manually. You can do it by running @code{gnus-group-split-update}. If you'd rather have it updated automatically, just tell @code{gnus-group-split-setup} to do it for -you. For example, add to your @file{.gnus}: +you. For example, add to your @file{.gnus.el}: @lisp (gnus-group-split-setup AUTO-UPDATE CATCH-ALL) @@ -13753,7 +13792,7 @@ By default, if you have auto expiry switched on, Gnus will mark all the articles you read as expirable, no matter if they were read or unread before. To avoid having articles marked as read marked as expirable automatically, you can put something like the following in your -@file{.gnus} file: +@file{.gnus.el} file: @vindex gnus-mark-article-hook @lisp @@ -16971,13 +17010,6 @@ toggles the plugged/unplugged state of the Gnus Agent. * Server Agent Commands:: @end menu -You can run a complete batch command from the command line with the -following incantation: - -@cindex gnus-agent-batch -@example -$ emacs -batch -l ~/.gnus.el -f gnus-agent-batch -@end example @@ -17318,9 +17350,12 @@ Having the Gnus Agent fetch articles (and post whatever messages you've written) is quite easy once you've gotten things set up properly. The following shell script will do everything that is necessary: +You can run a complete batch command from the command line with the +following incantation: + @example #!/bin/sh -emacs -batch -l ~/.emacs -f gnus-agent-batch >/dev/null +emacs -batch -l ~/.emacs -f -l ~/.gnus.el gnus-agent-batch >/dev/null 2>&1 @end example @@ -20241,7 +20276,7 @@ seconds. This is 60 by default. If you change that variable, all the timings in the handlers will be affected.) So, if you want to add a handler, you could put something like this in -your @file{.gnus} file: +your @file{.gnus.el} file: @findex gnus-demon-add-handler @lisp @@ -20258,7 +20293,7 @@ Some ready-made functions to do this have been created: @code{gnus-demon-add-nntp-close-connection}, @code{gnus-demon-add-scan-timestamps}, @code{gnus-demon-add-rescan}, and @code{gnus-demon-add-scanmail}. Just put those functions in your -@file{.gnus} if you want those abilities. +@file{.gnus.el} if you want those abilities. @findex gnus-demon-init @findex gnus-demon-cancel @@ -23041,7 +23076,7 @@ manner, so it should be difficult to lose much data on what you have read if your machine should go down (@pxref{Auto Save}). @item -Gnus now has its own startup file (@file{.gnus}) to avoid cluttering up +Gnus now has its own startup file (@file{.gnus.el}) to avoid cluttering up the @file{.emacs} file. @item diff --git a/texi/message-ja.texi b/texi/message-ja.texi index 786365b..e9b12df 100644 --- a/texi/message-ja.texi +++ b/texi/message-ja.texi @@ -263,6 +263,24 @@ Message $B$O%U%)%m!<%"%C%W$,$I$3$K9T$/$+$rIaDL$NJ}K!$r;H$C$F7hDj$7$^$9$,!"(B @code{message-cancel-message} $B$NCM$,C$75-;v$NK\J8$KA^F~$5$l$^$9!#%G%#(B $B%U%)%k%H$O(B @samp{I am canceling my own article.} $B$G$9!#(B +@c TRANSLATEME! +@cindex Cancel Locks +@vindex message-insert-canlock +@cindex canlock +When Message posts news messages, it inserts @code{Cancel-Lock} +headers by default. This is a cryptographic header that ensures that +only you can cancel your own messages, which is nice. The downside +is that if you lose your @file{.emacs} file (which is where Gnus +stores the secret cancel lock password (which is generated +automatically the first time you use this feature)), you won't be +able to cancel your message. + +Whether to insert the header or not is controlled by the +@code{message-insert-canlock} variable. + +Not many news servers respect the @code{Cancel-Lock} header yet, but +this is expected to change in the future. + @node Superseding @section $BBeBX(B @@ -673,23 +691,23 @@ MFT $B$rB:=E$9$k$3$H$ONI$$%M%A%1%C%H(B (nettiquette) $B$G$"$k$H9M$($i$l$F$$$^ @kindex M-x message-insert-importance-high @findex message-insert-importance-high @cindex Importance -$BCM(B @samp{high} $B$r;}$D(B @samp{Importance:} $B%X%C%@!<$rA^F~$7$^$9!#I,MW$J(B +$BCM(B @samp{high} $B$r;}$D(B @samp{Importance} $B%X%C%@!<$rA^F~$7$^$9!#I,MW$J(B $B$i(B ($B$9$G$K$"$k(B) $B%X%C%@!<$r>C5n$7$F$+$i!#(B @item M-x message-insert-importance-low @kindex M-x message-insert-importance-low @findex message-insert-importance-low @cindex Importance -$BCM(B @samp{low} $B$r;}$D(B @samp{Importance:} $B%X%C%@!<$rA^F~$7$^$9!#I,MW$J(B +$BCM(B @samp{low} $B$r;}$D(B @samp{Importance} $B%X%C%@!<$rA^F~$7$^$9!#I,MW$J(B $B$i(B ($B$9$G$K$"$k(B) $B%X%C%@!<$r>C5n$7$F$+$i!#(B @item C-c C-f s @kindex C-c C-f s @findex message-change-subject @cindex Subject -$B8=:_$N(B @samp{Subject:} $B%X%C%@!<$rJQ99$7$^$9!#?7$7$$(B @samp{Subject:} $B$r?R(B -$B$M$F(B @code{(was: <$B8E$$BjL>(B>)} $B$rDI2C$7$^$9!#8E$$BjL>$OJV?.$9$k$H$-$K:o=|(B -$B$9$k$3$H$,$G$-$^$9!#(B@code{message-subject-trailing-was-query} +$B8=:_$N(B @samp{Subject} $B%X%C%@!<$rJQ99$7$^$9!#?7$7$$(B @samp{Subject} $B$r?R$M(B +$B$F(B @code{(was: <$B8E$$BjL>(B>)} $B$rDI2C$7$^$9!#8E$$BjL>$OJV?.$9$k$H$-$K:o=|$9(B +$B$k$3$H$,$G$-$^$9!#(B@code{message-subject-trailing-was-query} (@pxref{Message Headers}) $B$r8+$F2<$5$$!#(B @item C-c C-f x @@ -699,18 +717,23 @@ MFT $B$rB:=E$9$k$3$H$ONI$$%M%A%1%C%H(B (nettiquette) $B$G$"$k$H9M$($i$l$F$$$^ @cindex X-Post @cindex cross-post $B%/%m%9%]%9%H$9$k$?$a$KDI2C$9(B -$B$k(B @samp{Newsgroups:} $B$H(B @samp{FollowUp-To:} $B$r?R$M$^$9!#(B -@code{message-cross-post-followup-to} $B$O(B @samp{FollowUp-To:} $B$H(B @samp{Newsgroups:} $B$r!"(B +$B$k(B @samp{Newsgroups} $B$H(B @samp{FollowUp-To} $B$r?R$M$^$9!#(B +@code{message-cross-post-followup-to} $B$O(B @samp{FollowUp-To} $B$H(B @samp{Newsgroups} $B$r!"(B $B%0%k!<%W$r;X$7<($9$h$&$K@Z$jNv$-$^$9!#(B @code{message-cross-post-default} $B$,(B @code{nil} $B$@$C$?$j@\F,0z(B -$B?t(B @samp{Follow-Up:} $BIU$-$G8F$P$l$k$H!"%a%C%;!<%8$O%/%m%9%]%9%H$5$l$^$;(B +$B?t(B @samp{Follow-Up} $BIU$-$G8F$P$l$k$H!"%a%C%;!<%8$O%/%m%9%]%9%H$5$l$^$;(B $B$s!#(B @item C-c C-f t @kindex C-c C-f t @findex message-reduce-to-to-cc -@samp{To:} $B%X%C%@!<$NFbMF$r(B @samp{Cc:} $B$+(B @samp{Bcc:} $B%X%C%@!<$NFbMF$GCV(B -$B$-49$($^$9!#(B +@samp{To} $B%X%C%@!<$NFbMF$r(B @samp{Cc} $B$+(B @samp{Bcc} $B%X%C%@!<$NFbMF$GCV$-(B +$B49$($^$9!#(B + +@item C-c C-f w +@kindex C-c C-f w +@findex message-insert-wide-reply +$B9-$$JVEz$r$7$?$h$&$K(B @samp{To} $B$H(B @samp{Cc} $B%X%C%@!<$rA^F~$7$^$9!#(B @item C-c C-f a @kindex C-c C-f a diff --git a/texi/message.texi b/texi/message.texi index aeb2cac..7e19e4a 100644 --- a/texi/message.texi +++ b/texi/message.texi @@ -236,6 +236,23 @@ The value of @code{message-cancel-message} is inserted in the body of the cancel message. The default is @samp{I am canceling my own article.}. +@cindex Cancel Locks +@vindex message-insert-canlock +@cindex canlock +When Message posts news messages, it inserts @code{Cancel-Lock} +headers by default. This is a cryptographic header that ensures that +only you can cancel your own messages, which is nice. The downside +is that if you lose your @file{.emacs} file (which is where Gnus +stores the secret cancel lock password (which is generated +automatically the first time you use this feature)), you won't be +able to cancel your message. + +Whether to insert the header or not is controlled by the +@code{message-insert-canlock} variable. + +Not many news servers respect the @code{Cancel-Lock} header yet, but +this is expected to change in the future. + @node Superseding @section Superseding @@ -655,21 +672,21 @@ notification that she received the message. @kindex M-x message-insert-importance-high @findex message-insert-importance-high @cindex Importance -Insert an @samp{Importance:} header with a value of @samp{high}, +Insert an @samp{Importance} header with a value of @samp{high}, deleting headers if necessary. @item M-x message-insert-importance-low @kindex M-x message-insert-importance-low @findex message-insert-importance-low @cindex Importance -Insert an @samp{Importance:} header with a value of @samp{low}, deleting +Insert an @samp{Importance} header with a value of @samp{low}, deleting headers if necessary. @item C-c C-f s @kindex C-c C-f s @findex message-change-subject @cindex Subject -Change the current @samp{Subject:} header. Ask for new @samp{Subject:} +Change the current @samp{Subject} header. Ask for new @samp{Subject} header and append @code{(was: )}. The old subject can be stripped on replying, see @code{message-subject-trailing-was-query} (@pxref{Message Headers}). @@ -680,18 +697,24 @@ stripped on replying, see @code{message-subject-trailing-was-query} @vindex message-cross-post-default @cindex X-Post @cindex cross-post -Ask for an additional @samp{Newsgroups:} and @samp{FollowUp-To:} for a +Ask for an additional @samp{Newsgroups} and @samp{FollowUp-To} for a cross-post. @code{message-cross-post-followup-to} mangles -@samp{FollowUp-To:} and @samp{Newsgroups:} header to point to group. +@samp{FollowUp-To} and @samp{Newsgroups} header to point to group. If @code{message-cross-post-default} is @code{nil} or if called with a -prefix-argument @samp{Follow-Up:} is set, but the message is not +prefix-argument @samp{Follow-Up} is set, but the message is not cross-posted. @item C-c C-f t @kindex C-c C-f t @findex message-reduce-to-to-cc -Replace contents of @samp{To:} header with contents of @samp{Cc:} or -@samp{Bcc:} header. +Replace contents of @samp{To} header with contents of @samp{Cc} or +@samp{Bcc} header. + +@item C-c C-f w +@kindex C-c C-f w +@findex message-insert-wide-reply +Insert @samp{To} and @samp{Cc} headers as if you were doing a wide +reply. @item C-c C-f a @kindex C-c C-f a