From: ichikawa Date: Sun, 3 May 1998 04:04:31 +0000 (+0000) Subject: *** empty log message *** X-Git-Tag: ichikawa-199811302358~71 X-Git-Url: http://git.chise.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=dcbb4e9e5e61cf9ea7d47990c4f360dd1fef62f2;p=elisp%2Fgnus.git- *** empty log message *** --- diff --git a/ChangeLog b/ChangeLog index 2791ada..3ab41ac 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +1998-05-03 Tatsuya Ichikawa + + * lisp/gnus.el (gnus-version-number): Update to 6.2.5. + * Sync up with Gnus 5.6.9. + 1998-04-30 MORIOKA Tomohiko * lisp/gnus.el (gnus-version-number): Update to 6.2.4. diff --git a/lisp/ChangeLog b/lisp/ChangeLog index a08a9b9..b03978a 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,62 @@ +Fri May 1 21:59:35 1998 Lars Magne Ingebrigtsen + + * gnus.el: Gnus v5.6.9 is released. + +Fri May 1 21:54:30 1998 Lars Magne Ingebrigtsen + + * nnfolder.el (nnfolder-goto-article): Would infloop. + +Fri May 1 19:45:50 1998 Lars Magne Ingebrigtsen + + * gnus.el: Gnus v5.6.8 is released. + +Fri May 1 18:51:21 1998 Lars Magne Ingebrigtsen + + * nntp.el (nntp-request-newgroups): Use format-time-string. + + * message.el (message-fetch-field): Inhibit point-motion hooks. + +Fri May 1 18:33:06 1998 Wes Hardaker + + * gnus-score.el (gnus-adaptive-word-no-group-words): New variable. + +Fri May 1 16:56:32 1998 Lars Magne Ingebrigtsen + + * gnus-agent.el (gnus-agent-expire): Put point at the start of the + buffer. + + * gnus-soup.el (gnus-soup-parse-areas): Check whether the file + exists. + + * gnus-draft.el (gnus-draft-send): Use meta-information. + + * nnagent.el (nnagent-request-post): Store meta-information. + + * gnus-agent.el (gnus-agent-meta-information-header): New variable. + (gnus-agent-insert-meta-information): New function. + +Fri May 1 16:43:35 1998 Paul Franklin + + * message.el (message-generate-headers): Insert Sender when + required. + +Fri May 1 15:28:55 1998 Lars Magne Ingebrigtsen + + * gnus-util.el (gnus-dd-mmm): Accept "" dates. + + * gnus-cite.el (gnus-article-hide-citation): Don't remove button + when hiding. + + * gnus-msg.el (gnus-post-method): Allow ARG to override + `current'. + + * gnus-sum.el (gnus-remove-thread): Remove the dummy root + properly. + + * nnfolder.el (nnfolder-goto-article): New function. + (nnfolder-retrieve-headers): Use it. + (nnfolder-request-article): Ditto. + Wed Apr 29 22:48:33 1998 Lars Magne Ingebrigtsen * gnus.el: Gnus v5.6.7 is released. diff --git a/lisp/gnus-agent.el b/lisp/gnus-agent.el index f27161a..a9a1f4f 100644 --- a/lisp/gnus-agent.el +++ b/lisp/gnus-agent.el @@ -77,6 +77,8 @@ If nil, only read articles will be expired." ;;; Internal variables +(defvar gnus-agent-meta-information-header "X-Gnus-Agent-Meta-Information") + (defvar gnus-agent-history-buffers nil) (defvar gnus-agent-buffer-alist nil) (defvar gnus-agent-article-alist nil) @@ -330,8 +332,23 @@ agent minor mode in all Gnus buffers." (re-search-forward (concat "^" (regexp-quote mail-header-separator) "\n")) (replace-match "\n") + (gnus-agent-insert-meta-information 'mail) (gnus-request-accept-article "nndraft:queue"))) +(defun gnus-agent-insert-meta-information (type &optional method) + "Insert meta-information into the message that says how it's to be posted. +TYPE can be either `mail' or `news'. If the latter METHOD can +be a select method." + (save-excursion + (message-remove-header gnus-agent-meta-information-header) + (goto-char (point-min)) + (insert gnus-agent-meta-information-header ": " + (symbol-name type) " " (format "%S" method) + "\n") + (forward-char -1) + (while (search-backward "\n" nil t) + (replace-match "\\n" t t)))) + ;;; ;;; Group mode commands ;;; @@ -1257,6 +1274,7 @@ The following commands are available: (set-buffer (setq gnus-agent-current-history (setq history (gnus-agent-history-buffer)))) + (goto-char (point-min)) (unless (zerop (buffer-size)) (goto-char (point-min)) (while (not (eobp)) diff --git a/lisp/gnus-cite.el b/lisp/gnus-cite.el index 4230388..5dd0f89 100644 --- a/lisp/gnus-cite.el +++ b/lisp/gnus-cite.el @@ -485,6 +485,10 @@ always hide." (setq beg nil) (setq beg (point-marker)))) (when (and beg end) + ;; We use markers for the end-points to facilitate later + ;; wrapping and mangling of text. + (setq beg (set-marker (make-marker) beg) + end (set-marker (make-marker) end)) (gnus-add-text-properties beg end props) (goto-char beg) (unless (save-excursion (search-backward "\n\n" nil t)) @@ -496,10 +500,7 @@ always hide." (point) (progn (eval gnus-cited-text-button-line-format-spec) (point)) `gnus-article-toggle-cited-text - ;; We use markers for the end-points to facilitate later - ;; wrapping and mangling of text. - (cons (set-marker (make-marker) beg) - (set-marker (make-marker) end))) + (cons beg end)) (point)) 'article-type 'annotation) (set-marker beg (point))))))))) diff --git a/lisp/gnus-draft.el b/lisp/gnus-draft.el index f5e5d6c..7b7c6fb 100644 --- a/lisp/gnus-draft.el +++ b/lisp/gnus-draft.el @@ -31,6 +31,7 @@ (require 'message) (require 'gnus-msg) (require 'nndraft) +(require 'gnus-agent) (eval-when-compile (require 'cl)) ;;; Draft minor mode @@ -118,8 +119,26 @@ "Send message ARTICLE." (gnus-draft-setup article (or group "nndraft:queue")) (let ((message-syntax-checks 'dont-check-for-anything-just-trust-me) - message-send-hook) - (message-send-and-exit))) + message-send-hook type method) + ;; We read the meta-information that says how and where + ;; this message is to be sent. + (save-restriction + (message-narrow-to-head) + (when (re-search-forward + (concat "^" (regexp-quote gnus-agent-meta-information-header) ":") + nil t) + (setq type (ignore-errors (read (current-buffer))) + method (ignore-errors (read (current-buffer)))) + (message-remove-header gnus-agent-meta-information-header))) + ;; Then we send it. If we have no meta-information, we just send + ;; it and let Message figure out how. + (if type + (let ((message-this-is-news (eq type 'news)) + (message-this-is-mail (eq type 'mail)) + (gnus-post-method method) + (message-post-method method)) + (message-send-and-exit)) + (message-send-and-exit)))) (defun gnus-draft-send-all-messages () "Send all the sendable drafts." diff --git a/lisp/gnus-msg.el b/lisp/gnus-msg.el index 78f3cbf..824c191 100644 --- a/lisp/gnus-msg.el +++ b/lisp/gnus-msg.el @@ -487,7 +487,8 @@ If SILENT, don't prompt the user." (cons (or gnus-last-posting-server "") 0)))) method-alist)))) ;; Override normal method. - ((eq gnus-post-method 'current) + ((and (eq gnus-post-method 'current) + (not arg)) group-method) (gnus-post-method gnus-post-method) diff --git a/lisp/gnus-score.el b/lisp/gnus-score.el index 19332b7..8a1dfec 100644 --- a/lisp/gnus-score.el +++ b/lisp/gnus-score.el @@ -269,6 +269,11 @@ This variable allows the same syntax as `gnus-home-score-file'." :group 'gnus-score-adapt :type '(choice (const nil) integer)) +(defcustom gnus-adaptive-word-no-group-words nil + "If t, don't adaptively score words included in the group name." + :group 'gnus-score-adapt + :type 'boolean) + (defcustom gnus-score-mimic-keymap nil "*Have the score entry functions pretend that they are a keymap." :group 'gnus-score-default @@ -2089,6 +2094,10 @@ SCORE is the score to add." (set-syntax-table syntab)) ;; Make all the ignorable words ignored. (let ((ignored (append gnus-ignored-adaptive-words + (if gnus-adaptive-word-no-group-words + (message-tokenize-header + (gnus-group-real-name gnus-newsgroup-name) + ".")) gnus-default-ignored-adaptive-words))) (while ignored (gnus-sethash (pop ignored) nil hashtb))))) @@ -2217,6 +2226,11 @@ SCORE is the score to add." (set-syntax-table syntab)) ;; Make all the ignorable words ignored. (let ((ignored (append gnus-ignored-adaptive-words + (if gnus-adaptive-word-no-group-words + (message-tokenize-header + (gnus-group-real-name + gnus-newsgroup-name) + ".")) gnus-default-ignored-adaptive-words))) (while ignored (gnus-sethash (pop ignored) nil hashtb))) diff --git a/lisp/gnus-soup.el b/lisp/gnus-soup.el index 5471940..43887f0 100644 --- a/lisp/gnus-soup.el +++ b/lisp/gnus-soup.el @@ -366,22 +366,23 @@ The vector contain five strings, [prefix name encoding description number] though the two last may be nil if they are missing." (let (areas) - (save-excursion - (set-buffer (nnheader-find-file-noselect file 'force)) - (buffer-disable-undo (current-buffer)) - (goto-char (point-min)) - (while (not (eobp)) - (push (vector (gnus-soup-field) - (gnus-soup-field) - (gnus-soup-field) - (and (eq (preceding-char) ?\t) - (gnus-soup-field)) - (and (eq (preceding-char) ?\t) - (string-to-int (gnus-soup-field)))) - areas) - (when (eq (preceding-char) ?\t) - (beginning-of-line 2))) - (kill-buffer (current-buffer))) + (when (file-exists-p file) + (save-excursion + (set-buffer (nnheader-find-file-noselect file 'force)) + (buffer-disable-undo (current-buffer)) + (goto-char (point-min)) + (while (not (eobp)) + (push (vector (gnus-soup-field) + (gnus-soup-field) + (gnus-soup-field) + (and (eq (preceding-char) ?\t) + (gnus-soup-field)) + (and (eq (preceding-char) ?\t) + (string-to-int (gnus-soup-field)))) + areas) + (when (eq (preceding-char) ?\t) + (beginning-of-line 2))) + (kill-buffer (current-buffer)))) areas)) (defun gnus-soup-parse-replies (file) diff --git a/lisp/gnus-sum.el b/lisp/gnus-sum.el index bf0ee86..cbcc92e 100644 --- a/lisp/gnus-sum.el +++ b/lisp/gnus-sum.el @@ -3245,6 +3245,11 @@ If NO-DISPLAY, don't generate a summary buffer." ;; If we use dummy roots, then we have to remove the ;; dummy root as well. (when (eq gnus-summary-make-false-root 'dummy) + ;; We go to the dummy root by going to + ;; the first sub-"thread", and then one line up. + (gnus-summary-goto-article + (mail-header-number (caadr thread))) + (forward-line -1) (gnus-delete-line) (gnus-data-compute-positions)) (setq thread (cdr thread)) diff --git a/lisp/gnus-util.el b/lisp/gnus-util.el index e48b14f..3e9394e 100644 --- a/lisp/gnus-util.el +++ b/lisp/gnus-util.el @@ -344,19 +344,21 @@ ;; it yet. -erik selberg@cs.washington.edu (defun gnus-dd-mmm (messy-date) "Return a string like DD-MMM from a big messy string" - (let ((datevec (ignore-errors (timezone-parse-date messy-date)))) - (if (not datevec) - "??-???" - (format "%2s-%s" - (condition-case () - ;; Make sure leading zeroes are stripped. - (number-to-string (string-to-number (aref datevec 2))) - (error "??")) - (capitalize - (or (car - (nth (1- (string-to-number (aref datevec 1))) - timezone-months-assoc)) - "???")))))) + (if (equal messy-date "") + "??-???" + (let ((datevec (ignore-errors (timezone-parse-date messy-date)))) + (if (not datevec) + "??-???" + (format "%2s-%s" + (condition-case () + ;; Make sure leading zeroes are stripped. + (number-to-string (string-to-number (aref datevec 2))) + (error "??")) + (capitalize + (or (car + (nth (1- (string-to-number (aref datevec 1))) + timezone-months-assoc)) + "???"))))))) (defmacro gnus-date-get-time (date) "Convert DATE string to Emacs time. diff --git a/lisp/gnus.el b/lisp/gnus.el index 682359f..1d11e1e 100644 --- a/lisp/gnus.el +++ b/lisp/gnus.el @@ -250,11 +250,11 @@ is restarted, and sometimes reloaded." :link '(custom-manual "(gnus)Exiting Gnus") :group 'gnus) -(defconst gnus-version-number "6.2.4" +(defconst gnus-version-number "6.2.5" "Version number for this version of gnus.") - + (defconst gnus-version - (format "Semi-gnus %s (based on Gnus 5.6.7; for SEMI 1.3)" + (format "Semi-gnus %s (based on Gnus 5.6.9; for SEMI 1.3)" gnus-version-number) "Version string for this version of gnus.") diff --git a/lisp/message.el b/lisp/message.el index 5ec1728..d116370 100644 --- a/lisp/message.el +++ b/lisp/message.el @@ -1004,7 +1004,8 @@ The cdr of ech entry is a function for applying the face to a region.") (defun message-fetch-field (header &optional not-all) "The same as `mail-fetch-field', only remove all newlines." - (let ((value (mail-fetch-field header nil (not not-all)))) + (let* ((inhibit-point-motion-hooks t) + (value (mail-fetch-field header nil (not not-all)))) (when value (nnheader-replace-chars-in-string value ?\n ? )))) @@ -1107,22 +1108,24 @@ Return the number of headers removed." (defun message-news-p () "Say whether the current buffer contains a news message." - (or message-this-is-news - (save-excursion - (save-restriction - (message-narrow-to-headers) - (and (message-fetch-field "newsgroups") - (not (message-fetch-field "posted-to"))))))) + (and (not message-this-is-mail) + (or message-this-is-news + (save-excursion + (save-restriction + (message-narrow-to-headers) + (and (message-fetch-field "newsgroups") + (not (message-fetch-field "posted-to")))))))) (defun message-mail-p () "Say whether the current buffer contains a mail message." - (or message-this-is-mail - (save-excursion - (save-restriction - (message-narrow-to-headers) - (or (message-fetch-field "to") - (message-fetch-field "cc") - (message-fetch-field "bcc")))))) + (and (not message-this-is-news) + (or message-this-is-mail + (save-excursion + (save-restriction + (message-narrow-to-headers) + (or (message-fetch-field "to") + (message-fetch-field "cc") + (message-fetch-field "bcc"))))))) (defun message-next-header () "Go to the beginning of the next header." @@ -3093,7 +3096,7 @@ Headers already prepared in the buffer are not modified." (insert "Original-") (beginning-of-line)) (when (or (message-news-p) - (string-match "^[^@]+@.+\\..+" secure-sender)) + (string-match "^[^@]+@.+\\..+" secure-sender)) (insert "Sender: " secure-sender "\n"))))))) (defun message-insert-courtesy-copy () diff --git a/lisp/nnagent.el b/lisp/nnagent.el index 76d4390..00af2e2 100644 --- a/lisp/nnagent.el +++ b/lisp/nnagent.el @@ -108,6 +108,7 @@ nil) (deffoo nnagent-request-post (&optional server) + (gnus-agent-insert-meta-information 'news gnus-command-method) (gnus-request-accept-article "nndraft:queue")) ;; Use nnml functions for just about everything. diff --git a/lisp/nnfolder.el b/lisp/nnfolder.el index 56ca0d6..3f8811f 100644 --- a/lisp/nnfolder.el +++ b/lisp/nnfolder.el @@ -101,24 +101,16 @@ time saver for large mailboxes.") (save-excursion (set-buffer nntp-server-buffer) (erase-buffer) - (let (article art-string start stop) + (let (article start stop) (nnfolder-possibly-change-group group server) (when nnfolder-current-buffer (set-buffer nnfolder-current-buffer) (goto-char (point-min)) (if (stringp (car articles)) 'headers - (while articles - (setq article (car articles)) - (setq art-string (nnfolder-article-string article)) + (while (setq article (pop articles)) (set-buffer nnfolder-current-buffer) - (when (or (search-forward art-string nil t) - ;; Don't search the whole file twice! Also, articles - ;; probably have some locality by number, so searching - ;; backwards will be faster. Especially if we're at the - ;; beginning of the buffer :-). -SLB - (search-backward art-string nil t)) - (nnmail-search-unix-mail-delim-backward) + (when (nnfolder-goto-article article) (setq start (point)) (search-forward "\n\n" nil t) (setq stop (1- (point))) @@ -126,8 +118,7 @@ time saver for large mailboxes.") (insert (format "221 %d Article retrieved.\n" article)) (insert-buffer-substring nnfolder-current-buffer start stop) (goto-char (point-max)) - (insert ".\n")) - (setq articles (cdr articles))) + (insert ".\n"))) (set-buffer nntp-server-buffer) (nnheader-fold-continuation-lines) @@ -165,9 +156,8 @@ time saver for large mailboxes.") (save-excursion (set-buffer nnfolder-current-buffer) (goto-char (point-min)) - (when (search-forward (nnfolder-article-string article) nil t) + (when (nnfolder-goto-article article) (let (start stop) - (nnmail-search-unix-mail-delim-backward) (setq start (point)) (forward-line 1) (unless (and (nnmail-search-unix-mail-delim) @@ -309,7 +299,7 @@ time saver for large mailboxes.") (set-buffer nnfolder-current-buffer) (while (and articles is-old) (goto-char (point-min)) - (when (search-forward (nnfolder-article-string (car articles)) nil t) + (when (nnfolder-goto-article (car articles)) (if (setq is-old (nnmail-expired-article-p newsgroup @@ -354,7 +344,7 @@ time saver for large mailboxes.") (nnfolder-possibly-change-group group server) (set-buffer nnfolder-current-buffer) (goto-char (point-min)) - (when (search-forward (nnfolder-article-string article) nil t) + (when (nnfolder-goto-article article) (nnfolder-delete-mail)) (when last (nnfolder-save-buffer) @@ -409,7 +399,7 @@ time saver for large mailboxes.") (nnfolder-normalize-buffer) (set-buffer nnfolder-current-buffer) (goto-char (point-min)) - (if (not (search-forward (nnfolder-article-string article) nil t)) + (if (not (nnfolder-goto-article article)) nil (nnfolder-delete-mail t t) (insert-buffer-substring buffer) @@ -484,6 +474,37 @@ time saver for large mailboxes.") (concat "\n" nnfolder-article-marker (int-to-string article) " ") (concat "\nMessage-ID: " article))) +(defun nnfolder-goto-article (article) + "Place point at the start of the headers of ARTICLE. +ARTICLE can be an article number or a Message-ID." + (let ((art-string (nnfolder-article-string article)) + end-search end start beg) + (beginning-of-line) + (unless (bobp) + (forward-char -1)) + (setq start (point)) + (while (and (not end-search) + (search-forward art-string nil t)) + (setq end (point)) + (nnmail-search-unix-mail-delim-backward) + (setq beg (point)) + (when (and (search-forward "\n\n" nil end) + (search-backward art-string nil beg)) + (setq end-search 'found) + (goto-char beg))) + (unless end-search + (goto-char start) + (while (and (not end-search) + (search-backward art-string nil t)) + (setq end (point)) + (nnmail-search-unix-mail-delim-backward) + (setq beg (point)) + (when (and (search-forward "\n\n" nil end) + (search-backward art-string nil beg)) + (setq end-search 'found) + (goto-char beg)))) + (eq end-search 'found))) + (defun nnfolder-delete-mail (&optional force leave-delim) "Delete the message that point is in." (save-excursion diff --git a/lisp/nntp.el b/lisp/nntp.el index 67c6957..a561140 100644 --- a/lisp/nntp.el +++ b/lisp/nntp.el @@ -711,16 +711,11 @@ server there that you can connect to. See also (nntp-possibly-change-group nil server) (save-excursion (set-buffer nntp-server-buffer) - (let* ((date (timezone-parse-date date)) - (time-string - (format "%s%02d%02d %s%s%s" - (substring (aref date 0) 2) (string-to-int (aref date 1)) - (string-to-int (aref date 2)) (substring (aref date 3) 0 2) - (substring - (aref date 3) 3 5) (substring (aref date 3) 6 8)))) - (prog1 - (nntp-send-command "^\\.\r?\n" "NEWGROUPS" time-string) - (nntp-decode-text))))) + (prog1 + (nntp-send-command + "^\\.\r?\n" "NEWGROUPS" + (format-time-string "%y%m%d %H%M%S" (nnmail-date-to-time date))) + (nntp-decode-text)))) (deffoo nntp-request-post (&optional server) (nntp-possibly-change-group nil server) diff --git a/texi/gnus.texi b/texi/gnus.texi index c99e60d..5c5ab42 100644 --- a/texi/gnus.texi +++ b/texi/gnus.texi @@ -1,7 +1,7 @@ \input texinfo @c -*-texinfo-*- @setfilename gnus -@settitle Semi-gnus 6.2.4 Manual +@settitle Semi-gnus 6.2.5 Manual @synindex fn cp @synindex vr cp @synindex pg cp @@ -316,7 +316,7 @@ into another language, under the above conditions for modified versions. @tex @titlepage -@title Semi-gnus 6.2.4 Manual +@title Semi-gnus 6.2.5 Manual @author by Lars Magne Ingebrigtsen @page @@ -359,7 +359,7 @@ internationalization/localization and multiscript features based on MULE API. So Semi-gnus does not discriminate various language communities. Oh, if you are a Klingon, please wait Unicode Next Generation. -This manual corresponds to Semi-gnus 6.2.4. +This manual corresponds to Semi-gnus 6.2.5. @end ifinfo diff --git a/texi/message.texi b/texi/message.texi index 728dc7e..b866dd2 100644 --- a/texi/message.texi +++ b/texi/message.texi @@ -1,7 +1,7 @@ \input texinfo @c -*-texinfo-*- @setfilename message -@settitle Message 5.6.7 Manual +@settitle Message 5.6.9 Manual @synindex fn cp @synindex vr cp @synindex pg cp @@ -42,7 +42,7 @@ into another language, under the above conditions for modified versions. @tex @titlepage -@title Message 5.6.7 Manual +@title Message 5.6.9 Manual @author by Lars Magne Ingebrigtsen @page @@ -83,7 +83,7 @@ Message mode buffers. * Key Index:: List of Message mode keys. @end menu -This manual corresponds to Message 5.6.7. Message is distributed with +This manual corresponds to Message 5.6.9. Message is distributed with the Gnus distribution bearing the same version number as this manual has.