+2002-04-30 Katsumi Yamaoka <yamaoka@jpl.org>
+
+ * lisp/nnheader.el (nnheader-with-unibyte): New macro.
+ (mm-with-unibyte): Alias to `nnheader-with-unibyte'.
+
+2002-04-26 Steve Youngs <youngs@xemacs.org>
+
+ * aclocal.m4 (AC_PATH_INFODIR): New. Defaults to '$prefix/info'
+ for Emacs and 'site-packages/info' for XEmacs.
+ (AC_PATH_ETCDIR): Drop 'gnus' off the end of the default directory
+ for XEmacs.
+
+ * configure.in: Use 'AC_PATH_INFO_DIR'.
+
2002-04-23 Daiki Ueno <ueno@unixuser.org>
* lisp/gnus-bbdb.el (gnus-bbdb/update-record): Disregard the
AC_ARG_WITH(etcdir,[ --with-etcdir=DIR Where to install etc files], etcdir=${withval})
AC_MSG_CHECKING([where etc files should go])
if test -z "$etcdir"; then
- dnl Set default value
+ dnl Set default value.
if test "$EMACS_FLAVOR" = "xemacs"; then
- etcdir="\$(lispdir)/../etc/gnus"
+ etcdir="\$(lispdir)/../../etc"
else
etcdir="\$(lispdir)/../etc"
fi
AC_SUBST(etcdir)
])
+dnl
+dnl This is a bit on the "evil hack" side of things. It is so we can
+dnl have a different default infodir for XEmacs. A user can still specify
+dnl someplace else with '--infodir=DIR'.
+dnl
+AC_DEFUN(AC_PATH_INFO_DIR, [
+ AC_MSG_CHECKING([where the TeXinfo docs should go])
+ dnl Set default value. This must be an absolute path.
+ if test "$infodir" = "\${prefix}/info"; then
+ if test "$EMACS_FLAVOR" = "xemacs"; then
+ info_dir="\$(prefix)/${thedir}/${EMACS_FLAVOR}/site-packages/info"
+ else
+ info_dir="\$(prefix)/info"
+ fi
+ else
+ info_dir=$infodir
+ fi
+ AC_MSG_RESULT($info_dir)
+ AC_SUBST(info_dir)
+])
+
dnl
dnl Check whether a function exists in a library
dnl All '_' characters in the first argument are converted to '-'
echo "configure:1004: checking where etc files should go" >&5
if test -z "$etcdir"; then
if test "$EMACS_FLAVOR" = "xemacs"; then
- etcdir="\$(lispdir)/../etc/gnus"
+ etcdir="\$(lispdir)/../../etc"
else
etcdir="\$(lispdir)/../etc"
fi
+ echo $ac_n "checking where the TeXinfo docs should go""... $ac_c" 1>&6
+echo "configure:1017: checking where the TeXinfo docs should go" >&5
+ if test "$infodir" = "\${prefix}/info"; then
+ if test "$EMACS_FLAVOR" = "xemacs"; then
+ info_dir="\$(prefix)/${thedir}/${EMACS_FLAVOR}/site-packages/info"
+ else
+ info_dir="\$(prefix)/info"
+ fi
+ else
+ info_dir=$infodir
+ fi
+ echo "$ac_t""$info_dir" 1>&6
+
+
+
echo $ac_n "checking for acceptable URL version""... $ac_c" 1>&6
-echo "configure:1017: checking for acceptable URL version" >&5
+echo "configure:1032: checking for acceptable URL version" >&5
unset EMACS_cv_ACCEPTABLE_URL;
unset EMACS_cv_SYS_url_dir;
if test -z ""noecho""; then
echo $ac_n "checking for url-retrieve in url""... $ac_c" 1>&6
-echo "configure:1030: checking for url-retrieve in url" >&5
+echo "configure:1045: checking for url-retrieve in url" >&5
fi
library=`echo url | tr _ -`
elisp="(progn (fmakunbound (quote url-retrieve)) (condition-case nil (progn (require (quote $library)) (fboundp (quote url-retrieve))) (error (prog1 nil (message \"$library not found\")))))"
if test -z ""noecho""; then
echo $ac_n "checking for url""... $ac_c" 1>&6
-echo "configure:1037: checking for url" >&5
+echo "configure:1052: checking for url" >&5
fi
if eval "test \"\${EMACS_cv_SYS_url+set}\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
elisp="(file-name-directory (locate-library \"url\"))"
if test -z ""noecho""; then
echo $ac_n "checking for url_dir""... $ac_c" 1>&6
-echo "configure:1081: checking for url_dir" >&5
+echo "configure:1096: checking for url_dir" >&5
fi
if eval "test \"\${EMACS_cv_SYS_url_dir+set}\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
echo $ac_n "checking for acceptable W3 version""... $ac_c" 1>&6
-echo "configure:1123: checking for acceptable W3 version" >&5
+echo "configure:1138: checking for acceptable W3 version" >&5
unset EMACS_cv_ACCEPTABLE_W3;
unset EMACS_cv_SYS_w3_dir;
if test -z ""noecho""; then
echo $ac_n "checking for w3-form-encode-xwfu in w3_forms""... $ac_c" 1>&6
-echo "configure:1136: checking for w3-form-encode-xwfu in w3_forms" >&5
+echo "configure:1151: checking for w3-form-encode-xwfu in w3_forms" >&5
fi
library=`echo w3_forms | tr _ -`
elisp="(progn (fmakunbound (quote w3-form-encode-xwfu)) (condition-case nil (progn (require (quote $library)) (fboundp (quote w3-form-encode-xwfu))) (error (prog1 nil (message \"$library not found\")))))"
if test -z ""noecho""; then
echo $ac_n "checking for w3_forms""... $ac_c" 1>&6
-echo "configure:1143: checking for w3_forms" >&5
+echo "configure:1158: checking for w3_forms" >&5
fi
if eval "test \"\${EMACS_cv_SYS_w3_forms+set}\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
elisp="(file-name-directory (locate-library \"w3-forms\"))"
if test -z ""noecho""; then
echo $ac_n "checking for w3_dir""... $ac_c" 1>&6
-echo "configure:1187: checking for w3_dir" >&5
+echo "configure:1202: checking for w3_dir" >&5
fi
if eval "test \"\${EMACS_cv_SYS_w3_dir+set}\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
# Extract the first word of "$ac_prog", so it can be a program name with args.
set dummy $ac_prog; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:1234: checking for $ac_word" >&5
+echo "configure:1249: checking for $ac_word" >&5
if eval "test \"\${ac_cv_path_LATEX+set}\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
test -n "$LATEX" || LATEX="no"
echo $ac_n "checking for available fonts""... $ac_c" 1>&6
-echo "configure:1271: checking for available fonts" >&5
+echo "configure:1286: checking for available fonts" >&5
# Check whether --with-fonts or --without-fonts was given.
if test "${with_fonts+set}" = set; then
withval="$with_fonts"
if test ${EMACS_FLAVOR} = xemacs; then
echo $ac_n "checking where the XEmacs package is""... $ac_c" 1>&6
-echo "configure:1359: checking where the XEmacs package is" >&5
+echo "configure:1374: checking where the XEmacs package is" >&5
# Check whether --with-packagedir or --without-packagedir was given.
if test "${with_packagedir+set}" = set; then
withval="$with_packagedir"
(or package-dir \"\"))"
if test -z ""noecho""; then
echo $ac_n "checking for PACKAGEDIR""... $ac_c" 1>&6
-echo "configure:1382: checking for PACKAGEDIR" >&5
+echo "configure:1397: checking for PACKAGEDIR" >&5
fi
if eval "test \"\${EMACS_cv_SYS_PACKAGEDIR+set}\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
(or package-dir \"\"))"
if test -z ""noecho""; then
echo $ac_n "checking for PACKAGEDIR""... $ac_c" 1>&6
-echo "configure:1421: checking for PACKAGEDIR" >&5
+echo "configure:1436: checking for PACKAGEDIR" >&5
fi
if eval "test \"\${EMACS_cv_SYS_PACKAGEDIR+set}\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
withval="$with_addpath"
if test "$withval" != yes -a -n "$withval"; then
echo $ac_n "checking where to find the additional elisp libraries""... $ac_c" 1>&6
-echo "configure:1458: checking where to find the additional elisp libraries" >&5
+echo "configure:1473: checking where to find the additional elisp libraries" >&5
ADDITIONAL_LOAD_PATH=$withval
echo "$ac_t""$ADDITIONAL_LOAD_PATH" 1>&6
fi
s%@XEMACS@%$XEMACS%g
s%@lispdir@%$lispdir%g
s%@etcdir@%$etcdir%g
+s%@info_dir@%$info_dir%g
s%@HAVE_url@%$HAVE_url%g
s%@URL@%$URL%g
s%@HAVE_w3_forms@%$HAVE_w3_forms%g
AC_CHECK_EMACS
AC_PATH_LISPDIR
AC_PATH_ETCDIR
+AC_PATH_INFO_DIR
AC_CHECK_URL
AC_CHECK_W3
GNUS_CHECK_FONTS
+2002-04-29 Simon Josefsson <jas@extundo.com>
+
+ * nnmail.el (nnmail-cache-insert): Accept optional group
+ parameter.
+
+ * nnimap.el (nnimap-retrieve-groups): Don't send STATUS when
+ n-r-g-a is disabled.
+
+2002-04-29 Simon Josefsson <jas@extundo.com>
+
+ * nnimap.el (nnimap-split-fancy): Fix doc.
+ (nnimap-split-fancy): Fix doc.
+
+ * nnimap.el (nnimap-retrieve-groups-asynchronous): New variable.
+ (nnimap-mailbox-info): New internal variable.
+ (nnimap-retrieve-groups): Implement faster new mail check.
+
+ * nnimap.el (nnimap-split-articles): Support
+ nnmail-cache-accepted-message-ids.
+ (nnimap-request-accept-article): Ditto.
+
+ * imap.el (imap-mailbox-status-asynch): New command.
+
+2002-04-29 Nevin Kapur <nevin@jhu.edu>
+
+ * gnus.el (gnus-find-subscribed-addresses): Return nil when there
+ are no subscribed mail groups.
+ - Strip quoted names when comparing addresses
+
+2002-04-28 Jesper Harder <harder@ifa.au.dk>
+
+ * mm-decode.el (mm-text-html-renderer): Change customize type to
+ const.
+
+ * gnus-msg.el (gnus-discouraged-post-methods): Fix typo.
+ (gnus-debug-exclude-variables): do.
+
+2002-04-27 ShengHuo ZHU <zsh@cs.rochester.edu>
+
+ * gnus-msg.el (gnus-article-mail): Use gnus-msg-mail instead.
+ Trivial change from Karl Pfl\e,Ad\e(Bsterer <sigurd@12move.de>.
+
+2002-04-27 Katsumi Yamaoka <yamaoka@jpl.org>
+
+ * dns.el (dns-make-network-process): New macro.
+ (query-dns): Use it.
+
+2002-04-27 ShengHuo ZHU <zsh@cs.rochester.edu>
+
+ * gnus-msg.el (gnus-summary-reply): Remove unbound variable
+ article-buffer.
+
+ * mm-url.el (mm-url-package-name): New variable.
+ (mm-url-package-version): New variable.
+ (mm-url-insert-file-contents): Bind url-package-name and
+ url-package-version here.
+ * nnrss.el (nnrss-insert-w3): Move the bindings.
+
+ * nnrss.el (nnrss-insert-w3): Bind url-package-name and
+ url-package-version. Trivial change from Andrew J Cosgriff
+ <ajc@polydistortion.net>
+
+ * mm-decode.el (mm-save-part): Fill in file name when GUI saving
+ attachments. Trivial change from Peter 'Luna' Runestig
+ <peter@runestig.com>.
+
+2002-04-19 Jesper Harder <harder@ifa.au.dk>
+
+ * nnkiboze.el (nnkiboze-request-scan): Call
+ nnkiboze-possibly-change-group.
+ (nnkiboze-generate-group): Use mm-with-unibyte to avoid encoding
+ problems.
+ (nnkiboze-generate-group): Set newsrc to the *highest* article
+ number kibozed, not the lowest.
+
+2002-04-15 Jesper Harder <harder@ifa.au.dk>
+
+ * gnus-art.el (article-unsplit-urls): Allow trailing SPC.
+
2002-04-24 Kai Gro\e,A_\e(Bjohann <Kai.Grossjohann@CS.Uni-Dortmund.DE>
From Dan Christensen <jdc+news@uwo.ca>.
;;; Interface functions.
+(defmacro dns-make-network-process (server)
+ (if (featurep 'xemacs)
+ `(let ((coding-system-for-read 'binary)
+ (coding-system-for-write 'binary))
+ (open-network-stream "dns" (current-buffer) ,server "domain" 'udp))
+ `(let ((server ,server)
+ (coding-system-for-read 'binary)
+ (coding-system-for-write 'binary))
+ (if (fboundp 'make-network-process)
+ (make-network-process
+ :name "dns"
+ :coding 'binary
+ :buffer (current-buffer)
+ :host server
+ :service "domain"
+ :type 'datagram)
+ (open-network-stream "dns" (current-buffer) server "domain")))))
+
(defun query-dns (name &optional type fullp)
"Query a DNS server for NAME of TYPE.
If FULLP, return the entire record returned."
(unless dns-servers
(error "No DNS server configuration found")))
(mm-with-unibyte-buffer
- (let ((coding-system-for-read 'binary)
- (coding-system-for-write 'binary)
- (tcp-p (and (not (fboundp 'open-network-stream))
- (not (featurep 'xemacs)))))
- (let ((process
- (cond
- ((featurep 'xemacs)
- (open-network-stream
- "dns" (current-buffer) (car dns-servers) "domain" 'udp))
- (tcp-p
- (open-network-stream
- "dns" (current-buffer) (car dns-servers) "domain"))
- (t
- (make-network-process
- :name "dns"
- :coding 'binary
- :buffer (current-buffer)
- :host (car dns-servers)
- :service "domain"
- :type 'datagram))))
- (step 100)
- (times (* dns-timeout 1000))
- (id (random 65000)))
- (process-send-string
- process
- (dns-write `((id ,id)
- (opcode query)
- (queries ((,name (type ,type))))
- (recursion-desired-p t))
- tcp-p))
- (while (and (zerop (buffer-size))
- (> times 0))
- (accept-process-output process 0 step)
- (decf times step))
- (ignore-errors
- (delete-process process))
- (when tcp-p
- (goto-char (point-min))
- (delete-region (point) (+ (point) 2)))
- (unless (zerop (buffer-size))
- (let ((result (dns-read (buffer-string))))
- (if fullp
- result
- (let ((answer (car (dns-get 'answers result))))
- (when (eq type (dns-get 'type answer))
- (dns-get 'data answer))))))))))
-
+ (let ((process (dns-make-network-process (car dns-servers)))
+ (tcp-p (and (not (fboundp 'make-network-process))
+ (not (featurep 'xemacs))))
+ (step 100)
+ (times (* dns-timeout 1000))
+ (id (random 65000)))
+ (process-send-string
+ process
+ (dns-write `((id ,id)
+ (opcode query)
+ (queries ((,name (type ,type))))
+ (recursion-desired-p t))
+ tcp-p))
+ (while (and (zerop (buffer-size))
+ (> times 0))
+ (accept-process-output process 0 step)
+ (decf times step))
+ (ignore-errors
+ (delete-process process))
+ (when tcp-p
+ (goto-char (point-min))
+ (delete-region (point) (+ (point) 2)))
+ (unless (zerop (buffer-size))
+ (let ((result (dns-read (buffer-string))))
+ (if fullp
+ result
+ (let ((answer (car (dns-get 'answers result))))
+ (when (eq type (dns-get 'type answer))
+ (dns-get 'data answer)))))))))
+
(provide 'dns)
;;; dns.el ends here
(let ((buffer-read-only nil))
(goto-char (point-min))
(while (re-search-forward
- "^\\(\\(https?\\|ftp\\)://\\S-+\\)\n\\(\\S-+\\)" nil t)
+ "^\\(\\(https?\\|ftp\\)://\\S-+\\) *\n\\(\\S-+\\)" nil t)
(replace-match "\\1\\3" t)))))
(defun article-wash-html (&optional read-charset)
"Variables that should not be reported in `gnus-bug'."
:version "21.1"
:group 'gnus-message
- :type '(repeat (symbol :tab "Variable")))
+ :type '(repeat (symbol :tag "Variable")))
(defcustom gnus-discouraged-post-methods
'(nndraft nnml nnimap nnmaildir nnmh nnfolder nndir)
This variable is used only when `gnus-post-method' is `current'."
:version "21.3"
:group 'gnus-group-foreign
- :type '(repeat (symbol :tab "Back end")))
+ :type '(repeat (symbol :tag "Back end")))
(defcustom gnus-message-replysign
nil
;; (when (or gnus-message-replysign gnus-message-replyencrypt)
;; (let (signed encrypted)
;; (save-excursion
-;; (set-buffer (or gnus-article-buffer article-buffer))
+;; (set-buffer gnus-article-buffer)
;; (setq signed (memq 'signed gnus-article-wash-types))
;; (setq encrypted (memq 'encrypted gnus-article-wash-types)))
;; (cond ((and gnus-message-replysign signed)
(save-excursion (re-search-backward "[ \t\n]" nil t) (1+ (point)))
(save-excursion (re-search-forward "[ \t\n]" nil t) (1- (point))))))
(when address
- (message-reply address)
+ (gnus-msg-mail address)
(when yank
(gnus-inews-yank-articles (list (cdr gnus-article-current)))))))
(dolist (entry (cdr gnus-newsrc-alist))
(setq group (car entry))
(when (gnus-group-find-parameter group 'subscribed)
- (setq address (or (gnus-group-fast-parameter group 'to-address)
- (gnus-group-fast-parameter group 'to-list)))
+ (setq address (mail-strip-quoted-names
+ (or (gnus-group-fast-parameter group 'to-address)
+ (gnus-group-fast-parameter group 'to-list))))
(when address
(push address addresses))))
- (list (mapconcat 'regexp-quote addresses "\\|"))))
+ (when addresses
+ (list (mapconcat 'regexp-quote addresses "\\|")))))
(defmacro gnus-string-or (&rest strings)
"Return the first element of STRINGS that is a non-blank string.
items)
(imap-mailbox-get items mailbox)))))
+(defun imap-mailbox-status-asynch (mailbox items &optional buffer)
+ "Send status item request ITEM on MAILBOX to server in BUFFER.
+ITEMS can be a symbol or a list of symbols, valid symbols are one of
+the STATUS data items -- ie 'messages, 'recent, 'uidnext, 'uidvalidity
+or 'unseen. The IMAP command tag is returned."
+ (with-current-buffer (or buffer (current-buffer))
+ (imap-send-command (list "STATUS \""
+ (imap-utf7-encode mailbox)
+ "\" "
+ (format "%s"
+ (if (listp items)
+ items
+ (list items)))))))
+
(defun imap-mailbox-acl-get (&optional mailbox buffer)
"Get ACL on mailbox from server in BUFFER."
(let ((mailbox (imap-utf7-encode mailbox)))
`lynx' : using lynx;
`html2text' : using html2text;
`nil' : using external viewer."
- :type '(choice (symbol w3)
- (symbol w3m)
- (symbol links)
- (symbol lynx)
- (symbol html2text)
- (symbol nil)
+ :type '(choice (const w3)
+ (const w3m)
+ (const links)
+ (const lynx)
+ (const html2text)
+ (const nil)
(function))
:version "21.3"
:group 'mime-display)
(file-name-nondirectory filename))))
(setq file
(read-file-name "Save MIME part to: "
- (expand-file-name
- (or filename name "")
- (or mm-default-directory default-directory))))
+ (or mm-default-directory default-directory)
+ nil nil (or filename name "")))
(setq mm-default-directory (file-name-directory file))
(and (or (not (file-exists-p file))
(yes-or-no-p (format "File %s already exists; overwrite? "
(eval-when-compile (require 'cl))
(require 'mm-util)
+(require 'gnus)
(eval-and-compile
(autoload 'exec-installed-p "path-util"))
\f
;;; Internal variables
+(defvar mm-url-package-name
+ (gnus-replace-in-string
+ (gnus-replace-in-string gnus-version " v.*$" "")
+ " " "-"))
+
+(defvar mm-url-package-version gnus-version-number)
+
;; Stolen from w3.
(defvar mm-url-html-entities
'(
(insert-file-contents (substring url (1- (match-end 0))))
(mm-url-insert-file-contents-external url))
(mm-url-load-url)
- (let ((name buffer-file-name))
+ (let ((name buffer-file-name)
+ (url-package-name (or mm-url-package-name
+ url-package-name))
+ (url-package-version (or mm-url-package-version
+ url-package-version)))
(prog1
(url-insert-file-contents url)
(save-excursion
(defalias 'mm-with-unibyte-current-buffer
'nnheader-with-unibyte-current-buffer)
+ ;; Should keep track of `mm-with-unibyte' in mm-util.el.
+ (defmacro nnheader-with-unibyte (&rest forms)
+ "Eval the FORMS with the default value of `enable-multibyte-characters'
+nil, ."
+ `(let (default-enable-multibyte-characters)
+ ,@forms))
+ (put 'nnheader-with-unibyte 'lisp-indent-function 0)
+ (put 'nnheader-with-unibyte 'edebug-form-spec '(body))
+ (put 'mm-with-unibyte 'lisp-indent-function 0)
+ (put 'mm-with-unibyte 'edebug-form-spec '(body))
+ (defalias 'mm-with-unibyte 'nnheader-with-unibyte)
+
;; Should keep track of `mm-guess-mime-charset' in mm-util.el.
(defun nnheader-guess-mime-charset ()
"Guess the default MIME charset from the language environment."
:type 'string)
(defcustom nnimap-split-fancy nil
- "Like `nnmail-split-fancy', which see."
+ "Like the variable `nnmail-split-fancy', which see."
:group 'nnimap
:type 'sexp)
:type 'boolean
:group 'nnimap)
+(defcustom nnimap-retrieve-groups-asynchronous t
+ "Send asynchronous STATUS commands for each mailbox before checking mail.
+If you have mailboxes that rarely receives mail, this speeds up new
+mail checking. It works by first sending STATUS commands for each
+mailbox, and then only checking groups which has a modified UIDNEXT
+more carefully for new mail.
+
+In summary, the default is O((1-p)*k+p*n) and changing it to nil makes
+it O(n). If p is small, then the default is probably faster."
+ :type 'boolean
+ :group 'nnimap)
+
(defvoo nnimap-need-unselect-to-notice-new-mail nil
"Unselect mailboxes before looking for new mail in them.
Some servers seem to need this under some circumstances.")
;; Internal variables:
+(defvoo nnimap-mailbox-info (gnus-make-hashtable 997))
(defvar nnimap-debug nil
"Name of buffer to record debugging info.
For example: (setq nnimap-debug \"*nnimap-debug*\")")
(with-current-buffer nntp-server-buffer
(erase-buffer)
(nnimap-before-find-minmax-bugworkaround)
- (dolist (group groups)
- (gnus-message 7 "nnimap: Checking mailbox %s" group)
- (or (member "\\NoSelect"
- (imap-mailbox-get 'list-flags group nnimap-server-buffer))
- (let ((info (nnimap-find-minmax-uid group 'examine)))
- (when (> (or (imap-mailbox-get 'recent group
- nnimap-server-buffer) 0)
- 0)
- (push (list (cons group 0)) nnmail-split-history))
- (insert (format "\"%s\" %d %d y\n" group
- (or (nth 2 info) 0)
- (max 1 (or (nth 1 info) 1))))))))
+ (let (asyncgroups slowgroups)
+ (if (null nnimap-retrieve-groups-asynchronous)
+ (setq slowgroups groups)
+ (dolist (group groups)
+ (gnus-message 7 "nnimap: Checking mailbox %s" group)
+ (add-to-list (if (gnus-gethash-safe group nnimap-mailbox-info)
+ 'asyncgroups
+ 'slowgroups)
+ (list group (imap-mailbox-status-asynch
+ group 'uidnext nnimap-server-buffer))))
+ (dolist (asyncgroup asyncgroups)
+ (let ((group (nth 0 asyncgroup))
+ (tag (nth 1 asyncgroup))
+ new old)
+ (when (imap-ok-p (imap-wait-for-tag tag nnimap-server-buffer))
+ (if (< (car (gnus-gethash group nnimap-mailbox-info))
+ (imap-mailbox-get 'uidnext group nnimap-server-buffer))
+ (push (list group) slowgroups)
+ (insert (cdr (gnus-gethash group nnimap-mailbox-info))))))))
+ (dolist (group slowgroups)
+ (if nnimap-retrieve-groups-asynchronous
+ (setq group (car group)))
+ (gnus-message 7 "nnimap: Rechecking mailbox %s" group)
+ (imap-mailbox-put 'uidnext nil group nnimap-server-buffer)
+ (or (member "\\NoSelect" (imap-mailbox-get 'list-flags group
+ nnimap-server-buffer))
+ (let* ((info (nnimap-find-minmax-uid group 'examine))
+ (str (format "\"%s\" %d %d y\n" group
+ (or (nth 2 info) 0)
+ (max 1 (or (nth 1 info) 1)))))
+ (when (> (or (imap-mailbox-get 'recent group
+ nnimap-server-buffer) 0)
+ 0)
+ (push (list (cons group 0)) nnmail-split-history))
+ (insert str)
+ (when nnimap-retrieve-groups-asynchronous
+ (gnus-sethash
+ group
+ (cons (or (imap-mailbox-get
+ 'uidnext group nnimap-server-buffer)
+ (imap-mailbox-status
+ group 'uidnext nnimap-server-buffer))
+ str)
+ nnimap-mailbox-info)))))))
(gnus-message 5 "nnimap: Checking mailboxes...done")
'active))
nil)
(defun nnimap-split-fancy ()
- "Like nnmail-split-fancy, but uses nnimap-split-fancy."
+ "Like the function `nnmail-split-fancy', but uses `nnimap-split-fancy'."
(let ((nnmail-split-fancy nnimap-split-fancy))
(nnmail-split-fancy)))
(message "IMAP split moved %s:%s:%d to %s" server
inbox article to-group)
(setq removeorig t)
+ (when nnmail-cache-accepted-message-ids
+ (with-current-buffer nntp-server-buffer
+ (nnmail-cache-insert (nnmail-fetch-field
+ "message-id") to-group)))
;; Add the group-art list to the history list.
(push (list (cons to-group 0)) nnmail-split-history))
(t
;; todo: UID EXPUNGE (if available) to remove splitted articles
(imap-mailbox-expunge)
(imap-mailbox-close)))
+ (when nnmail-cache-accepted-message-ids
+ (nnmail-cache-close))
t))))
(deffoo nnimap-request-scan (&optional group server)
(gnus-message 5 "nnimap: Marking article %d for deletion..."
imap-current-message))
-
(defun nnimap-expiry-target (arts group server)
(unless (eq nnmail-expiry-target 'delete)
(with-temp-buffer
(kill-region (point) (progn (forward-line) (point))))
;; turn into rfc822 format (\r\n eol's)
(while (search-forward "\n" nil t)
- (replace-match "\r\n")))
+ (replace-match "\r\n"))
+ (when nnmail-cache-accepted-message-ids
+ (nnmail-cache-insert (nnmail-fetch-field "message-id"))))
+ (when (and last nnmail-cache-accepted-message-ids)
+ (nnmail-cache-close))
;; this 'or' is for Cyrus server bug
(or (null (imap-current-mailbox nnimap-server-buffer))
(imap-mailbox-unselect nnimap-server-buffer))
(gnus-request-article num group buffer)))))
(deffoo nnkiboze-request-scan (&optional group server)
+ (nnkiboze-possibly-change-group group)
(nnkiboze-generate-group (concat "nnkiboze:" group)))
(deffoo nnkiboze-request-group (group &optional server dont-check)
(unless info
(error "No such group: %s" group))
;; Load the kiboze newsrc file for this group.
- (when (file-exists-p newsrc-file)
- (load newsrc-file))
- (let ((coding-system-for-write nnkiboze-file-coding-system)
- (output-coding-system nnkiboze-file-coding-system))
- (gnus-make-directory (file-name-directory nov-file))
- (with-temp-file nov-file
- (when (file-exists-p nov-file)
- (nnheader-insert-file-contents nov-file))
- (setq nov-buffer (current-buffer))
- ;; Go through the active hashtb and add new all groups that match the
- ;; kiboze regexp.
- (mapatoms
- (lambda (group)
- (and (string-match nnkiboze-regexp
- (setq gname (symbol-name group))) ; Match
- (not (assoc gname nnkiboze-newsrc)) ; It isn't registered
- (numberp (car (symbol-value group))) ; It is active
- (or (> nnkiboze-level 7)
- (and (setq glevel
- (nth 1 (nth 2 (gnus-gethash
- gname gnus-newsrc-hashtb))))
- (>= nnkiboze-level glevel)))
- (not (string-match "^nnkiboze:" gname)) ; Exclude kibozes
- (push (cons gname (1- (car (symbol-value group))))
- nnkiboze-newsrc)))
- gnus-active-hashtb)
- ;; `newsrc' is set to the list of groups that possibly are
- ;; component groups to this kiboze group. This list has elements
- ;; on the form `(GROUP . NUMBER)', where NUMBER is the highest
- ;; number that has been kibozed in GROUP in this kiboze group.
- (setq newsrc nnkiboze-newsrc)
- (while newsrc
- (if (not (setq active (gnus-gethash
- (caar newsrc) gnus-active-hashtb)))
- ;; This group isn't active after all, so we remove it from
- ;; the list of component groups.
- (setq nnkiboze-newsrc (delq (car newsrc) nnkiboze-newsrc))
- (setq lowest (cdar newsrc))
- ;; Ok, we have a valid component group, so we jump to it.
- (switch-to-buffer gnus-group-buffer)
- (gnus-group-jump-to-group (caar newsrc))
- (gnus-message 3 "nnkiboze: Checking %s..." (caar newsrc))
- (setq ginfo (gnus-get-info (gnus-group-group-name))
- orig-info (gnus-copy-sequence ginfo)
- num-unread (car (gnus-gethash (caar newsrc)
- gnus-newsrc-hashtb)))
- (unwind-protect
- (progn
- ;; We set all list of article marks to nil. Since we operate
- ;; on copies of the real lists, we can destroy anything we
- ;; want here.
- (when (nth 3 ginfo)
- (setcar (nthcdr 3 ginfo) nil))
- ;; We set the list of read articles to be what we expect for
- ;; this kiboze group -- either nil or `(1 . LOWEST)'.
- (when ginfo
- (setcar (nthcdr 2 ginfo)
- (and (not (= lowest 1)) (cons 1 lowest))))
- (when (and (or (not ginfo)
- (> (length (gnus-list-of-unread-articles
- (car ginfo)))
- 0))
- (progn
- (ignore-errors
- (gnus-group-select-group nil))
- (eq major-mode 'gnus-summary-mode)))
- ;; We are now in the group where we want to be.
- (setq method (gnus-find-method-for-group
- gnus-newsgroup-name))
- (when (eq method gnus-select-method)
- (setq method nil))
- ;; We go through the list of scored articles.
- (while gnus-newsgroup-scored
- (when (> (caar gnus-newsgroup-scored) lowest)
- ;; If it has a good score, then we enter this article
- ;; into the kiboze group.
- (nnkiboze-enter-nov
- nov-buffer
- (gnus-summary-article-header
- (caar gnus-newsgroup-scored))
- gnus-newsgroup-name))
- (setq gnus-newsgroup-scored (cdr gnus-newsgroup-scored)))
- ;; That's it. We exit this group.
- (when (eq major-mode 'gnus-summary-mode)
- (kill-buffer (current-buffer)))))
- ;; Restore the proper info.
- (when ginfo
- (setcdr ginfo (cdr orig-info)))
- (setcar (gnus-gethash (caar newsrc) gnus-newsrc-hashtb)
- num-unread)))
- (setcdr (car newsrc) (car active))
- (gnus-message 3 "nnkiboze: Checking %s...done" (caar newsrc))
- (setq newsrc (cdr newsrc)))))
- ;; We save the kiboze newsrc for this group.
- (gnus-make-directory (file-name-directory newsrc-file))
- (with-temp-file newsrc-file
- (insert "(setq nnkiboze-newsrc '")
- (gnus-prin1 nnkiboze-newsrc)
- (insert ")\n")))
- (unless inhibit-list-groups
- (save-excursion
- (set-buffer gnus-group-buffer)
- (gnus-group-list-groups)))
- t)
+ (mm-with-unibyte
+ (when (file-exists-p newsrc-file)
+ (load newsrc-file))
+ (let ((coding-system-for-write nnkiboze-file-coding-system)
+ (output-coding-system nnkiboze-file-coding-system))
+ (gnus-make-directory (file-name-directory nov-file))
+ (with-temp-file nov-file
+ (when (file-exists-p nov-file)
+ (nnheader-insert-file-contents nov-file))
+ (setq nov-buffer (current-buffer))
+ ;; Go through the active hashtb and add new all groups that match the
+ ;; kiboze regexp.
+ (mapatoms
+ (lambda (group)
+ (and (string-match nnkiboze-regexp
+ (setq gname (symbol-name group))) ; Match
+ (not (assoc gname nnkiboze-newsrc)) ; It isn't registered
+ (numberp (car (symbol-value group))) ; It is active
+ (or (> nnkiboze-level 7)
+ (and (setq glevel
+ (nth 1 (nth 2 (gnus-gethash
+ gname gnus-newsrc-hashtb))))
+ (>= nnkiboze-level glevel)))
+ (not (string-match "^nnkiboze:" gname)) ; Exclude kibozes
+ (push (cons gname (1- (car (symbol-value group))))
+ nnkiboze-newsrc)))
+ gnus-active-hashtb)
+ ;; `newsrc' is set to the list of groups that possibly are
+ ;; component groups to this kiboze group. This list has elements
+ ;; on the form `(GROUP . NUMBER)', where NUMBER is the highest
+ ;; number that has been kibozed in GROUP in this kiboze group.
+ (setq newsrc nnkiboze-newsrc)
+ (while newsrc
+ (if (not (setq active (gnus-gethash
+ (caar newsrc) gnus-active-hashtb)))
+ ;; This group isn't active after all, so we remove it from
+ ;; the list of component groups.
+ (setq nnkiboze-newsrc (delq (car newsrc) nnkiboze-newsrc))
+ (setq lowest (cdar newsrc))
+ ;; Ok, we have a valid component group, so we jump to it.
+ (switch-to-buffer gnus-group-buffer)
+ (gnus-group-jump-to-group (caar newsrc))
+ (gnus-message 3 "nnkiboze: Checking %s..." (caar newsrc))
+ (setq ginfo (gnus-get-info (gnus-group-group-name))
+ orig-info (gnus-copy-sequence ginfo)
+ num-unread (car (gnus-gethash (caar newsrc)
+ gnus-newsrc-hashtb)))
+ (unwind-protect
+ (progn
+ ;; We set all list of article marks to nil. Since we operate
+ ;; on copies of the real lists, we can destroy anything we
+ ;; want here.
+ (when (nth 3 ginfo)
+ (setcar (nthcdr 3 ginfo) nil))
+ ;; We set the list of read articles to be what we expect for
+ ;; this kiboze group -- either nil or `(1 . LOWEST)'.
+ (when ginfo
+ (setcar (nthcdr 2 ginfo)
+ (and (not (= lowest 1)) (cons 1 lowest))))
+ (when (and (or (not ginfo)
+ (> (length (gnus-list-of-unread-articles
+ (car ginfo)))
+ 0))
+ (progn
+ (ignore-errors
+ (gnus-group-select-group nil))
+ (eq major-mode 'gnus-summary-mode)))
+ ;; We are now in the group where we want to be.
+ (setq method (gnus-find-method-for-group
+ gnus-newsgroup-name))
+ (when (eq method gnus-select-method)
+ (setq method nil))
+ ;; We go through the list of scored articles.
+ (while gnus-newsgroup-scored
+ (when (> (caar gnus-newsgroup-scored) lowest)
+ ;; If it has a good score, then we enter this article
+ ;; into the kiboze group.
+ (nnkiboze-enter-nov
+ nov-buffer
+ (gnus-summary-article-header
+ (caar gnus-newsgroup-scored))
+ gnus-newsgroup-name))
+ (setq gnus-newsgroup-scored (cdr gnus-newsgroup-scored)))
+ ;; That's it. We exit this group.
+ (when (eq major-mode 'gnus-summary-mode)
+ (kill-buffer (current-buffer)))))
+ ;; Restore the proper info.
+ (when ginfo
+ (setcdr ginfo (cdr orig-info)))
+ (setcar (gnus-gethash (caar newsrc) gnus-newsrc-hashtb)
+ num-unread)))
+ (setcdr (car newsrc) (cdr active))
+ (gnus-message 3 "nnkiboze: Checking %s...done" (caar newsrc))
+ (setq newsrc (cdr newsrc)))))
+ ;; We save the kiboze newsrc for this group.
+ (gnus-make-directory (file-name-directory newsrc-file))
+ (with-temp-file newsrc-file
+ (insert "(setq nnkiboze-newsrc '")
+ (gnus-prin1 nnkiboze-newsrc)
+ (insert ")\n")))
+ (unless inhibit-list-groups
+ (save-excursion
+ (set-buffer gnus-group-buffer)
+ (gnus-group-list-groups)))
+ t))
(defun nnkiboze-enter-nov (buffer header group)
(save-excursion
(defvar group)
(defvar group-art-list)
(defvar group-art)
-(defun nnmail-cache-insert (id)
+(defun nnmail-cache-insert (id &optional grp)
(when nnmail-treat-duplicates
;; Store some information about the group this message is written
;; to. This function might have been called from various places.
;; the car of a pair is a group name. Should we check that the
;; length of the list is equal to 1? -- kai
(let ((g nil))
- (cond ((and (boundp 'group) group)
+ (cond (grp
+ (setq g grp))
+ ((and (boundp 'group) group)
(setq g group))
((and (boundp 'group-art-list) group-art-list
(listp group-art-list))
+2002-04-26 Steve Youngs <youngs@xemacs.org>
+
+ * Makefile.in (infodir): Set to '@info_dir@' so we can separate
+ defaults for XEmacs and Emacs.
+
+2002-04-27 Jesper Harder <harder@ifa.au.dk>
+
+ * emacs-mime.texi (Customization): Update info on HTML renderers.
+
+ * gnus.texi (Article Washing): Update information on HTML washing.
+ Fix typos.
+
2002-04-09 Paul Jarc <prj@po.cwru.edu>
* .cvsignore: added message-[0-9]*
-infodir = @infodir@
+infodir = @info_dir@
prefix = @prefix@
srcdir = @srcdir@
subdir = texi
variable will cause @samp{text/html} parts to be treated as attachments.
@item mm-inline-text-html-renderer
-@findex mm-inline-text-html-render-with-w3
-@findex mm-inline-text-html-render-with-w3m
-This function will be used to convert the @sc{html} to the text. There are
-two pre-defined functions: @code{mm-inline-text-html-render-with-w3},
-which uses Emacs/w3; and @code{mm-inline-text-html-render-with-w3m},
-which uses emacs-w3m (see @uref{http://emacs-w3m.namazu.org/} for more
-information about emacs-w3m). The function will be called with a
-@sc{mime} handle as the argument.
+This selects the function used to render @sc{html}. The predefined
+renderers are selected by the symbols @code{w3},
+@code{w3m}@footnote{See @uref{http://emacs-w3m.namazu.org/} for more
+information about emacs-w3m}, @code{links}, @code{lynx} or
+@code{html2text}. You can also specify a function, which will be
+called with a @sc{mime} handle as the argument.
@item mm-inline-text-html-with-images
Some @sc{html} mails might have the trick of spammers using
@c @findex gnus-article-de-base64-unreadable
@c Treat base64 (@code{gnus-article-de-base64-unreadable}).
@c Base64 is one common @sc{mime} encoding employed when sending non-ASCII
-@c (i. e., 8-bit) articles. Note that the this is usually done
+@c (i. e., 8-bit) articles. Note that this is usually done
@c automatically by Gnus if the message in question has a
@c @code{Content-Transfer-Encoding} header that says that this encoding has
@c been done.
\e$B@\F,<-$,M?$($i$l$k$H!"2?$NJ8;z=89g\e(B (charset) \e$B$H$7$F07$&$+$r?R$M$i$l$^$9!#\e(B
@vindex gnus-article-wash-function
-\e$B%G%#%U%)%k%H$G$O\e(B @sc{html} \e$B$NJQ49$K\e(B w3 \e$B$r;H$$$^$9$,!"$3$l$OJQ\e(B
-\e$B?t\e(B @code{gnus-article-wash-function} \e$B$G@)8f$5$l$^$9!#;H$&$3$H$,$G$-$k!"\e(B
-\e$B$"$i$+$8$aMQ0U$5$l$?4X?t$O0J2<$NDL$j$G$9!#\e(B
+\e$B%G%#%U%)%k%H$G$O\e(B @sc{html} \e$B$NJQ49$K\e(B @code{mm-inline-text-html-renderer}
+(@pxref{Customization, , , emacs-mime}) \e$B$G@_Dj$5$l$?4X?t$r;H$$$^$9$,!"$3\e(B
+\e$B$l$OJQ?t\e(B @code{gnus-article-wash-function} \e$B$G@)8f$5$l$^$9!#;H$&$3$H$,$G\e(B
+\e$B$-$k!"$"$i$+$8$aMQ0U$5$l$?4X?t$O0J2<$NDL$j$G$9!#\e(B
@table @code
-@item gnus-article-wash-html-with-w3
-@findex gnus-article-wash-html-with-w3
-w3 \e$B$r;H$$$^$9\e(B (\e$B$3$l$,%G%#%U%)%k%H$G$9\e(B)\e$B!#\e(B
-
-@item gnus-article-wash-html-with-w3m
-@findex gnus-article-wash-html-with-w3m
-emacs-w3m \e$B$r;H$$$^$9\e(B (\e$B$b$C$H>\$7$$$3$H\e(B
-\e$B$O\e(B @uref{http://emacs-w3m.namazu.org/} \e$B$r;2>H$7$F2<$5$$\e(B)\e$B!#\e(B
+@item w3
+Emacs/w3 \e$B$r;H$$$^$9!#\e(B
+
+@item w3m
+emacs-w3m \e$B$r;H$$$^$9\e(B (\e$B>\$7$/$O\e(B @uref{http://emacs-w3m.namazu.org/} \e$B$r;2\e(B
+\e$B>H$7$F2<$5$$\e(B)\e$B!#\e(B
+
+@item links
+Links \e$B$r;H$$$^\e(B
+\e$B$9\e(B (@uref{http://artax.karlin.mff.cuni.cz/~mikulas/links/} \e$B$r;2>H\e(B)\e$B!#\e(B
+
+@item lynx
+Lynx \e$B$r;H$$$^$9\e(B (@uref{http://lynx.browser.org/} \e$B$r;2>H\e(B)\e$B!#\e(B
+
+@item html2text
+html2text (\e$B%7%s%W%k$J\e(B @sc{html} \e$B%3%s%P!<%?!<!"\e(Bgnus \e$B$K4^$^$l$F$$$k\e(B) \e$B$r;H\e(B
+\e$B$$$^$9!#\e(B
@end table
@item W b
@findex gnus-article-de-base64-unreadable
Treat base64 (@code{gnus-article-de-base64-unreadable}).
Base64 is one common @sc{mime} encoding employed when sending non-ASCII
-(i. e., 8-bit) articles. Note that the this is usually done
+(i. e., 8-bit) articles. Note that this is usually done
automatically by Gnus if the message in question has a
@code{Content-Transfer-Encoding} header that says that this encoding has
been done.
@item W h
@kindex W h (Summary)
@findex gnus-article-wash-html
-Treat @sc{html} (@code{gnus-article-wash-html}). Note that the this is
+Treat @sc{html} (@code{gnus-article-wash-html}). Note that this is
usually done automatically by Gnus if the message in question has a
@code{Content-Type} header that says that the message is @sc{html}.
If a prefix is given, a charset will be asked for.
@vindex gnus-article-wash-function
-The default is to use w3 to convert the @sc{html}, but this is
-controlled by the @code{gnus-article-wash-function} variable.
-Pre-defined functions you can use include:
+The default is to use the function specified by
+@code{mm-inline-text-html-renderer} (@pxref{Customization, , , emacs-mime})
+to convert the @sc{html}, but this is controlled by the
+@code{gnus-article-wash-function} variable. Pre-defined functions you
+can use include:
@table @code
-@item gnus-article-wash-html-with-w3
-@findex gnus-article-wash-html-with-w3
-Use w3 (this is the default).
+@item w3
+Use Emacs/w3.
-@item gnus-article-wash-html-with-w3m
-@findex gnus-article-wash-html-with-w3m
+@item w3m
Use emacs-w3m (see @uref{http://emacs-w3m.namazu.org/} for more
information).
+
+@item links
+Use Links (see @uref{http://artax.karlin.mff.cuni.cz/~mikulas/links/}).
+
+@item lynx
+Use Lynx (see @uref{http://lynx.browser.org/}).
+
+@item html2text
+Use html2text -- a simple @sc{html} converter included with Gnus.
+
@end table
@item W b