+Fri May 1 19:45:50 1998 Lars Magne Ingebrigtsen <larsi@menja.ifi.uio.no>
+
+ * gnus.el: Gnus v5.6.8 is released.
+
+Fri May 1 18:51:21 1998 Lars Magne Ingebrigtsen <larsi@ifi.uio.no>
+
+ * 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 <wjhardaker@ucdavis.edu>
+
+ * gnus-score.el (gnus-adaptive-word-no-group-words): New variable.
+
+Fri May 1 16:56:32 1998 Lars Magne Ingebrigtsen <larsi@ifi.uio.no>
+
+ * 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 <paul@cs.washington.edu>
+
+ * message.el (message-generate-headers): Insert Sender when
+ required.
+
+Fri May 1 15:28:55 1998 Lars Magne Ingebrigtsen <larsi@ifi.uio.no>
+
+ * 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 <larsi@menja.ifi.uio.no>
* gnus.el: Gnus v5.6.7 is released.
;;; 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)
(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
;;;
(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))
(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))
(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)))))))))
(require 'message)
(require 'gnus-msg)
(require 'nndraft)
+(require 'gnus-agent)
(eval-when-compile (require 'cl))
;;; Draft minor mode
"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."
(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)
: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
(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)))))
(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)))
[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)
;; 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))
;; 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.
:link '(custom-manual "(gnus)Exiting Gnus")
:group 'gnus)
-(defconst gnus-version-number "5.6.7"
+(defconst gnus-version-number "5.6.8"
"Version number for this version of Gnus.")
(defconst gnus-version (format "Gnus v%s" gnus-version-number)
(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 ? ))))
(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."
(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 ()
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.
(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)))
(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)
(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)
(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
(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)
(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)
(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)
+ (while (not end-search)
+ (if (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))
+ (progn
+ (setq end (point))
+ (nnmail-search-unix-mail-delim-backward)
+ (unless (save-excursion (search-forward "\n\n" nil end))
+ (setq end-search 'found)))
+ (setq end-search t)))
+ (eq end-search 'found)))
+
(defun nnfolder-delete-mail (&optional force leave-delim)
"Delete the message that point is in."
(save-excursion
(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)
\input texinfo @c -*-texinfo-*-
@setfilename gnus
-@settitle Gnus 5.6.7 Manual
+@settitle Gnus 5.6.8 Manual
@synindex fn cp
@synindex vr cp
@synindex pg cp
@tex
@titlepage
-@title Gnus 5.6.7 Manual
+@title Gnus 5.6.8 Manual
@author by Lars Magne Ingebrigtsen
@page
spool or your mbox file. All at the same time, if you want to push your
luck.
-This manual corresponds to Gnus 5.6.7.
+This manual corresponds to Gnus 5.6.8.
@end ifinfo
* ding Gnus:: New things in Gnus 5.0/5.1, the first new Gnus.
* September Gnus:: The Thing Formally Known As Gnus 5.3/5.3.
* Red Gnus:: Third time best---Gnus 5.4/5.5.
-* Quassia Gnus:: Two times two is four, or Gnus 5.6.7.
+* Quassia Gnus:: Two times two is four, or Gnus 5.6.8.
@end menu
These lists are, of course, just @emph{short} overviews of the
@node Quassia Gnus
@subsubsection Quassia Gnus
-New features in Gnus 5.6.7:
+New features in Gnus 5.6.8:
@itemize @bullet
\input texinfo @c -*-texinfo-*-
@setfilename message
-@settitle Message 5.6.7 Manual
+@settitle Message 5.6.8 Manual
@synindex fn cp
@synindex vr cp
@synindex pg cp
@tex
@titlepage
-@title Message 5.6.7 Manual
+@title Message 5.6.8 Manual
@author by Lars Magne Ingebrigtsen
@page
* 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.8. Message is distributed with
the Gnus distribution bearing the same version number as this manual
has.