From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.emacs.gnus.general/59959 Path: news.gmane.org!not-for-mail From: Bjorn Solberg Newsgroups: gmane.emacs.gnus.general Subject: Re: nnimap fails to fetch some articles Date: Mon, 07 Mar 2005 14:00:53 -0800 Message-ID: References: NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: quoted-printable X-Trace: sea.gmane.org 1110232581 11175 80.91.229.2 (7 Mar 2005 21:56:21 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Mon, 7 Mar 2005 21:56:21 +0000 (UTC) Original-X-From: ding-owner+M8500@lists.math.uh.edu Mon Mar 07 22:56:21 2005 Original-Received: from malifon.math.uh.edu ([129.7.128.13] ident=mail) by ciao.gmane.org with esmtp (Exim 4.43) id 1D8QD1-0004xl-Fi for ding-account@gmane.org; Mon, 07 Mar 2005 22:56:15 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.math.uh.edu ident=lists) by malifon.math.uh.edu with smtp (Exim 3.20 #1) id 1D8QHh-0007e8-00; Mon, 07 Mar 2005 16:01:05 -0600 Original-Received: from util2.math.uh.edu ([129.7.128.23]) by malifon.math.uh.edu with esmtp (Exim 3.20 #1) id 1D8QHd-0007dw-00 for ding@lists.math.uh.edu; Mon, 07 Mar 2005 16:01:01 -0600 Original-Received: from quimby.gnus.org ([80.91.224.244]) by util2.math.uh.edu with esmtp (Exim 4.30) id 1D8QHa-0002AP-5h for ding@lists.math.uh.edu; Mon, 07 Mar 2005 16:00:58 -0600 Original-Received: from adsl-69-235-47-93.dsl.irvnca.pacbell.net ([69.235.47.93] helo=maui53.famsolberg.com) by quimby.gnus.org with esmtp (Exim 3.35 #1 (Debian)) id 1D8QHX-00084k-00 for ; Mon, 07 Mar 2005 23:00:56 +0100 Original-Received: from www.famsolberg.com (newpc [192.168.8.100]) by maui53.famsolberg.com (8.12.11/8.12.11) with ESMTP id j27M0rxe030148 for ; Mon, 7 Mar 2005 14:00:53 -0800 Original-Received: from localhost.localdomain (newpc [127.0.0.1]) by www.famsolberg.com (8.12.8/8.12.8) with ESMTP id j27M0riD006542 for ; Mon, 7 Mar 2005 14:00:53 -0800 Original-Received: (from bhso@localhost) by localhost.localdomain (8.12.8/8.12.8/Submit) id j27M0r7C006540; Mon, 7 Mar 2005 14:00:53 -0800 X-Authentication-Warning: localhost.localdomain: bhso set sender to bhso@pacbell.net using -f Original-To: ding@gnus.org In-Reply-To: (Simon Josefsson's message of "Mon, 07 Mar 2005 22:45:48 +0100") User-Agent: Gnus/5.110003 (No Gnus v0.3) Emacs/21.2 (gnu/linux) X-MIME-Autoconverted: from 8bit to quoted-printable by maui53.famsolberg.com id j27M0rxe030148 X-Spam-Score: -4.9 (----) Precedence: bulk Original-Sender: ding-owner@lists.math.uh.edu X-MailScanner-From: ding-owner+m8500@lists.math.uh.edu X-MailScanner-To: ding-account@gmane.org Xref: news.gmane.org gmane.emacs.gnus.general:59959 X-Report-Spam: http://spam.gmane.org/gmane.emacs.gnus.general:59959 Simon Josefsson writes: > Bjorn Solberg writes: [...] >> " *nntpd*" shows an entry for all 5 messages. I have received new >> messages since last, so now it show only 2 messages when I do 5 RET. >> Which means this is somehow content-related. >>=20 >> However, I see a pattern in " *nntpd*" now: " *nntpd*" shows that the >> messages aren't sorted by id. For example, doing 5 RET I see entries 793 >> 795 794 792 791 in " *nntpd*", and only 793 and 795 is shown in the >> Summary buffer. > Ah, thanks, that is it. The IMAP server returned the articles out of > order. Which I think is perfectly legal. Maybe the following patch > help? Untested. > --- nnimap.el 04 Mar 2005 17:59:01 +0100 7.17 > +++ nnimap.el 07 Mar 2005 22:45:30 +0100=09 > @@ -710,6 +710,8 @@ > (if (imap-capability 'IMAP4rev1) > (format "BODY.PEEK[HEADER.FIELDS %s])" headers) > (format "RFC822.HEADER.LINES %s)" headers))))) > + (with-current-buffer nntp-server-buffer > + (sort-lines)) > (and (numberp nnmail-large-newsgroup) > (> nnimap-length nnmail-large-newsgroup) > (nnheader-message 6 "nnimap: Retrieving headers...done"))))) When compiling, it says: Compiling file c:/emacs-21.3/site-lisp/gnus-CURRENT-20050304/lisp/nnimap.el= at Mon Mar 07 13:51:46 2005 ** sort-lines called with 0 arguments, but requires 3 and when running it: nnimap-retrieve-headers-from-server: Wrong number of arguments: #[(reverse = beg end) }eb=C3 =C4=C5#*" [beg end reverse sort-subr forward-line end-of-line] 4 ("c:/emacs= -21.3/lisp/sort.elc" . 4220) "P r"], 0 C-h f sort-lines says: sort-lines is an interactive compiled Lisp function in `sort'. (sort-lines REVERSE BEG END) Sort lines in region alphabetically; argument means descending order. Called from a program, there are three arguments: REVERSE (non-nil means reverse order), BEG and END (region to sort). The variable `sort-fold-case' determines whether alphabetic case affects the sort order. So I suppose we need to pass in the beginning and end of the buffer also, or is that something the macro surrounding it should have taken care of? (About time I start learning some elisp, I guess.) Bjorn.