* gnus-delay.el (gnus-delay-initialize): Don't use the macro `kbd'.
* nnheader.el (mm-read-coding-system): New function which is a substitute
for mm-util.el.
+2001-07-23 Katsumi Yamaoka <yamaoka@jpl.org>
+
+ * lisp/gnus-delay.el (gnus-delay-initialize): Don't use the macro
+ `kbd'.
+
+ * lisp/nnheader.el (mm-read-coding-system): New function which is
+ a substitute for mm-util.el.
+
2001-07-19 Katsumi Yamaoka <yamaoka@jpl.org>
* lisp/gnus-vers.el (gnus-revision-number): Increment to 04.
+2001-07-22 09:00:00 ShengHuo ZHU <zsh@cs.rochester.edu>
+
+ * gnus-msg.el (gnus-setup-message): make-local-hook.
+
+2001-07-22 Kai Gro\e,A_\e(Bjohann <Kai.Grossjohann@CS.Uni-Dortmund.DE>
+
+ * gnus-delay.el (gnus-delay-article): Fix `read-string' for
+ XEmacs. Allow more units. Submitted by Karl Kleinpaste
+ <karl@charcoal.com>, slightly changed by Kai.
+
+ * message.el (message-check-news-header-syntax): When checking
+ whether the groups exist, check the right server based on
+ `gnus-post-method'.
+
+2001-07-21 Kai Gro\e,A_\e(Bjohann <Kai.Grossjohann@CS.Uni-Dortmund.DE>
+
+ * gnus-delay.el: New file.
+
+2001-07-21 13:00:00 ShengHuo ZHU <zsh@cs.rochester.edu>
+
+ * mm-util.el (mm-read-coding-system): Take two arguments.
+
+ * gnus-sum.el (gnus-summary-show-article): Use
+ mm-read-coding-system.
+
+ * gnus-art.el (article-de-quoted-unreadable):
+ (article-de-base64-unreadable, article-wash-html):
+ (gnus-mime-inline-part, gnus-mime-view-part-as-charset): Ditto.
+
+2001-07-21 Kai Gro\e,A_\e(Bjohann <Kai.Grossjohann@CS.Uni-Dortmund.DE>
+
+ * nnml.el (nnml-request-post): New function. Can be used for
+ annotations in nnml groups.
+
+2001-07-19 Katsumi Yamaoka <yamaoka@jpl.org>
+
+ * nntp.el (nntp-request-newgroups): Use UTC date for NEWGROUPS
+ command.
+
+ * gnus-start.el (gnus-find-new-newsgroups): Use
+ `message-make-date' instead of `current-time-string'.
+ (gnus-ask-server-for-new-groups): Ditto.
+ (gnus-check-first-time-used): Ditto.
+
+2001-07-20 11:00:00 ShengHuo ZHU <zsh@cs.rochester.edu>
+
+ * gnus-score.el (gnus-home-score-file): nnheader-translate-file-chars.
+
+2001-07-18 Per Abrahamsen <abraham@dina.kvl.dk>
+
+ * message.el (message-shorten-references): Change `maxcount' and
+ `cut' to obey USEFOR draft 5.
+
+2001-07-12 Colin Walters <walters@cis.ohio-state.edu>
+
+ * gnus-sum.el (gnus-summary-display-arrow): New variable.
+ (gnus-summary-set-article-display-arrow): New function.
+ (gnus-summary-goto-subject): Use it.
+
2001-07-18 12:00:00 ShengHuo ZHU <zsh@cs.rochester.edu>
* gnus-sum.el (gnus-summary-import-article): Insert date if
(if (stringp charset)
(setq charset (intern (downcase charset)))))))
(if read-charset
- (setq charset (read-coding-system "Charset: " charset)))
+ (setq charset (mm-read-coding-system "Charset: " charset)))
(unless charset
(setq charset gnus-newsgroup-charset))
(when (or force
(if (stringp charset)
(setq charset (intern (downcase charset)))))))
(if read-charset
- (setq charset (read-coding-system "Charset: " charset)))
+ (setq charset (mm-read-coding-system "Charset: " charset)))
(unless charset
(setq charset gnus-newsgroup-charset))
(when (or force
(if (stringp charset)
(setq charset (intern (downcase charset)))))))
(if read-charset
- (setq charset (read-coding-system "Charset: " charset)))
+ (setq charset (mm-read-coding-system "Charset: " charset)))
(unless charset
(setq charset gnus-newsgroup-charset))
(article-goto-body)
(insert-buffer gnus-original-article-buffer)
(mime-to-mml gnus-article-mime-handles)
(setq gnus-article-mime-handles nil)
- (make-local-hook 'kill-buffer-hook)
(let ((mbl1 mml-buffer-list))
(setq mml-buffer-list mbl)
(set (make-local-variable 'mml-buffer-list) mbl1))
+ ;; LOCAL argument of add-hook differs between GNU Emacs
+ ;; and XEmacs. make-local-hook makes sure they are local.
+ (make-local-hook 'kill-buffer-hook)
(add-hook 'kill-buffer-hook 'mml-destroy-buffers t t)))
`(lambda (no-highlight)
(let ((mail-parse-charset (or gnus-article-charset
(setq charset
(or (cdr (assq arg
gnus-summary-show-article-charset-alist))
- (read-coding-system "Charset: ")))))
+ (mm-read-coding-system "Charset: ")))))
(forward-line 2)
(mm-insert-inline handle
(if (and charset
(let ((gnus-newsgroup-charset
(or (cdr (assq arg
gnus-summary-show-article-charset-alist))
- (read-coding-system "Charset: ")))
+ (mm-read-coding-system "Charset: ")))
(gnus-newsgroup-ignored-charsets 'gnus-all))
(gnus-article-press-button)))))
--- /dev/null
+;;; gnus-delay.el --- Delayed posting of articles -*- coding: latin-1; -*-
+
+;; Copyright (C) 2001 Free Software Foundation, Inc.
+
+;; Author: Kai Großjohann <Kai.Grossjohann@CS.Uni-Dortmund.DE>
+;; Keywords: mail, news, extensions
+
+;; This file is free software; you can redistribute it and/or modify
+;; it under the terms of the GNU General Public License as published by
+;; the Free Software Foundation; either version 2, or (at your option)
+;; any later version.
+
+;; This file is distributed in the hope that it will be useful,
+;; but WITHOUT ANY WARRANTY; without even the implied warranty of
+;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+;; GNU General Public License for more details.
+
+;; You should have received a copy of the GNU General Public License
+;; along with GNU Emacs; see the file COPYING. If not, write to
+;; the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+;; Boston, MA 02111-1307, USA.
+
+;;; Commentary:
+
+;; Provide delayed posting of articles.
+
+;;; Code:
+
+(require 'nndraft)
+(require 'gnus-draft)
+
+(defvar gnus-delay-group "delayed"
+ "Group name for storing delayed articles.")
+
+(defvar gnus-delay-header "X-Gnus-Delayed"
+ "Header name for storing info about delayed articles.")
+
+(defvar gnus-delay-default-delay "3d"
+ "*Default length of delay.")
+
+(defun gnus-delay-article (delay)
+ "Delay this article by some time.
+DELAY is a string, giving the length of the time. Possible values are
+<digits><units> for <units> in minutes (`m'), hours (`h'), days (`d'),
+weeks (`w'), months (`M'), or years (`Y')."
+ (interactive
+ (list (read-string "Length of delay (units in [mhdwMY]): "
+ gnus-delay-default-delay)))
+ (let (num unit days deadline)
+ (unless (string-match "\\([0-9]+\\)\\s-*\\([mhdwMY]\\)" delay)
+ (error "Malformed delay `%s'" delay))
+ (setq num (match-string 1 delay))
+ (setq unit (match-string 2 delay))
+ ;; Start from seconds, then multiply into needed units.
+ (setq num (string-to-number num))
+ (cond ((string= unit "Y")
+ (setq delay (* num 60 60 24 365)))
+ ((string= unit "M")
+ (setq delay (* num 60 60 24 30)))
+ ((string= unit "w")
+ (setq delay (* num 60 60 24 7)))
+ ((string= unit "d")
+ (setq delay (* num 60 60 24)))
+ ((string= unit "h")
+ (setq delay (* num 60 60)))
+ (t
+ (setq delay (* num 60))))
+ (setq deadline (message-make-date
+ (seconds-to-time (+ (time-to-seconds (current-time))
+ delay))))
+ (message-add-header (format "%s: %s" gnus-delay-header deadline)))
+ (set-buffer-modified-p t)
+ (nndraft-request-create-group gnus-delay-group)
+ (message-disassociate-draft)
+ (nndraft-request-associate-buffer gnus-delay-group)
+ (save-buffer 0)
+ (kill-buffer (current-buffer))
+ (message-do-actions message-postpone-actions))
+
+(defun gnus-delay-send-drafts ()
+ "Send all the delayed messages that are due now."
+ (interactive)
+ (save-excursion
+ (let* ((group (format "nndraft:%s" gnus-delay-group))
+ (articles (nndraft-articles))
+ article deadline)
+ (gnus-activate-group group)
+ (while (setq article (pop articles))
+ (gnus-request-head article group)
+ (set-buffer nntp-server-buffer)
+ (unless (re-search-forward
+ (concat "^" (regexp-quote gnus-delay-header) ":\\s-+"))
+ (error "Couldn't find delay for article %d" article))
+ (setq deadline (nnheader-header-value))
+ (setq deadline (apply 'encode-time (parse-time-string deadline)))
+ (setq deadline (time-since deadline))
+ (when (and (>= (nth 0 deadline) 0)
+ (>= (nth 1 deadline) 0))
+ (message "Sending article %d" article)
+ (gnus-draft-send article group)
+ (message "Sending article %d...done" article))))))
+
+;;;###autoload
+(defun gnus-delay-initialize (&optional no-keymap no-check)
+ "Initialize the gnus-delay package.
+This sets up a key binding in `message-mode' to delay a message.
+This tells Gnus to look for delayed messages after getting new news.
+
+Key binding is skipped if optional arg NO-KEYMAP is non-nil.
+Checking delayed messages is skipped if optional arg NO-CHECK is non-nil."
+ (unless no-keymap
+ (require 'message)
+ (define-key message-mode-map "\C-c\C-j" 'gnus-delay-article))
+ (unless no-check
+ (add-hook 'gnus-get-new-news-hook 'gnus-delay-send-drafts)))
+
+(provide 'gnus-delay)
+;;; gnus-delay.el ends here
(while funcs
(when (gnus-functionp (car funcs))
(setq score-files
- (nconc score-files (nreverse (funcall (car funcs) group)))))
+ (nconc score-files
+ (nreverse (funcall (car funcs) group)))))
(setq funcs (cdr funcs)))
(when gnus-score-use-all-scores
;; Add any home score files.
(while (and (not found)
(setq elem (pop list)))
(setq found
- (cond
- ;; Simple string.
- ((stringp elem)
- elem)
- ;; Function.
- ((gnus-functionp elem)
- (funcall elem group))
- ;; Regexp-file cons.
- ((consp elem)
- (when (string-match (gnus-globalify-regexp (car elem)) group)
- (replace-match (cadr elem) t nil group))))))
+ (cond
+ ;; Simple string.
+ ((stringp elem)
+ elem)
+ ;; Function.
+ ((gnus-functionp elem)
+ (funcall elem group))
+ ;; Regexp-file cons.
+ ((consp elem)
+ (when (string-match (gnus-globalify-regexp (car elem)) group)
+ (replace-match (cadr elem) t nil group))))))
(when found
+ (setq found (nnheader-translate-file-chars found))
(if (file-name-absolute-p found)
found
(nnheader-concat gnus-kill-files-directory found)))))
:group 'gnus-summary
:type 'hook)
+(defcustom gnus-summary-display-arrow
+ (and (string-match "GNU" (emacs-version))
+ (>= emacs-major-version 21)
+ (display-graphic-p))
+ "*If non-nil, display an arrow highlighting the current article."
+ :version "21.1"
+ :group 'gnus-summary
+ :type 'boolean)
+
(defcustom gnus-summary-selected-face 'gnus-summary-selected-face
"Face used for highlighting the current article in the summary buffer."
:group 'gnus-summary-visual
(aset table i [??]))))
(setq buffer-display-table table)))
+(defun gnus-summary-set-article-display-arrow (pos)
+ "Update the overlay arrow to point to line at position POS."
+ (when (and gnus-summary-display-arrow
+ (boundp 'overlay-arrow-position)
+ (boundp 'overlay-arrow-string))
+ (save-excursion
+ (goto-char pos)
+ (beginning-of-line)
+ (unless overlay-arrow-position
+ (setq overlay-arrow-position (make-marker)))
+ (setq overlay-arrow-string "=>"
+ overlay-arrow-position (set-marker overlay-arrow-position
+ (point)
+ (current-buffer))))))
+
(defun gnus-summary-buffer-name (group)
"Return the summary buffer name of GROUP."
(concat "*Summary " group "*"))
(unless silent
(gnus-message 3 "Can't find article %d" article))
nil)
- (goto-char (gnus-data-pos data))
+ (let ((pt (gnus-data-pos data)))
+ (goto-char pt)
+ (gnus-summary-set-article-display-arrow pt))
(gnus-summary-position-point)
article)))
((numberp arg)
(let ((gnus-newsgroup-charset
(or (cdr (assq arg gnus-summary-show-article-charset-alist))
- (read-coding-system "Charset: ")))
+ (mm-read-coding-system "Charset: ")))
(gnus-newsgroup-ignored-charsets 'gnus-all))
(gnus-summary-select-article nil 'force)
(let ((deps gnus-newsgroup-dependencies)
(if followup-to
(concat newsgroups "," followup-to)
newsgroups)))
- (hashtb (and (boundp 'gnus-active-hashtb)
- gnus-active-hashtb))
+ (known-groups
+ (mapcar '(lambda (n) (gnus-group-real-name n))
+ (gnus-groups-from-server
+ (cond ((equal gnus-post-method 'current)
+ gnus-current-select-method)
+ (gnus-post-method gnus-post-method)
+ (t gnus-select-method)))))
errors)
(while groups
- (when (and (not (boundp (intern (car groups) hashtb)))
- (not (equal (car groups) "poster")))
- (push (car groups) errors))
- (pop groups))
+ (unless (or (equal (car groups) "poster")
+ (member (car groups) known-groups))
+ (push (car groups) errors))
+ (pop groups))
(cond
;; Gnus is not running.
- ((or (not hashtb)
+ ((or (not (and (boundp 'gnus-active-hashtb)
+ gnus-active-hashtb))
(not (boundp 'gnus-read-active-file)))
t)
;; We don't have all the group names.
(nthcdr (+ (- cut 2) surplus 1) list)))
(defun message-shorten-references (header references)
- "Trim REFERENCES to be less than 31 Message-ID long, and fold them.
+ "Trim REFERENCES to be 21 Message-ID long or less, and fold them.
If folding is disallowed, also check that the REFERENCES are less
than 988 characters long, and if they are not, trim them until they are."
- (let ((maxcount 31)
+ (let ((maxcount 21)
(count 0)
- (cut 6)
+ (cut 2)
refs)
(with-temp-buffer
(insert references)
(make-char
. (lambda (charset int)
(int-to-char int)))
- (read-coding-system
- . (lambda (prompt)
- "Prompt the user for a coding system."
- (completing-read
- prompt (mapcar (lambda (s) (list (symbol-name (car s))))
- mm-mime-mule-charset-alist))))
(read-charset
. (lambda (prompt)
"Return a charset."
((fboundp 'char-valid-p) 'char-valid-p)
(t 'identity))))
+(eval-and-compile
+ (defalias 'mm-read-coding-system
+ (cond
+ ((fboundp 'read-coding-system)
+ (if (and (featurep 'xemacs)
+ (<= (string-to-number emacs-version) 21.1))
+ (lambda (prompt &optional default-coding-system)
+ (read-coding-system prompt))
+ 'read-coding-system))
+ (t (lambda (prompt &optional default-coding-system)
+ "Prompt the user for a coding system."
+ (completing-read
+ prompt (mapcar (lambda (s) (list (symbol-name (car s))))
+ mm-mime-mule-charset-alist)))))))
+
(defvar mm-coding-system-list nil)
(defun mm-get-coding-system-list ()
"Get the coding system list."
(push path result))))
(defalias 'mm-image-load-path 'nnheader-image-load-path)
+(defalias 'mm-read-coding-system
+ (if (or (and (featurep 'xemacs)
+ (<= (string-to-number emacs-version) 21.1))
+ (boundp 'MULE))
+ (lambda (prompt &optional default-coding-system)
+ (read-coding-system prompt))
+ 'read-coding-system))
+
(when (featurep 'xemacs)
(require 'nnheaderxm))
(nnml-save-nov))))
result))
+(deffoo nnml-request-post (&optional server)
+ (let ((success t))
+ (dolist (mbx (message-unquote-tokens
+ (message-tokenize-header
+ (message-fetch-field "Newsgroups") ", ")) success)
+ (let ((to-newsgroup (gnus-group-prefixed-name mbx gnus-command-method)))
+ (or (gnus-active to-newsgroup)
+ (gnus-activate-group to-newsgroup)
+ (if (gnus-y-or-n-p (format "No such group: %s. Create it? "
+ to-newsgroup))
+ (or (and (gnus-request-create-group
+ to-newsgroup gnus-command-method)
+ (gnus-activate-group to-newsgroup nil nil
+ gnus-command-method))
+ (error "Couldn't create group %s" to-newsgroup)))
+ (error "No such group: %s" to-newsgroup))
+ (unless (nnml-request-accept-article mbx (nth 1 gnus-command-method))
+ (setq success nil))))))
+
(deffoo nnml-request-replace-article (article group buffer)
(nnml-possibly-change-directory group)
(save-excursion
+2001-07-20 11:00:00 ShengHuo ZHU <zsh@cs.rochester.edu>
+ From Jesper Harder <harder@myrealbox.com>
+
+ * message.texi (Insertion): Addition.
+
+2001-07-19 22:00:00 ShengHuo ZHU <zsh@cs.rochester.edu>
+
+ * gnus.texi (Charsets): Addition.
+
2001-07-17 22:00:00 ShengHuo ZHU <zsh@cs.rochester.edu>
* gnus.texi (Searching for Articles): Raw articles.
@vindex gnus-group-charset-alist
This knowledge is encoded in the @code{gnus-group-charset-alist}
-variable, which is an alist of regexps (to match full group names) and
-default charsets to be used when reading these groups.
+variable, which is an alist of regexps (use the first item to match full
+group names) and default charsets to be used when reading these groups.
In addition, some people do use soi-disant @sc{mime}-aware agents that
aren't. These blithely mark messages as being in @code{iso-8859-1} even
@item message-citation-line-function
@vindex message-citation-line-function
+@cindex attribution line
\e$B0zMQ9T$rA^F~$9$k$?$a$K8F$P$l$k4X?t$G$9!#=i4|CM\e(B
\e$B$O\e(B @code{message-insert-citation-line} \e$B$G!"$3$l$O0zMQ9T$r<!$N$h$&$K$7$^\e(B
\e$B$9\e(B:
@item message-from-style
@vindex message-from-style
-@code{From} \e$B%X%C%@!<$,$I$N$h$&$K8+$($k$+$r;XDj$7$^$9!#\e(B4\e$B$D$N9gK!E*CM$,$"\e(B
-\e$B$j$^$9\e(B:
+@code{From} \e$B%X%C%@!<$,$I$N$h$&$K8+$($k$+$r;XDj$7$^$9!#0J2<$N#4$D$NCM$,;H\e(B
+\e$B$($^$9\e(B:
@table @code
@item nil
@table @code
@item message-send-mail-function
@vindex message-send-mail-function
+@findex message-send-mail-with-sendmail
+@findex message-send-mail-with-mh
+@findex message-send-mail-with-qmail
+@findex message-send-mail-with-smtp
+@findex smtpmail-send-it
+@findex feedmail-send-it
\e$B8=:_$N%P%C%U%!$r%a!<%k$H$7$FAw$k$?$a$K;H$o$l$k4X?t$G$9!#=i4|CM\e(B
-\e$B$O\e(B @code{message-send-mail-with-sendmail} \e$B$G$9!#$b$7Be$o$j$K\e(B MH \e$B$GAw$k$N\e(B
-\e$B$r9%$`$N$G$"$l$P!"$3$NJQ?t$r\e(B @code{message-send-mail-with-mh} \e$B$K@_Dj$7$F\e(B
-\e$B2<$5$$!#\e(B
+\e$B$O\e(B @code{message-send-mail-with-sendmail} \e$B$G$9!#B>\e(B
+\e$B$K\e(B @code{message-send-mail-with-mh},
+@code{message-send-mail-with-qmail}, @code{message-send-mail-with-smtp},
+@code{smtpmail-send-it} \e$B$*$h$S\e(B @code{feedmail-send-it} \e$B$,;H$($^$9!#\e(B
@item message-mh-deletable-headers
@vindex message-mh-deletable-headers
@vindex message-required-news-headers
@code{message-required-news-headers} \e$B$O%X%C%@!<%7%s%\%k$N%j%9%H$G$9!#$3\e(B
\e$B$l$i$N%X%C%@!<$O<+F0E*$K:n@.$5$l$k$+!"$b$7$/$O$=$l$,IT2DG=$G$"$l$P!"F~NO\e(B
-\e$B$rB%?J$7$^$9!#0J2<$N%7%s%\%k$O9gK!E*$G$9\e(B:
+\e$B$rB%?J$7$^$9!#0J2<$N%7%s%\%k$,;H$($^$9\e(B:
@table @code
@vindex message-syntax-checks
@code{nil} \e$B$G$J$1$l$P!"\e(BMessage \e$B$OEj9F$NA0$K!"%X%C%@!<$HB>$N$b$N$N9gK!@-\e(B
\e$B$rD4$Y$^$9!#$3$N%j%9%H$KMWAG$rIU$12C$($?$j<h$j=|$$$?$j$9$k;v$G!"D4$Y$kN3\e(B
-\e$B$NBg$-$5$r@)8f$9$k;v$,$G$-$^$9!#9gK!E*$JMWAG$O\e(B:
+\e$B$NBg$-$5$r@)8f$9$k;v$,$G$-$^$9!#;H$($kMWAG$O\e(B:
@table @code
@item subject-cmsg
@item long-lines
\e$B$"$^$j$KD9$$9T$rD4$Y$^$9!#\e(B
@item control-chars
-\e$BHs9gK!J8;z$rD4$Y$^$9!#\e(B
+\e$B;H$C$F$O$$$1$J$$J8;z$rD4$Y$^$9!#\e(B
@item size
\e$B2a>j$JBg$-$5$rD4$Y$^$9!#\e(B
@item new-text
@item message-citation-line-function
@vindex message-citation-line-function
+@cindex attribution line
Function called to insert the citation line. The default is
@code{message-insert-citation-line}, which will lead to citation lines
that look like:
@table @code
@item message-send-mail-function
@vindex message-send-mail-function
-Function used to send the current buffer as mail. The default is
-@code{message-send-mail-with-sendmail}. If you prefer using MH
-instead, set this variable to @code{message-send-mail-with-mh}.
+@findex message-send-mail-with-sendmail
+@findex message-send-mail-with-mh
+@findex message-send-mail-with-qmail
+@findex smtpmail-send-it
+@findex feedmail-send-it
+Function used to send the current buffer as mail. The default is
+@code{message-send-mail-with-sendmail}. Other valid values include
+@code{message-send-mail-with-mh}, @code{message-send-mail-with-qmail},
+@code{smtpmail-send-it} and @code{feedmail-send-it}.
@item message-mh-deletable-headers
@vindex message-mh-deletable-headers