[PATCH] Return maximum of 150 results
Michal Sojka
sojkam1 at fel.cvut.cz
Fri Aug 19 09:00:36 PDT 2011
On Fri, 19 Aug 2011, James Vasile wrote:
> On Fri, 19 Aug 2011 17:00:23 +0200, Michal Sojka <sojkam1 at 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 at 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---
More information about the notmuch
mailing list