William Morgan [Sun, 26 Apr 2009 15:44:37 +0000 (11:44 -0400)]
change email header parsing. MASSIVE SPEEDUP!
restructure the email header parsing code to improve speed and to
improve API. MBox::read_header now returns a hash containing all
headers, with keys downcased but nothing else.
update Message#parse_header to accept this new format.
update unit tests to reflect new format.
The exciting news is that changes in how the parsing works have resulted
in a 480% speedup in message parsing speed (634 message/s vs 132
messages/s on my machine), across ALL source types. hell yes.
When responding to an email with a recipient_email field (i.e. an Envelope-To
header), look up the name in the account list, but keep the original email
address.
William Morgan [Wed, 25 Mar 2009 15:49:56 +0000 (08:49 -0700)]
overwrite from and to fields in index when saving a message
See comments in the code. This allows you to forcibly update the from/to
address stored in the index for messages, which means you can correct
the bad stuff stored in there due to previous versions of Sup that
canonicalized email addresses.
William Morgan [Wed, 25 Mar 2009 13:25:48 +0000 (06:25 -0700)]
rework Rakefile for "rake gem" and "rake tarball"
Move version into sup-version.rb and filelist into sup-files.rb. Rake gem
now builds the gem; rake tarball builds the tarball. No Hoe involved.
Update release-script accordingly.
William Morgan [Wed, 25 Mar 2009 12:33:45 +0000 (05:33 -0700)]
make ThreadIndexMode#save optionally threaded
The call to #save during #cleanup needs to block because this is where
state gets saved immediately before exit. Other calls to #save, e.g.
those triggered by "$", can be backgrounded.
William Morgan [Mon, 23 Mar 2009 15:55:09 +0000 (08:55 -0700)]
don't add :unread and :inbox for dupes
Allow merging in of labels from duplicate messages, EXCEPT for
:unread and :inbox labels. (These two have special semantics
and, in contrast to the other special-semantics labels, might
appear on a new message.)
William Morgan [Mon, 23 Mar 2009 14:11:16 +0000 (10:11 -0400)]
update unit tests to reflect header parsing
Blank headers now have a value of "", not nil. Nothing wrong with that.
The test captures behavior that doesn't really matter, but I've updated
it to at least reflect reality.
Steve Goldman [Sun, 23 Nov 2008 20:59:49 +0000 (15:59 -0500)]
use offscreen lines for textfield overflow
In the To:, Cc:, Bcc:, etc., prompts, the TextField was initializing
an NCurses form with zero offscreen lines. So when the user typed too
many addresses at the prompt the cursor wrapped around and everything
they had typed was clobbered. This patch initializes the form object
to have 256 offscreen lines (I had no rationale for 256 except that it
is a nice, big power of two). Now the user can type plenty of names
and the wrap-around works as the user would expect.
Steve Goldman [Sun, 23 Nov 2008 18:53:09 +0000 (13:53 -0500)]
Display a default save path for attachments
Let the user specify a default path for saving attachments with
:default_attachment_save_dir: in config.yaml, and display this path in
front of the filename when saving an attachment in thread view mode.
Rich Lane [Tue, 11 Nov 2008 17:52:50 +0000 (12:52 -0500)]
fix class name collision in testcases
'rake test' was broken because both testcases' classes had the same name and
the setup method was overridden. This patch changes the class name in
test_mbox_parsing.
Adds two hook helper methods, get and set, that allow hooks to pass
values to each other. Also, updates the documentation for hooks
to reflect these new commands (as well as the old ones).
Decklin Foster [Sun, 26 Oct 2008 18:31:12 +0000 (14:31 -0400)]
Don't redirect run-mailcap to /dev/null
It gets confused about stdout not being a terminal, and HTML attachments will
be converted to text/plain which uses the needsterminal entry for less(1).
Ben Walton [Wed, 4 Jun 2008 00:17:01 +0000 (20:17 -0400)]
maildir cpu usage regression fix
This small tweak resolves the cpu usage issue pointed out by Grant Hollingworth
on sup-talk (http://rubyforge.org/pipermail/sup-talk/2008-May/001539.html).