From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.emacs.gnus.general/40118 Path: main.gmane.org!not-for-mail From: mi-gnus@imarko.dhs.org Newsgroups: gmane.emacs.gnus.general Subject: BODY.PEEK change breaks mail-source-fetch-imap Date: Wed, 07 Nov 2001 18:40:03 -0800 Sender: owner-ding@hpc.uh.edu Message-ID: NNTP-Posting-Host: coloc-standby.netfonds.no Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" X-Trace: main.gmane.org 1035175717 31510 80.91.224.250 (21 Oct 2002 04:48:37 GMT) X-Complaints-To: usenet@main.gmane.org NNTP-Posting-Date: Mon, 21 Oct 2002 04:48:37 +0000 (UTC) Return-Path: Original-Received: (qmail 12869 invoked from network); 8 Nov 2001 02:41:22 -0000 Original-Received: from malifon.math.uh.edu (mail@129.7.128.13) by mastaler.com with SMTP; 8 Nov 2001 02:41:22 -0000 Original-Received: from sina.hpc.uh.edu ([129.7.128.10] ident=lists) by malifon.math.uh.edu with esmtp (Exim 3.20 #1) id 161f7G-0002ng-00; Wed, 07 Nov 2001 20:40:30 -0600 Original-Received: by sina.hpc.uh.edu (TLB v0.09a (1.20 tibbs 1996/10/09 22:03:07)); Wed, 07 Nov 2001 20:40:12 -0600 (CST) Original-Received: from sclp3.sclp.com (qmailr@sclp3.sclp.com [209.196.61.66]) by sina.hpc.uh.edu (8.9.3/8.9.3) with SMTP id UAA27114 for ; Wed, 7 Nov 2001 20:39:57 -0600 (CST) Original-Received: (qmail 12810 invoked by alias); 8 Nov 2001 02:40:10 -0000 Original-Received: (qmail 12805 invoked from network); 8 Nov 2001 02:40:09 -0000 Original-Received: from prattle.redback.com (hiddenuser@155.53.12.9) by gnus.org with SMTP; 8 Nov 2001 02:40:09 -0000 Original-Received: from redbull.redback.com (redbull.redback.com [155.53.42.26]) by prattle.redback.com (Postfix) with ESMTP id 261E01DCC62 for ; Wed, 7 Nov 2001 18:40:04 -0800 (PST) Original-Received: (from istvan@localhost) by redbull.redback.com (8.11.6/8.9.3/null redback linux client) id fA82e4I02169; Wed, 7 Nov 2001 18:40:04 -0800 X-Authentication-Warning: redbull.redback.com: istvan set sender to istvan@redback.com using -f Original-To: ding@gnus.org Original-Lines: 51 Precedence: list X-Majordomo: 1.94.jlt7 Xref: main.gmane.org gmane.emacs.gnus.general:40118 X-Report-Spam: http://spam.gmane.org/gmane.emacs.gnus.general:40118 --=-=-= After running an older snapshot for a few weeks today i finally updated to the latest CVS and was in for an unpleasant surprise: IMAP fetching blew up in a spectacular way. See the attached backtrace. I narrowed it down to the following change: 2001-10-01 Simon Josefsson * mail-source.el (mail-source-fetch-imap): Use BODY.PEEK if server is IMAP4rev1. % cvs diff -D 2001/10/01 -D 2001/10/02 mail-source.el Index: mail-source.el =================================================================== RCS file: /usr/local/cvsroot/gnus/lisp/mail-source.el,v retrieving revision 6.9 retrieving revision 6.10 diff -u -b -B -r6.9 -r6.10 --- mail-source.el 2001/08/30 18:40:37 6.9 +++ mail-source.el 2001/10/01 20:18:38 6.10 @@ -901,7 +901,10 @@ (push (cons from imap-password) mail-source-password-cache))) ;; if predicate is nil, use all uids (dolist (uid (imap-search (or predicate "1:*") buf)) - (when (setq str (imap-fetch uid "RFC822.PEEK" 'RFC822 nil buf)) + (when (setq str (if (imap-capability 'IMAP4rev1 buf) + (imap-fetch uid "BODY.PEEK[]" 'BODYDETAIL + nil buf) + (imap-fetch uid "RFC822.PEEK" 'RFC822 nil buf))) (push uid remove) (insert "From imap " (current-time-string) "\n") (save-excursion Disabling the BODY.PEEK code fixes my problems: - (when (setq str (if (imap-capability 'IMAP4rev1 buf) + (when (setq str (if nil ;(imap-capability 'IMAP4rev1 buf) The local imap server is imap-uw 4.7c6: * OK popserv2.redback.com IMAP4rev1 2000.279 at Wed, 7 Nov 2001 18:27:00 -0800 (PST) Please let me know if there is any more data you would like. --=-=-= Content-Type: text/plain; charset=utf-8 Content-Disposition: attachment; filename=foo Content-Transfer-Encoding: quoted-printable Content-Description: gnus backtrace Debugger entered--Lisp error: (wrong-type-argument char-or-string-p (("" ni= l "Return-Path: =0D Delivered-To: istvan+foo@redback.com=0D Received: from elvis.redback.com (elvis.redback.com [155.53.12.7])=0D by prattle.redback.com (Postfix) with ESMTP id AA8B7F2C4C=0D for ; Wed, 7 Nov 2001 18:15:35 -0800 (PST)=0D Received: (from root@localhost)=0D by elvis.redback.com (8.8.8/8.8.8/null redback bsdclient) id SAA01504=0D for istvan; Wed, 7 Nov 2001 18:15:35 -0800 (PST)=0D Date: Wed, 7 Nov 2001 18:15:35 -0800 (PST)=0D From: =0D Message-Id: <200111080215.SAA01504@elvis.redback.com>=0D To: istvan+foo@redback.com=0D Subject: foo=0D =0D "))) insert((("" nil "Return-Path: =0D\nDelivered-To: istvan= +foo@redback.com=0D\nReceived: from elvis.redback.com (elvis.redback.com [1= 55.53.12.7])=0D\n by prattle.redback.com (Postfix) with ESMTP id AA8B7F2C4C= =0D\n for ; Wed, 7 Nov 2001 18:15:35 -0800 (PST)= =0D\nReceived: (from root@localhost)=0D\n by elvis.redback.com (8.8.8/8.8.8= /null redback bsdclient) id SAA01504=0D\n for istvan; Wed, 7 Nov 2001 18:15= :35 -0800 (PST)=0D\nDate: Wed, 7 Nov 2001 18:15:35 -0800 (PST)=0D\nFrom: =0D\nMessage-Id: <200111080215.SAA01504@elvis.redback.com>= =0D\nTo: istvan+foo@redback.com=0D\nSubject: foo=0D\n=0D\n")) "\n\n") (save-excursion (insert str "\n\n")) (progn (push uid remove) (insert "From imap " (current-time-string) "\n")= (save-excursion (insert str "\n\n")) (while (re-search-forward "^From " ni= l t) (replace-match ">From ")) (goto-char (point-max))) (if (setq str (if ... ... ...)) (progn (push uid remove) (insert "From im= ap " ... "\n") (save-excursion ...) (while ... ...) (goto-char ...))) (when (setq str (if ... ... ...)) (push uid remove) (insert "From imap " = (current-time-string) "\n") (save-excursion (insert str "\n\n")) (while (re= -search-forward "^From " nil t) (replace-match ">From ")) (goto-char (point= -max))) (while --dolist-temp--19610 (setq uid (car --dolist-temp--19610)) (when (= setq str ...) (push uid remove) (insert "From imap " ... "\n") (save-excurs= ion ...) (while ... ...) (goto-char ...)) (setq --dolist-temp--19610 (cdr -= -dolist-temp--19610))) (let ((--dolist-temp--19610 ...) uid) (while --dolist-temp--19610 (setq u= id ...) (when ... ... ... ... ... ...) (setq --dolist-temp--19610 ...)) nil) (catch (quote --cl-block-nil--) (let (... uid) (while --dolist-temp--1961= 0 ... ... ...) nil)) (cl-block-wrapper (catch (quote --cl-block-nil--) (let ... ... nil))) (block nil (let (... uid) (while --dolist-temp--19610 ... ... ...) nil)) (dolist (uid (imap-search ... buf)) (when (setq str ...) (push uid remove= ) (insert "From imap " ... "\n") (save-excursion ...) (while ... ...) (goto= -char ...))) (save-current-buffer (set-buffer temp-buffer) (mm-disable-multibyte) (wit= h-current-buffer buf (when ... ...)) (dolist (uid ...) (when ... ... ... ..= . ... ...)) (nnheader-ms-strip-cr)) (with-current-buffer temp-buffer (mm-disable-multibyte) (with-current-buf= fer buf (when ... ...)) (dolist (uid ...) (when ... ... ... ... ... ...)) (= nnheader-ms-strip-cr)) (prog1 (with-current-buffer temp-buffer (mm-disable-multibyte) (with-curr= ent-buffer buf ...) (dolist ... ...) (nnheader-ms-strip-cr)) (with-current-= buffer temp-buffer (widen) (write-region ... ... temp-file nil 0))) (unwind-protect (prog1 (with-current-buffer temp-buffer ... ... ... ...) = (with-current-buffer temp-buffer ... ...)) (and (buffer-name temp-buffer) (= kill-buffer temp-buffer))) (let ((temp-file mail-source-crash-box) (temp-buffer ...)) (unwind-protec= t (prog1 ... ...) (and ... ...))) (with-temp-file mail-source-crash-box (mm-disable-multibyte) (with-curren= t-buffer buf (when ... ...)) (dolist (uid ...) (when ... ... ... ... ... ..= .)) (nnheader-ms-strip-cr)) (let ((coding-system-for-write mail-source-imap-file-coding-system) str) = (with-temp-file mail-source-crash-box (mm-disable-multibyte) (with-current-= buffer buf ...) (dolist ... ...) (nnheader-ms-strip-cr)) (incf found (mail-= source-callback callback server)) (when (and remove fetchflag) (imap-messag= e-flags-add ... fetchflag nil buf)) (if dontexpunge (imap-mailbox-unselect = buf) (imap-mailbox-close nil buf)) (imap-close buf)) (if (and (imap-open server port stream authentication buf) (imap-authenti= cate user ... buf) (imap-mailbox-select mailbox nil buf)) (let (... str) (w= ith-temp-file mail-source-crash-box ... ... ... ...) (incf found ...) (when= ... ...) (if dontexpunge ... ...) (imap-close buf)) (imap-close buf) (setq= mail-source-password-cache (delq ... mail-source-password-cache)) (error (= imap-error-text buf))) (let ((from ...) (found 0) (buf ...) (mail-source-string ...) (imap-shell= -program ...) remove) (if (and ... ... ...) (let ... ... ... ... ... ...) (= imap-close buf) (setq mail-source-password-cache ...) (error ...)) (kill-bu= ffer buf) found) (let ((dontexpunge nil) (fetchflag nil) (predicate nil) (mailbox nil) (pa= ssword nil) (user nil) (authentication nil) (program nil) (stream nil) (por= t nil) (server nil)) (mail-source-set-1 source) (let (... ... ... ... ... r= emove) (if ... ... ... ... ...) (kill-buffer buf) found)) (mail-source-bind (imap source) (let (... ... ... ... ... remove) (if ...= ... ... ... ...) (kill-buffer buf) found)) mail-source-fetch-imap((imap :server "imap.redback.com") #[(file orig-fil= e) "=C2=82=C2=C2=82=C3=C2=82=C4 =C2=C2=9A?=C2=C2=85=0F=00=C2=82=C5 =C2=82= =C6\"=C2=82=C7%=C2=C2=87" [file orig-file nnmail-split-incoming nnml-save-m= ail nil nnmail-get-split-group (imap :server "imap.redback.com") nnml-activ= e-number] 7]) funcall(mail-source-fetch-imap (imap :server "imap.redback.com") #[(file = orig-file) "=C2=82=C2=C2=82=C3=C2=82=C4 =C2=C2=9A?=C2=C2=85=0F=00=C2=82= =C5 =C2=82=C6\"=C2=82=C7%=C2=C2=87" [file orig-file nnmail-split-incoming n= nml-save-mail nil nnmail-get-split-group (imap :server "imap.redback.com") = nnml-active-number] 7]) (if (or debug-on-quit debug-on-error) (funcall function source callback) = (condition-case err (funcall function source callback) (error ... 0))) (+ found (if (or debug-on-quit debug-on-error) (funcall function source c= allback) (condition-case err ... ...))) (let ((function ...) (found 0)) (unless function (error "%S is an invalid= mail source specification" source)) (when (file-exists-p mail-source-crash= -box) (message "Processing mail from %s..." mail-source-crash-box) (setq fo= und ...)) (+ found (if ... ... ...))) (save-excursion (let (... ...) (unless function ...) (when ... ... ...) (= + found ...))) (if (or mail-source-plugged plugged) (save-excursion (let ... ... ... ...= ))) (let ((plugged nil)) (mail-source-set-common-1 source) (if (or mail-sourc= e-plugged plugged) (save-excursion ...))) (mail-source-bind-common source (if (or mail-source-plugged plugged) (sav= e-excursion ...))) mail-source-fetch((imap :server "imap.redback.com") #[(file orig-file) "= =C2=82=C2=C2=82=C3=C2=82=C4 =C2=C2=9A?=C2=C2=85=0F=00=C2=82=C5 =C2=82=C6\= "=C2=82=C7%=C2=C2=87" [file orig-file nnmail-split-incoming nnml-save-mail = nil nnmail-get-split-group (imap :server "imap.redback.com") nnml-active-nu= mber] 7]) nnmail-get-new-mail(nnml nnml-save-nov "~/Mail/" "mail.personal") nnml-request-scan("mail.personal" "private") gnus-request-scan("nnml+private:mail.personal" (nnml "private")) gnus-activate-group("nnml+private:mail.personal" scan) gnus-get-unread-articles(2) gnus-group-get-new-news(2) my-get-mail() call-interactively(my-get-mail) --=-=-= -- Istvan --=-=-=--