Subject: [sup-talk] sup crash when doing search

From: [email-masked] (Damon Conway)
Date: Tue, 12 May 2009 12:18:45 -0500

I installed the chronic gem with "sudo gem install chronic", and then tried a search by date.

I did "before:(1st apr)" in a global search, and sup crashed.  I have included the exception log below.
My guess is that I'm missing a gem, but I'm not quite sure which one.  I just installed sup yesterday
after I found it when looking around for any news on imap support in nmh so it's very likely that I've
missed something.

So far sup is quite impressive.  Keep up the good work, and thanks for the mail client.

Thanks,
Damon

Some system details:
	Ubuntu 9.04
	Dell XPS 1210
	ruby 1.8.7 (2008-08-11 patchlevel 72) [i486-linux]
	gnome-terminal 2.26.0
	Screen version 4.00.03jw4 (FAU) 2-May-06

--- NoMethodError from thread: main
private method `gsub' called for nil:NilClass
/var/lib/gems/1.8/gems/sup-0.7/lib/sup/index.rb:568:in `parse_user_query_string'
/var/lib/gems/1.8/gems/sup-0.7/lib/sup/util.rb:499:in `send'
/var/lib/gems/1.8/gems/sup-0.7/lib/sup/util.rb:499:in `method_missing'
/var/lib/gems/1.8/gems/sup-0.7/lib/sup/modes/search-results-mode.rb:29:in `spawn_from_query'
/var/lib/gems/1.8/gems/sup-0.7/bin/sup:239
/var/lib/gems/1.8/bin/sup:19:in `load'
/var/lib/gems/1.8/bin/sup:19

---

From: [email-masked] (Marcus Williams)
Date: Wed, 13 May 2009 08:14:12 +0100

> I did "before:(1st apr)" in a global search, and sup crashed.  I have included

I can reproduce this, although this used to work. Not sure whats
happening offhand but I'll poke around and see if I can fix it.

Marcus

---

From: [email-masked] (Marcus Williams)
Date: Wed, 13 May 2009 09:50:24 +0100

> happening offhand but I'll poke around and see if I can fix it.

Ok, the crash doesnt happen in master only in next. The reason for the
crash is the new "limit" search option that doesnt check if chronic
has failed. Patch for that to follow (against next).

Theres also another bug in that Chronic should default to date
searches in the past as email is almost always dated earlier than your
current time (except spam). So theres a patch for that following as
well (against master)

Marcus

---

From: [email-masked] (Marcus Williams)
Date: Wed, 13 May 2009 10:31:36 +0100

> current time (except spam). So theres a patch for that following as

I should also have added that chronic doesnt understand dates like
"1st apr" strangely, but it should have told you (the patches fix this
problem). "1 apr", "apr 1st" are ok I think.

Marcus