From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.emacs.gnus.general/81949 Path: news.gmane.org!not-for-mail From: Michael Welsh Duggan Newsgroups: gmane.emacs.gnus.general Subject: Re: searching by Message-ID after copy/move; speeding things up Date: Thu, 14 Jun 2012 16:11:55 -0400 Message-ID: References: <87395ypkri.fsf@maru.md5i.com> <877gvamhzv.fsf@zelenka.enovance.com> <87395x7jgn.fsf@zelenka.enovance.com> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: dough.gmane.org 1339704746 24539 80.91.229.3 (14 Jun 2012 20:12:26 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Thu, 14 Jun 2012 20:12:26 +0000 (UTC) Cc: Michael Welsh Duggan To: ding@gnus.org Original-X-From: ding-owner+M30219@lists.math.uh.edu Thu Jun 14 22:12:23 2012 Return-path: Envelope-to: ding-account@gmane.org Original-Received: from util0.math.uh.edu ([129.7.128.18]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1SfGOz-0000bQ-Nd for ding-account@gmane.org; Thu, 14 Jun 2012 22:12:22 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.math.uh.edu) by util0.math.uh.edu with smtp (Exim 4.63) (envelope-from ) id 1SfGOn-0007pL-IQ; Thu, 14 Jun 2012 15:12:09 -0500 Original-Received: from mx1.math.uh.edu ([129.7.128.32]) by util0.math.uh.edu with esmtps (TLSv1:AES256-SHA:256) (Exim 4.63) (envelope-from ) id 1SfGOm-0007pA-17 for ding@lists.math.uh.edu; Thu, 14 Jun 2012 15:12:08 -0500 Original-Received: from quimby.gnus.org ([80.91.231.51]) by mx1.math.uh.edu with esmtps (TLSv1:AES256-SHA:256) (Exim 4.76) (envelope-from ) id 1SfGOi-0006tb-Jv for ding@lists.math.uh.edu; Thu, 14 Jun 2012 15:12:05 -0500 Original-Received: from euclid.red.cert.org ([192.88.209.48]) by quimby.gnus.org with esmtp (Exim 4.72) (envelope-from ) id 1SfGOg-00020X-Vl for ding@gnus.org; Thu, 14 Jun 2012 22:12:03 +0200 Original-Received: from bucknell.indigo.cert.org (bucknell.indigo.cert.org [10.60.10.121]) by euclid.red.cert.org (8.14.4/8.14.4) with ESMTP id q5EK6Y8W006924; Thu, 14 Jun 2012 16:06:34 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=cert.org; s=jthatj15xw2j; t=1339704394; bh=LZq7AyGPx0Jlkdo6VP2dbklTCocU3EBzqs/qTnUj24Q=; h=From:To:Cc:Subject:References:Date:In-Reply-To:Message-ID: MIME-Version:Content-Type:Sender:Reply-To; b=Nau+IVyMCH07mz7CRFWxKD6vAqZWrzo5kfG2hsGpd0h9eehp7EjQyBKjzJQdpu8uW MPCtfQkxcPZ9sGlMkjqr/CGFaOh+YfT/XdlR11ZCJkFLtcf2UnZbnAybtQg8bJISgB c9Lpvhyde7K9dEKEzceX/loZcbdAzUYnOolVb0Xk= Original-Received: from waterbuck.yellow.cert.org (waterbuck.yellow.cert.org [10.20.128.84]) by bucknell.indigo.cert.org (8.14.4/8.14.4/2.81) with ESMTP id q5EKBuZ4028323; Thu, 14 Jun 2012 16:11:56 -0400 Original-Received: (from mwd@localhost) by waterbuck.yellow.cert.org (8.14.4/8.14.4/Submit/1.6) id q5EKBt9B009902; Thu, 14 Jun 2012 16:11:55 -0400 X-Authentication-Warning: waterbuck.yellow.cert.org: mwd set sender to mwd@cert.org using -f In-Reply-To: <87395x7jgn.fsf@zelenka.enovance.com> (Julien Danjou's message of "Thu, 14 Jun 2012 21:59:52 +0200") User-Agent: Gnus/5.130006 (Ma Gnus v0.6) Emacs/24.1.50 (gnu/linux) X-Spam-Score: -2.0 (--) List-ID: Precedence: bulk Xref: news.gmane.org gmane.emacs.gnus.general:81949 Archived-At: Julien Danjou writes: > On Thu, Jun 14 2012, Michael Welsh Duggan wrote: > >> I'm afraid not. In some (but not all) instances the moved message >> doesn't show up as RECENT. (More specifically, UID SEARCH RECENT fails >> to locate them.) FWIW, RECENT doesn't seem to be very well specified in >> the IMAP spec, either: >> >> http://mail-archives.apache.org/mod_mbox/james-server-dev/200803.mbox/%3C88f6e29a0803210110x2784101crf66e32fd96fd1b7f@mail.gmail.com%3E > > Too bad, I wanted to be smart. But you say sometimes it works? Maybe we > could do RECENT, then a limited search (didn't find yet how this can be > done) and then a total search. WDYT? Honestly, I'd just do a limited search. You're already doing an EXAMINE, so you just need to parse the results to get the EXISTS count. Then a "UID SEARCH N:* HEADER Message-ID ..." where N is the exist count minus a small constant. If the limited search fails, just re-call the function with recent set to nil. -- Michael Welsh Duggan (mwd@cert.org)