unofficial mirror of notmuch@notmuchmail.org
 help / color / mirror / code / Atom feed
From: Michal Sojka <sojkam1@fel.cvut.cz>
To: James Vasile <james@hackervisions.org>, notmuch@notmuchmail.org
Subject: Re: [PATCH] Return maximum of 150 results
Date: Fri, 19 Aug 2011 18:00:36 +0200	[thread overview]
Message-ID: <877h69o0gr.fsf@steelpick.2x.cz> (raw)
In-Reply-To: <87r54hv2ct.fsf@opensourcematters.org>

On Fri, 19 Aug 2011, James Vasile wrote:
> On Fri, 19 Aug 2011 17:00:23 +0200, Michal Sojka <sojkam1@fel.cvut.cz> 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<ret>". 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 <sojkam1@fel.cvut.cz>
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---

  reply	other threads:[~2011-08-19 16:00 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-08-19  3:15 [PATCH] Return maximum of 150 results James Vasile
2011-08-19 15:00 ` Michal Sojka
2011-08-19 15:37   ` James Vasile
2011-08-19 16:00     ` Michal Sojka [this message]
2011-08-19 16:30       ` James Vasile
2011-08-19 18:30       ` Jameson Graef Rollins
2011-08-20 19:11   ` James Vasile
2011-08-22 23:46     ` Daniel Schoepe

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://notmuchmail.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=877h69o0gr.fsf@steelpick.2x.cz \
    --to=sojkam1@fel.cvut.cz \
    --cc=james@hackervisions.org \
    --cc=notmuch@notmuchmail.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://yhetil.org/notmuch.git/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).