From: Mark Walters Date: Sun, 30 Jun 2013 08:29:56 +0000 (+0100) Subject: Re: [PATCH 0/2] Contrib: Pick: Remove horrible hack X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=12a2723d31c01d13650ba01f83200b5dd7f5f48a;p=notmuch-archives.git Re: [PATCH 0/2] Contrib: Pick: Remove horrible hack --- diff --git a/f7/304c5f0db656e5347301b89f032e4c0eee3a05 b/f7/304c5f0db656e5347301b89f032e4c0eee3a05 new file mode 100644 index 000000000..c513c7569 --- /dev/null +++ b/f7/304c5f0db656e5347301b89f032e4c0eee3a05 @@ -0,0 +1,120 @@ +Return-Path: +X-Original-To: notmuch@notmuchmail.org +Delivered-To: notmuch@notmuchmail.org +Received: from localhost (localhost [127.0.0.1]) + by olra.theworths.org (Postfix) with ESMTP id E3F20431FBC + for ; Sun, 30 Jun 2013 01:30:11 -0700 (PDT) +X-Virus-Scanned: Debian amavisd-new at olra.theworths.org +X-Spam-Flag: NO +X-Spam-Score: 1.401 +X-Spam-Level: * +X-Spam-Status: No, score=1.401 tagged_above=-999 required=5 + tests=[DKIM_ADSP_CUSTOM_MED=0.001, FREEMAIL_FROM=0.001, + FREEMAIL_REPLY=2.499, NML_ADSP_CUSTOM_MED=1.2, RCVD_IN_DNSWL_MED=-2.3] + autolearn=disabled +Received: from olra.theworths.org ([127.0.0.1]) + by localhost (olra.theworths.org [127.0.0.1]) (amavisd-new, port 10024) + with ESMTP id e5vXK5Tq4Z2w for ; + Sun, 30 Jun 2013 01:30:05 -0700 (PDT) +Received: from mail2.qmul.ac.uk (mail2.qmul.ac.uk [138.37.6.6]) + (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) + (No client certificate requested) + by olra.theworths.org (Postfix) with ESMTPS id F3544431FB6 + for ; Sun, 30 Jun 2013 01:30:04 -0700 (PDT) +Received: from smtp.qmul.ac.uk ([138.37.6.40]) + by mail2.qmul.ac.uk with esmtp (Exim 4.71) + (envelope-from ) + id 1UtD1B-0005D7-8Z; Sun, 30 Jun 2013 09:29:57 +0100 +Received: from 93-97-24-31.zone5.bethere.co.uk ([93.97.24.31] helo=localhost) + by smtp.qmul.ac.uk with esmtpsa (TLSv1:AES128-SHA:128) (Exim 4.71) + (envelope-from ) + id 1UtD1B-0001Yr-0H; Sun, 30 Jun 2013 09:29:57 +0100 +From: Mark Walters +To: notmuch@notmuchmail.org +Subject: Re: [PATCH 0/2] Contrib: Pick: Remove horrible hack +In-Reply-To: <1369551008-30697-1-git-send-email-markwalters1009@gmail.com> +References: <1369551008-30697-1-git-send-email-markwalters1009@gmail.com> +User-Agent: Notmuch/0.15.2+192~g8222af3 (http://notmuchmail.org) Emacs/23.4.1 + (x86_64-pc-linux-gnu) +Date: Sun, 30 Jun 2013 09:29:56 +0100 +Message-ID: <87sj00xapn.fsf@qmul.ac.uk> +MIME-Version: 1.0 +Content-Type: text/plain; charset=us-ascii +X-Sender-Host-Address: 93.97.24.31 +X-QM-SPAM-Info: Sender has good ham record. :) +X-QM-Body-MD5: 8b4131088c5d751e49869592321450d5 (of first 20000 bytes) +X-SpamAssassin-Score: 0.6 +X-SpamAssassin-SpamBar: / +X-SpamAssassin-Report: The QM spam filters have analysed this message to + determine if it is + spam. We require at least 5.0 points to mark a message as spam. + This message scored 0.6 points. Summary of the scoring: + * 0.0 FREEMAIL_FROM Sender email is commonly abused enduser mail + provider * (markwalters1009[at]gmail.com) + * 1.0 FREEMAIL_REPLY From and body contain different freemails + * -0.4 AWL AWL: From: address is in the auto white-list +X-QM-Scan-Virus: ClamAV says the message is clean +X-BeenThere: notmuch@notmuchmail.org +X-Mailman-Version: 2.1.13 +Precedence: list +List-Id: "Use and development of the notmuch mail system." + +List-Unsubscribe: , + +List-Archive: +List-Post: +List-Help: +List-Subscribe: , + +X-List-Received-Date: Sun, 30 Jun 2013 08:30:12 -0000 + + +Would anyone be able to review (or just test) this pair of patches: they +are smaller and simpler than the diffstat suggests: the second patch is +just 3 extra lines of code (with some whitespace change and commments). + +This pair of patches does remove the worst piece of code in pick: a +sleep loop waiting for the correct message to arrive. + +I should have said that it applies on top of +id:1369550458-30562-1-git-send-email-markwalters1009@gmail.com + +(which is also very simple) + +Many thanks + +Mark + + + + +On Sun, 26 May 2013, Mark Walters wrote: +> Pick used to have one horrible hack: if the user asked it to open the +> first matching message it had to check whether that had arrived (as +> the search is asynchronous) and if not wait and try again. Now the +> opening of the first matching message is called via the pick process +> filter this hack can be removed. +> +> This did reveal the followibg small bug. Pick shows the subject line +> in the output but if it is the same as the previous line (ignoring re: +> etc) it shows ... If a single message is refreshed (eg for a tag +> update) this was got wrong. The change above triggered this and made +> the test fail as the unread tag was removed from the first matching +> message when it was displayed. +> +> Patch 2/2 fixes this by storing the previous subject with the search result. +> +> Best wishes +> +> Mark +> +> +> Mark Walters (2): +> contrib: pick: remove hack notmuch-pick-show-match-message-with-wait +> contrib: pick: fix refresh result +> +> contrib/notmuch-pick/notmuch-pick.el | 60 ++++++++++++++++----------------- +> 1 files changed, 29 insertions(+), 31 deletions(-) +> +> -- +> 1.7.9.1