From: yamaoka Date: Sun, 30 Sep 2001 23:41:27 +0000 (+0000) Subject: Synch with Oort Gnus. X-Git-Tag: t-gnus-6_15_4-08-quimby-last-~63 X-Git-Url: http://git.chise.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=6e72882aeb44eaa356181ea7becafd424a112635;p=elisp%2Fgnus.git- Synch with Oort Gnus. --- diff --git a/lisp/ChangeLog b/lisp/ChangeLog index a180eab..7b5ca57 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,40 @@ +2001-09-30 Dan Christensen + + * gnus-sum.el (gnus-summary-extract-address-component): New function. + (gnus-summary-from-or-to-or-newsgroups): Optimize. + +2001-09-29 Kai Gro,A_(Bjohann + + * 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 + + * 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 * gnus-xmas.el (gnus-article-x-face-command): Merge it into diff --git a/lisp/gnus-delay.el b/lisp/gnus-delay.el index ac89011..449f9cb 100644 --- a/lisp/gnus-delay.el +++ b/lisp/gnus-delay.el @@ -24,23 +24,44 @@ ;; 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: @@ -116,6 +137,7 @@ 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) @@ -123,25 +145,27 @@ DELAY is a string, giving the length of the time. Possible values are: (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) @@ -149,11 +173,8 @@ DELAY is a string, giving the length of the time. Possible values are: 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))) diff --git a/lisp/gnus-group.el b/lisp/gnus-group.el index b0d3aaa..16cc279 100644 --- a/lisp/gnus-group.el +++ b/lisp/gnus-group.el @@ -873,6 +873,10 @@ simple manner.") ,@(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] diff --git a/lisp/gnus-sum.el b/lisp/gnus-sum.el index c36e9ea..ddeeaa4 100644 --- a/lisp/gnus-sum.el +++ b/lisp/gnus-sum.el @@ -2911,30 +2911,31 @@ buffer that was in action when the last article was fetched." (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 diff --git a/lisp/imap.el b/lisp/imap.el index 1079cd2..b082201 100644 --- a/lisp/imap.el +++ b/lisp/imap.el @@ -1,5 +1,5 @@ ;;; imap.el --- imap library -;; Copyright (C) 1998, 1999, 2000 +;; Copyright (C) 1998, 1999, 2000, 2001 ;; Free Software Foundation, Inc. ;; Author: Simon Josefsson @@ -218,14 +218,33 @@ until a successful connection is made." :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. @@ -273,11 +292,8 @@ NAME names the authenticator. CHECK is a function returning non-nil if 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. @@ -304,6 +320,8 @@ encoded mailboxes which doesn't translate into ISO-8859-1.") imap-process imap-calculate-literal-size-first imap-mailbox-data)) +(defconst imap-log-buffer "*imap-log*") +(defconst imap-debug-buffer "*imap-debug*") ;; Internal variables. @@ -371,14 +389,6 @@ human readable response text (a string).") "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*\")") - ;; Utility functions: @@ -480,7 +490,7 @@ If ARGS, PROMPT is used as an argument to `format'." (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))) @@ -539,7 +549,7 @@ If ARGS, PROMPT is used as an argument to `format'." (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))) @@ -595,7 +605,7 @@ If ARGS, PROMPT is used as an argument to `format'." (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))) @@ -623,7 +633,7 @@ If ARGS, PROMPT is used as an argument to `format'." (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))) @@ -658,7 +668,7 @@ If ARGS, PROMPT is used as an argument to `format'." (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))) @@ -694,7 +704,7 @@ If ARGS, PROMPT is used as an argument to `format'." (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))) @@ -1553,7 +1563,7 @@ on failure." (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))) @@ -1596,7 +1606,7 @@ on failure." (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))) @@ -1658,7 +1668,7 @@ Return nil if no complete line has arrived." (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))) @@ -2534,8 +2544,8 @@ Return nil if no complete line has arrived." (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 diff --git a/lisp/message.el b/lisp/message.el index 2da785c..2457d7b 100644 --- a/lisp/message.el +++ b/lisp/message.el @@ -1719,6 +1719,7 @@ Point is left at the beginning of the narrowed-to region." (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) @@ -1759,6 +1760,9 @@ Point is left at the beginning of the narrowed-to 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"))])) diff --git a/lisp/mm-util.el b/lisp/mm-util.el index 007df10..0840225 100644 --- a/lisp/mm-util.el +++ b/lisp/mm-util.el @@ -80,7 +80,9 @@ (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 diff --git a/lisp/nndoc.el b/lisp/nndoc.el index 5c115b7..4b0574b 100644 --- a/lisp/nndoc.el +++ b/lisp/nndoc.el @@ -43,8 +43,8 @@ "*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'.") @@ -81,6 +81,10 @@ from the document.") (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^ \\*") @@ -469,6 +473,10 @@ from the document.") (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) diff --git a/texi/ChangeLog b/texi/ChangeLog index 5eab462..d9999fe 100644 --- a/texi/ChangeLog +++ b/texi/ChangeLog @@ -1,3 +1,8 @@ +2001-09-29 Simon Josefsson + + * gnus.texi (Foreign Groups): Fix. Add "mailman". + (Document Groups): Ditto. + 2001-09-28 07:00:00 ShengHuo ZHU * Makefile.in (.texi): Remove $@ first. diff --git a/texi/gnus-ja.texi b/texi/gnus-ja.texi index c536b12..4f0bcbc 100644 --- a/texi/gnus-ja.texi +++ b/texi/gnus-ja.texi @@ -2608,10 +2608,12 @@ kiboze $B%0%k!<%W$r:n@.$7$^$9!#%W%m%s%W%H$GL>A0$H!"(Bkiboze $B%0%k!<%W$K!V4^$ $B%U%!%$%k$J$I$r$b$H$K%0%k!<%W$r:n@.$7$^(B $B$9(B (@code{gnus-group-make-doc-group})$B!#$3$N%3%^%s%I$K@\F,<-$rM?$($?>l9g!"(B $B%U%!%$%kL>$H%U%!%$%k%?%$%W$r%W%m%s%W%H$GF~NO$7$^$9!#8=:_%5%]!<%H$5$l$F$$(B -$B$k%U%!%$%k%?%$%W$O!"(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} $B$G(B -$B$9!#@\F,<-$J$7$G$3$N%3%^%s%I$rItJ,%a%C%;!<%8(B (multipart) $B$G$9!#(B @table @code @item nndoc-article-type @vindex nndoc-article-type -$B$3$l$O(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} $B$N(B -$B$$$:$l$+$G$J$/$F$O$J$j$^$;$s!#(B +$B$3$l$O(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} $B$*$h$S(B @code{mailman} $B$^$?$O(B @code{guess} $B$N$$$:$l$+$G$J$/(B +$B$F$O$J$j$^$;$s!#(B @item nndoc-post-type @vindex nndoc-post-type diff --git a/texi/gnus.texi b/texi/gnus.texi index 4ff1015..a808089 100644 --- a/texi/gnus.texi +++ b/texi/gnus.texi @@ -2518,10 +2518,12 @@ Read an arbitrary directory as if it were a newsgroup with the 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 @@ -14578,7 +14580,8 @@ Virtual server variables: 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