+2001-09-30 Dan Christensen <jdc+news@uwo.ca>
+
+ * gnus-sum.el (gnus-summary-extract-address-component): New function.
+ (gnus-summary-from-or-to-or-newsgroups): Optimize.
+
+2001-09-29 Kai Gro\e,A_\e(Bjohann <Kai.Grossjohann@CS.Uni-Dortmund.DE>
+
+ * message.el (message-mode-map): Keybinding for `gnus-delay-article'.
+ (message-mode-menu): Menu item for same.
+
+ * gnus-group.el (gnus-group-make-menu-bar): Menu item for sending
+ delayed articles.
+
+ * gnus-delay.el (gnus-delay-send-drafts): Do nothing if
+ nndraft:delayed does not exist.
+ (gnus-delay-initialize): Don't set up keymap, that's done from
+ message.el now.
+ (gnus-delay, gnus-delay-group, gnus-delay-header)
+ (gnus-delay-default-delay, gnus-delay-default-hour): Customize.
+
+2001-09-29 Simon Josefsson <jas@extundo.com>
+
+ * mm-util.el (mm-mime-mule-charset-alist): Encode mule-utf-8 as
+ utf-8, not eight-bit-control.
+
+ * imap.el (imap-shell-host, imap-default-user, imap-use-utf7)
+ (imap-log, imap-debug): Custom.
+ (imap-log-buffer, imap-debug-buffer): New constants.
+ (imap-kerberos4-open, imap-gssapi-open, imap-ssl-open)
+ (imap-network-open, imap-shell-open, imap-starttls-open)
+ (imap-send-command-1, imap-send-command, imap-arrival-filter)
+ (imap-debug): Use imap-*-buffer.
+
+ * nndoc.el (nndoc-article-type): Add mailman.
+ (nndoc-type-alist): Ditto.
+ (nndoc-mailman-type-p): New function.
+
2001-09-28 07:00:00 ShengHuo ZHU <zsh@cs.rochester.edu>
* gnus-xmas.el (gnus-article-x-face-command): Merge it into
;; Provide delayed posting of articles.
+;;; Todo:
+
+;; * `gnus-delay-send-drafts' barfs when group does not exist.
+;; * Integrate gnus-delay.el into the rest of Gnus automatically. How
+;; should this be done? Basically, we need to do what
+;; `gnus-delay-initialize' does. But in which files?
+
;;; 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.")
-
-(defvar gnus-delay-default-hour 8
- "*If deadline is given as date, then assume this time of day.")
+;;;###autoload
+(defgroup gnus-delay nil
+ "Arrange for sending postings later."
+ :group 'gnus)
+
+(defcustom gnus-delay-group "delayed"
+ "Group name for storing delayed articles."
+ :type 'string
+ :group 'gnus-delay)
+
+(defcustom gnus-delay-header "X-Gnus-Delayed"
+ "Header name for storing info about delayed articles."
+ :type 'string
+ :group 'gnus-delay)
+
+(defcustom gnus-delay-default-delay "3d"
+ "*Default length of delay."
+ :type 'string
+ :group 'gnus-delay)
+
+(defcustom gnus-delay-default-hour 8
+ "*If deadline is given as date, then assume this time of day."
+ :type 'integer
+ :group 'gnus-delay)
+;;;###autoload
(defun gnus-delay-article (delay)
"Delay this article by some time.
DELAY is a string, giving the length of the time. Possible values are:
(kill-buffer (current-buffer))
(message-do-actions message-postpone-actions))
+;;;###autoload
(defun gnus-delay-send-drafts ()
"Send all the delayed messages that are due now."
(interactive)
(let* ((group (format "nndraft:%s" gnus-delay-group))
articles
article deadline)
- (gnus-activate-group group)
- (setq articles (nndraft-articles))
- (while (setq article (pop articles))
- (gnus-request-head article group)
- (set-buffer nntp-server-buffer)
- (goto-char (point-min))
- (if (re-search-forward
- (concat "^" (regexp-quote gnus-delay-header) ":\\s-+")
- nil t)
- (progn
- (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 delayed article %d" article)
- (gnus-draft-send article group)
- (message "Sending delayed article %d...done" article)))
- (message "Delay header missing for article %d" article))))))
+ (when (gnus-gethash group gnus-newsrc-hashtb)
+ (gnus-activate-group group)
+ (setq articles (nndraft-articles))
+ (while (setq article (pop articles))
+ (gnus-request-head article group)
+ (set-buffer nntp-server-buffer)
+ (goto-char (point-min))
+ (if (re-search-forward
+ (concat "^" (regexp-quote gnus-delay-header) ":\\s-+")
+ nil t)
+ (progn
+ (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 delayed article %d" article)
+ (gnus-draft-send article group)
+ (message "Sending delayed article %d...done" article)))
+ (message "Delay header missing for article %d" article)))))))
;;;###autoload
(defun gnus-delay-initialize (&optional no-keymap no-check)
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.
+The optional arg NO-KEYMAP is ignored.
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\n" 'gnus-delay-article))
(unless no-check
(add-hook 'gnus-get-new-news-hook 'gnus-delay-send-drafts)))
,@(if (featurep 'xemacs) '(t)
'(:help "Get newly arrived articles"))
]
+ ["Send delayed articles" gnus-delay-send-drafts
+ ,@(if (featurep 'xemacs) '(t)
+ '(:help "Send all articles that are scheduled to be sent now"))
+ ]
["Activate all groups" gnus-activate-all-groups t]
["Restart Gnus" gnus-group-restart t]
["Read init file" gnus-group-read-init-file t]
(point) (progn (eval gnus-summary-dummy-line-format-spec) (point))
(list 'gnus-number gnus-tmp-number 'gnus-intangible gnus-tmp-number)))
+(defun gnus-summary-extract-address-component (from)
+ (or (car (funcall gnus-extract-address-components from))
+ from))
+
+(eval-when-compile (defvar gnus-tmp-from))
+
(defun gnus-summary-from-or-to-or-newsgroups (header)
- (let ((to (cdr (assq 'To (mail-header-extra header))))
- (newsgroups (cdr (assq 'Newsgroups (mail-header-extra header))))
- (default-mime-charset (with-current-buffer gnus-summary-buffer
+ (let ((default-mime-charset (with-current-buffer gnus-summary-buffer
default-mime-charset)))
- (cond
- ((and to
- gnus-ignored-from-addresses
- (string-match gnus-ignored-from-addresses
- (mail-header-from header)))
- (concat "-> "
- (or (car (funcall gnus-extract-address-components
- (funcall
- gnus-decode-encoded-word-function to)))
- (funcall gnus-decode-encoded-word-function to))))
- ((and newsgroups
- gnus-ignored-from-addresses
- (string-match gnus-ignored-from-addresses
- (mail-header-from header)))
- (concat "=> " newsgroups))
- (t
- (or (car (funcall gnus-extract-address-components
- (mail-header-from header)))
- (mail-header-from header))))))
+ ;; Is it really necessary to do this next part for each summary line?
+ ;; Luckily, doesn't seem to slow things down much.
+ (or
+ (and gnus-ignored-from-addresses
+ (string-match gnus-ignored-from-addresses gnus-tmp-from)
+ (let ((extra-headers (mail-header-extra header))
+ to
+ newsgroups)
+ (cond
+ ((setq to (cdr (assq 'To extra-headers)))
+ (concat "-> "
+ (gnus-summary-extract-address-component
+ (funcall gnus-decode-encoded-word-function to))))
+ ((setq newsgroups (cdr (assq 'Newsgroups extra-headers)))
+ (concat "=> " newsgroups)))))
+ (gnus-summary-extract-address-component gnus-tmp-from))))
(defun gnus-summary-insert-line (gnus-tmp-header
gnus-tmp-level gnus-tmp-current
;;; imap.el --- imap library
-;; Copyright (C) 1998, 1999, 2000
+;; Copyright (C) 1998, 1999, 2000, 2001
;; Free Software Foundation, Inc.
;; Author: Simon Josefsson <jas@pdc.kth.se>
:group 'imap
:type 'boolean)
-(defvar imap-shell-host "gateway"
- "Hostname of rlogin proxy.")
+(defcustom imap-use-utf7 t
+ "If non-nil, do utf7 encoding/decoding of mailbox names.
+Since the UTF7 decoding currently only decodes into ISO-8859-1
+characters, you may disable this decoding if you need to access UTF7
+encoded mailboxes which doesn't translate into ISO-8859-1."
+ :group 'imap
+ :type 'boolean)
-(defvar imap-default-user (user-login-name)
- "Default username to use.")
+(defcustom imap-log nil
+ "If non-nil, a imap session trace is placed in *imap-log* buffer."
+ :group 'imap
+ :type 'boolean)
-(defvar imap-error nil
- "Error codes from the last command.")
+(defcustom imap-debug nil
+ "If non-nil, random debug spews are placed in *imap-debug* buffer."
+ :group 'imap
+ :type 'boolean)
+
+(defcustom imap-shell-host "gateway"
+ "Hostname of rlogin proxy."
+ :group 'imap
+ :type 'string)
+
+(defcustom imap-default-user (user-login-name)
+ "Default username to use."
+ :group 'imap
+ :type 'string)
;; Various variables.
the server support the authenticator and AUTHENTICATE is a function
for doing the actuall authentification.")
-(defvar imap-use-utf7 t
- "If non-nil, do utf7 encoding/decoding of mailbox names.
-Since the UTF7 decoding currently only decodes into ISO-8859-1
-characters, you may disable this decoding if you need to access UTF7
-encoded mailboxes which doesn't translate into ISO-8859-1.")
+(defvar imap-error nil
+ "Error codes from the last command.")
;; Internal constants. Change theese and die.
imap-process
imap-calculate-literal-size-first
imap-mailbox-data))
+(defconst imap-log-buffer "*imap-log*")
+(defconst imap-debug-buffer "*imap-debug*")
;; Internal variables.
"Non-nil indicates that the server emitted a continuation request.
The actually value is really the text on the continuation line.")
-(defvar imap-log nil
- "Name of buffer for imap session trace.
-For example: (setq imap-log \"*imap-log*\")")
-
-(defvar imap-debug nil ;"*imap-debug*"
- "Name of buffer for random debug spew.
-For example: (setq imap-debug \"*imap-debug*\")")
-
\f
;; Utility functions:
(accept-process-output process 1)
(sit-for 1))
(and imap-log
- (with-current-buffer (get-buffer-create imap-log)
+ (with-current-buffer (get-buffer-create imap-log-buffer)
(buffer-disable-undo)
(goto-char (point-max))
(insert-buffer-substring buffer)))
(accept-process-output process 1)
(sit-for 1))
(and imap-log
- (with-current-buffer (get-buffer-create imap-log)
+ (with-current-buffer (get-buffer-create imap-log-buffer)
(buffer-disable-undo)
(goto-char (point-max))
(insert-buffer-substring buffer)))
(accept-process-output process 1)
(sit-for 1))
(and imap-log
- (with-current-buffer (get-buffer-create imap-log)
+ (with-current-buffer (get-buffer-create imap-log-buffer)
(buffer-disable-undo)
(goto-char (point-max))
(insert-buffer-substring buffer)))
(accept-process-output process 1)
(sit-for 1))
(and imap-log
- (with-current-buffer (get-buffer-create imap-log)
+ (with-current-buffer (get-buffer-create imap-log-buffer)
(buffer-disable-undo)
(goto-char (point-max))
(insert-buffer-substring buffer)))
(accept-process-output process 1)
(sit-for 1))
(and imap-log
- (with-current-buffer (get-buffer-create imap-log)
+ (with-current-buffer (get-buffer-create imap-log-buffer)
(buffer-disable-undo)
(goto-char (point-max))
(insert-buffer-substring buffer)))
(accept-process-output process 1)
(sit-for 1))
(and imap-log
- (with-current-buffer (get-buffer-create imap-log)
+ (with-current-buffer (get-buffer-create imap-log-buffer)
(buffer-disable-undo)
(goto-char (point-max))
(insert-buffer-substring buffer)))
(defun imap-send-command-1 (cmdstr)
(setq cmdstr (concat cmdstr imap-client-eol))
(and imap-log
- (with-current-buffer (get-buffer-create imap-log)
+ (with-current-buffer (get-buffer-create imap-log-buffer)
(buffer-disable-undo)
(goto-char (point-max))
(insert cmdstr)))
(with-current-buffer cmd
(and imap-log
(with-current-buffer (get-buffer-create
- imap-log)
+ imap-log-buffer)
(buffer-disable-undo)
(goto-char (point-max))
(insert-buffer-substring cmd)))
(goto-char (point-max))
(insert string)
(and imap-log
- (with-current-buffer (get-buffer-create imap-log)
+ (with-current-buffer (get-buffer-create imap-log-buffer)
(buffer-disable-undo)
(goto-char (point-max))
(insert string)))
(when imap-debug ; (untrace-all)
(require 'trace)
- (buffer-disable-undo (get-buffer-create imap-debug))
- (mapcar (lambda (f) (trace-function-background f imap-debug))
+ (buffer-disable-undo (get-buffer-create imap-debug-buffer))
+ (mapcar (lambda (f) (trace-function-background f imap-debug-buffer))
'(
imap-read-passwd
imap-utf7-encode
(define-key message-mode-map "\C-c\C-s" 'message-send)
(define-key message-mode-map "\C-c\C-k" 'message-kill-buffer)
(define-key message-mode-map "\C-c\C-d" 'message-dont-send)
+ (define-key message-mode-map "\C-c\n" 'gnus-delay-article)
(define-key message-mode-map "\C-c\C-e" 'message-elide-region)
(define-key message-mode-map "\C-c\C-v" 'message-delete-not-region)
["Postpone Message" message-dont-send
,@(if (featurep 'xemacs) '(t)
'(:help "File this draft message and exit"))]
+ ["Send at Specific Time" gnus-delay-article
+ ,@(if (featurep 'xemacs) '(t)
+ '(:help "Ask, then arrange to send message at that time"))]
["Kill Message" message-kill-buffer
,@(if (featurep 'xemacs) '(t)
'(:help "Delete this message without sending"))]))
(not (coding-system-p 'mule-utf-8)))
'(utf-8 unicode-a unicode-b unicode-c unicode-d unicode-e)
;; If we have utf-8 we're in Mule 5+.
- (delete 'ascii (coding-system-get 'mule-utf-8 'safe-charsets))))
+ (append '(utf-8)
+ (delete 'ascii
+ (coding-system-get 'mule-utf-8 'safe-charsets)))))
"Alist of MIME-charset/MULE-charsets.")
(eval-and-compile
"*Type of the file.
One of `mbox', `babyl', `digest', `news', `rnews', `mmdf', `forward',
`rfc934', `rfc822-forward', `mime-parts', `standard-digest',
-`slack-digest', `clari-briefs', `nsmail', `outlook', `oe-dbx' or
-`guess'.")
+`slack-digest', `clari-briefs', `nsmail', `outlook', `oe-dbx',
+`mailman' or `guess'.")
(defvoo nndoc-post-type 'mail
"*Whether the nndoc group is `mail' or `post'.")
(article-begin . "^--.*\n+")
(body-end . "^--.*$")
(prepare-body-function . nndoc-unquote-dashes))
+ (mailman
+ (article-begin . "^--__--__--\n\nMessage:")
+ (body-end . "^--__--__--$")
+ (prepare-body-function . nndoc-unquote-dashes))
(clari-briefs
(article-begin . "^ \\*")
(body-end . "^\t------*[ \t]^*\n^ \\*")
(not (re-search-forward "^From:" nil t 2)))
t))
+(defun nndoc-mailman-type-p ()
+ (when (re-search-forward "^--__--__--\n+" nil t)
+ t))
+
(defun nndoc-rfc822-forward-type-p ()
(save-restriction
(message-narrow-to-head)
+2001-09-29 Simon Josefsson <jas@extundo.com>
+
+ * gnus.texi (Foreign Groups): Fix. Add "mailman".
+ (Document Groups): Ditto.
+
2001-09-28 07:00:00 ShengHuo ZHU <zsh@cs.rochester.edu>
* Makefile.in (.texi): Remove $@ first.
\e$B%U%!%$%k$J$I$r$b$H$K%0%k!<%W$r:n@.$7$^\e(B
\e$B$9\e(B (@code{gnus-group-make-doc-group})\e$B!#$3$N%3%^%s%I$K@\F,<-$rM?$($?>l9g!"\e(B
\e$B%U%!%$%kL>$H%U%!%$%k%?%$%W$r%W%m%s%W%H$GF~NO$7$^$9!#8=:_%5%]!<%H$5$l$F$$\e(B
-\e$B$k%U%!%$%k%?%$%W$O!"\e(B
-@code{babyl}, @code{mbox}, @code{digest}, @code{mmdf}, @code{news}, @code{rnews}, @code{clari-briefs}, @code{rfc934}, @code{rfc822-forward}, @code{nsmail}, @code{forward} \e$B$G\e(B
-\e$B$9!#@\F,<-$J$7$G$3$N%3%^%s%I$r<B9T$9$k$H!"\e(Bgnus \e$B$O%U%!%$%k%?%$%W$r?dB,$7\e(B
-\e$B$^$9!#\e(B
+\e$B$k%U%!%$%k%?%$%W$O\e(B @code{mbox}, @code{babyl}, @code{digest}, @code{news},
+@code{rnews}, @code{mmdf}, @code{forward}, @code{rfc934},
+@code{rfc822-forward}, @code{mime-parts}, @code{standard-digest},
+@code{slack-digest}, @code{clari-briefs}, @code{nsmail}, @code{outlook},
+@code{oe-dbx} \e$B$*$h$S\e(B @code{mailman} \e$B$G$9!#@\F,<-$J$7$G$3$N%3%^%s%I$r<B9T\e(B
+\e$B$9$k$H!"\e(Bgnus \e$B$O%U%!%$%k%?%$%W$r?dB,$7$^$9!#\e(B
@xref{Document Groups}\e$B!#\e(B
@item G u
@table @code
@item nndoc-article-type
@vindex nndoc-article-type
-\e$B$3$l$O\e(B @code{mbox}, @code{babyl}, @code{digest}, @code{news}, @code{rnews}, @code{mmdf}, @code{forward}, @code{rfc934}, @code{rfc822-forward}, @code{mime-digest}, @code{standard-digest}, @code{slack-digest}, @code{clari-briefs}, @code{guess} \e$B$N\e(B
-\e$B$$$:$l$+$G$J$/$F$O$J$j$^$;$s!#\e(B
+\e$B$3$l$O\e(B @code{mbox}, @code{babyl}, @code{digest}, @code{news},
+@code{rnews}, @code{mmdf}, @code{forward}, @code{rfc934},
+@code{rfc822-forward}, @code{mime-parts}, @code{standard-digest},
+@code{slack-digest}, @code{clari-briefs}, @code{nsmail}, @code{outlook},
+@code{oe-dbx} \e$B$*$h$S\e(B @code{mailman} \e$B$^$?$O\e(B @code{guess} \e$B$N$$$:$l$+$G$J$/\e(B
+\e$B$F$O$J$j$^$;$s!#\e(B
@item nndoc-post-type
@vindex nndoc-post-type
Make a group based on some file or other
(@code{gnus-group-make-doc-group}). If you give a prefix to this
command, you will be prompted for a file name and a file type.
-Currently supported types are @code{babyl}, @code{mbox}, @code{digest},
-@code{mmdf}, @code{news}, @code{rnews}, @code{clari-briefs},
-@code{rfc934}, @code{rfc822-forward}, @code{nsmail} and @code{forward}.
-If you run this command without a prefix, Gnus will guess at the file
+Currently supported types are @code{mbox}, @code{babyl},
+@code{digest}, @code{news}, @code{rnews}, @code{mmdf}, @code{forward},
+@code{rfc934}, @code{rfc822-forward}, @code{mime-parts},
+@code{standard-digest}, @code{slack-digest}, @code{clari-briefs},
+@code{nsmail}, @code{outlook}, @code{oe-dbx}, and @code{mailman}. If
+you run this command without a prefix, Gnus will guess at the file
type. @xref{Document Groups}.
@item G u
This should be one of @code{mbox}, @code{babyl}, @code{digest},
@code{news}, @code{rnews}, @code{mmdf}, @code{forward}, @code{rfc934},
@code{rfc822-forward}, @code{mime-parts}, @code{standard-digest},
-@code{slack-digest}, @code{clari-briefs}, @code{nsmail} or @code{guess}.
+@code{slack-digest}, @code{clari-briefs}, @code{nsmail},
+@code{outlook}, @code{oe-dbx}, and @code{mailman} or @code{guess}.
@item nndoc-post-type
@vindex nndoc-post-type