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 A6FAB429E25 for ; Fri, 19 Aug 2011 09:00:40 -0700 (PDT) X-Virus-Scanned: Debian amavisd-new at olra.theworths.org X-Spam-Flag: NO X-Spam-Score: 0 X-Spam-Level: X-Spam-Status: No, score=0 tagged_above=-999 required=5 tests=[none] 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 VmgnR5IQ4Esa for ; Fri, 19 Aug 2011 09:00:39 -0700 (PDT) Received: from max.feld.cvut.cz (max.feld.cvut.cz [147.32.192.36]) by olra.theworths.org (Postfix) with ESMTP id 05C48431FD0 for ; Fri, 19 Aug 2011 09:00:39 -0700 (PDT) Received: from localhost (unknown [192.168.200.4]) by max.feld.cvut.cz (Postfix) with ESMTP id 4F24E19F333A; Fri, 19 Aug 2011 18:00:38 +0200 (CEST) X-Virus-Scanned: IMAP AMAVIS Received: from max.feld.cvut.cz ([192.168.200.1]) by localhost (styx.feld.cvut.cz [192.168.200.4]) (amavisd-new, port 10044) with ESMTP id DIwy78S3ZiKI; Fri, 19 Aug 2011 18:00:37 +0200 (CEST) Received: from imap.feld.cvut.cz (imap.feld.cvut.cz [147.32.192.34]) by max.feld.cvut.cz (Postfix) with ESMTP id 3F99C3CFE71; Fri, 19 Aug 2011 18:00:37 +0200 (CEST) Received: from steelpick.2x.cz (unknown [141.76.49.12]) (Authenticated sender: sojkam1) by imap.feld.cvut.cz (Postfix) with ESMTPSA id 3D950FA003; Fri, 19 Aug 2011 18:00:37 +0200 (CEST) Received: from wsh by steelpick.2x.cz with local (Exim 4.76) (envelope-from ) id 1QuRUq-00070z-Ua; Fri, 19 Aug 2011 18:00:36 +0200 From: Michal Sojka To: James Vasile , notmuch@notmuchmail.org Subject: Re: [PATCH] Return maximum of 150 results In-Reply-To: <87r54hv2ct.fsf@opensourcematters.org> References: <87zkj6um50.fsf@opensourcematters.org> <87mxf5v43c.fsf@steelpick.2x.cz> <87r54hv2ct.fsf@opensourcematters.org> User-Agent: Notmuch/0.6.1-91-g55c2c34 (http://notmuchmail.org) Emacs/23.3.1 (x86_64-pc-linux-gnu) Date: Fri, 19 Aug 2011 18:00:36 +0200 Message-ID: <877h69o0gr.fsf@steelpick.2x.cz> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii 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: Fri, 19 Aug 2011 16:00:40 -0000 On Fri, 19 Aug 2011, James Vasile wrote: > On Fri, 19 Aug 2011 17:00:23 +0200, Michal Sojka wrote: > > Hi James, > > > > On Fri, 19 Aug 2011, James Vasile wrote: > > > Display a maximum of 150 results when searching for messages. This > > > prevents client lag when searches return thousands of results you'll > > > never look at > > > > I would not like this feature. If I search for something I really want > > to see everything. For example, if I want to remove inbox from many > > messages, I would search for them and press "-inbox". With your > > patch I'd not be sure whether there are some more messages or not. > > Ah, I do such things from the commandline, but you are right that there > is a good use for such. > > > > > > (use the Filter command to cut down results that exceed 150). > > > > You can start filtering while the previous search is still running, so I > > do not see problem with having bug number of results. > > Yes, you can filter while the search runs, but that's not the only > problem with huge search results. On my system, I routinely do searches > that return 15000+ messages when I'm only interested in the first > several. When I hit Q, Emacs annoyingly asks me for permission to kill > the buffer because it has a running process. And emacs lags as it > processes all that data. Ahh, I almost forget about this. I use this patch to disable this. -Michal --8<---------------cut here---------------start------------->8--- >From 0e0ae662026f4a17b882bb33140e0bb62e8da995 Mon Sep 17 00:00:00 2001 From: Michal Sojka Date: Fri, 19 Aug 2011 17:58:40 +0200 Subject: [PATCH] Do not query on notmuch-search exit Emacs 23.2 queries by default about killing existing processes. Disable this behavior for notmuch. I'm not sure whether this works with earlier versions. --- emacs/notmuch.el | 4 +++- 1 files changed, 3 insertions(+), 1 deletions(-) diff --git a/emacs/notmuch.el b/emacs/notmuch.el index 3d82f0d..8858f3e 100644 --- a/emacs/notmuch.el +++ b/emacs/notmuch.el @@ -858,7 +858,9 @@ The optional parameters are used as follows: "--sort=newest-first") query))) (set-process-sentinel proc 'notmuch-search-process-sentinel) - (set-process-filter proc 'notmuch-search-process-filter)))) + (set-process-filter proc 'notmuch-search-process-filter) + (set-process-query-on-exit-flag proc nil))) + ) (run-hooks 'notmuch-search-hook))) (defun notmuch-search-refresh-view () -- 1.7.5.4 --8<---------------cut here---------------end--------------->8---