From: Ben Walton <bwalton@artsci.utoronto.ca>
To: sup-devel <sup-devel@rubyforge.org>
Subject: Re: [sup-devel] [issue49] crash when pressing 'c' to compose
Date: Mon, 25 Jan 2010 09:22:49 -0500 [thread overview]
Message-ID: <1264429332-sup-9299@ntdws12.chass.utoronto.ca> (raw)
In-Reply-To: <1264426888.82.0.129719799236.issue49@masanjin.net>
[-- Attachment #1.1.1: Type: text/plain, Size: 950 bytes --]
Excerpts from anonymous's message of Mon Jan 25 08:41:29 -0500 2010:
This was me...
Patch attached.
> --- RuntimeError from thread: main
> Invalid email term type any
> ./sup/xapian_index.rb:573:in `mkterm'
> ./sup/xapian_index.rb:410:in `build_xapian_query'
> ./sup/xapian_index.rb:410:in `map'
> ./sup/xapian_index.rb:410:in `build_xapian_query'
> ./sup/xapian_index.rb:114:in `each_id'
> ./sup/xapian_index.rb:124:in `each_id_by_date'
> ./sup/xapian_index.rb:155:in `load_contacts'
> ./sup/index.rb:236:in `send'
> ./sup/index.rb:236:in `method_missing'
> ./sup/buffer.rb:543:in `ask_for_contacts'
> ./sup/util.rb:553:in `send'
> ./sup/util.rb:553:in `method_missing'
> ./sup/modes/compose-mode.rb:24:in `spawn_nicely'
> ../bin/sup:327
HTH.
-Ben
--
Ben Walton
Systems Programmer - CHASS
University of Toronto
C:416.407.5610 | W:416.978.4302
GPG Key Id: 8E89F6D2; Key Server: pgp.mit.edu
Contact me to arrange for a CAcert assurance meeting.
[-- Attachment #1.1.2: 0001-Fix-crash-in-mkterm-when-parameter-any-is-used-with-.patch --]
[-- Type: application/octet-stream, Size: 1083 bytes --]
From c2d9caf6ffa3f6b4aad6d2bd14a44ee9140314a3 Mon Sep 17 00:00:00 2001
From: Ben Walton <bwalton@artsci.utoronto.ca>
Date: Mon, 25 Jan 2010 09:19:34 -0500
Subject: [PATCH] Fix crash in mkterm when parameter :any is used with :email
Without this patch, sup was crashing in mkterm after pressing 'c' from
index mode to compose a message. This patch teaches mkterm how to
handle building a query consisting of both from_email to to_email.
Signed-off-by: Ben Walton <bwalton@artsci.utoronto.ca>
---
lib/sup/xapian_index.rb | 1 +
1 files changed, 1 insertions(+), 0 deletions(-)
diff --git a/lib/sup/xapian_index.rb b/lib/sup/xapian_index.rb
index 5efd47b..cb1dde7 100644
--- a/lib/sup/xapian_index.rb
+++ b/lib/sup/xapian_index.rb
@@ -570,6 +570,7 @@ EOS
case args[0]
when :from then PREFIX['from_email']
when :to then PREFIX['to_email']
+ when :any then PREFIX['to_email'] + args[1].to_s.downcase + ' OR ' + PREFIX['from_email']
else raise "Invalid email term type #{args[0]}"
end + args[1].to_s.downcase
when :source_id
--
1.6.6
[-- Attachment #1.2: signature.asc --]
[-- Type: application/pgp-signature, Size: 189 bytes --]
[-- Attachment #2: Type: text/plain, Size: 143 bytes --]
_______________________________________________
Sup-devel mailing list
Sup-devel@rubyforge.org
http://rubyforge.org/mailman/listinfo/sup-devel
next prev parent reply other threads:[~2010-01-25 14:23 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-01-25 13:41 anonymous
2010-01-25 14:22 ` Ben Walton [this message]
2010-01-25 14:29 ` Ben Walton
2010-01-25 16:03 ` [sup-devel] [PATCH] fix participants queries Rich Lane
2010-01-25 16:35 ` Ben Walton
2010-01-25 21:20 ` William Morgan
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
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1264429332-sup-9299@ntdws12.chass.utoronto.ca \
--to=bwalton@artsci.utoronto.ca \
--cc=sup-devel@rubyforge.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.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox