Marcus Williams [Tue, 15 Jan 2008 09:40:04 +0000 (09:40 +0000)]
Added quoteline hook for reply mode
This hook allows a user to configure a quote line for replies. The
default is the standard sup quote line "Excerpts from...". Multiple
lines are allowed.
Marcus Williams [Tue, 15 Jan 2008 14:02:27 +0000 (14:02 +0000)]
Fix for some warnings on faked addresses and ids
Fixes a few unitialised variable warnings when logging faked message
addresses or faked message ids. Also initialises the @lines var when the
message is not text.
William Morgan [Mon, 14 Jan 2008 01:23:49 +0000 (17:23 -0800)]
bugfix: file-browser-mode should reset the cursor when entering a new dir
Otherwise, entering a new directory can start with the cursor and page at
a weird location, e.g. with the very last file appearing at the top of
the screen.
William Morgan [Sun, 13 Jan 2008 05:48:36 +0000 (21:48 -0800)]
make 'n' and 'p' in thread-view-mode always top-and-left justify
Previously, 'n' and 'p' would only move the cursor if the next or
previous message already completely fit on the screen. Now they always
move the buffer so that the current message is at the top left. I think
this makes it a little easier to read a whole thread, message by
message.
William Morgan [Wed, 9 Jan 2008 18:50:04 +0000 (10:50 -0800)]
compare bin and lib versions, and error out on mismatch
This should help the occasional bug reports that happen because someone
runs bin/sup from development, but somehow picks up libraries from a
pre-installed gem.
To make "rake gem" still function when working from a checkout, we fake
a version number of 999. (Gem versions must be dotted numerics.)
It won't detect version mismatches against gems that have been installed
via "rake gem" from a checkout, but that is typically a less common
issue.
William Morgan [Tue, 8 Jan 2008 18:42:58 +0000 (10:42 -0800)]
bugfix: attachment tempfile deletion
attachment temp files (used for Attachment#view!) now use (a
monkey-patched) Tempfile, so they should be deleted upon program exit or
gc or however it works.
William Morgan [Tue, 8 Jan 2008 18:04:31 +0000 (10:04 -0800)]
bugfix: thread correctly in resumed/killed draft messages
the entire thread was being deleted because of UpdateManager changes.
now there are two signals: deleted and single_message_deleted, the first
for thread deletion and the second for draft message removal, and
ThreadIndexMode handles them correctly.
Ismo Puustinen [Fri, 4 Jan 2008 04:56:15 +0000 (20:56 -0800)]
added some unit tests for message parsing
excerpts from original message from Ismo Puustinen <ismo@iki.fi>:
I wrote one new unit test. The difference to previous tests is that
this test actually currently fails: for some reason, dividing a
message body into chunks doesn't succeed. The message in question
is an actual email message sent to vim-mac mailing list; only
the names and email addresses have been obscured. I selected the
message for the tests because it kept crashing my sup-sync. :-)
William Morgan [Fri, 28 Dec 2007 21:29:53 +0000 (13:29 -0800)]
add multi-key sequence support
BufferManager is now the main entry point for keystroke resolution,
via #resolve_input_with_keymap, as multi-key commands require
displaying one or more prompts.
William Morgan [Sun, 30 Dec 2007 04:32:23 +0000 (20:32 -0800)]
maintain a more reasonable thread structure during threading
two new invariants: every Thread should have at least one Container
tree, and every Container tree should have at least one Message.
this is also a bugfix for threadset#remove_id, but the current use
of that function is a bug in and of itself, which I will fix in
the next commit. At any rate, this is better code, presumably.
William Morgan [Sun, 30 Dec 2007 00:56:37 +0000 (16:56 -0800)]
stop automatically stripping Re: bits from message subjects when indexing
Rationale: when thread-by-subject is on, whether the subject is a reply or not
is actually used by threading to pick a root message (Thread#each). Stripping
the Re: header then gives incorrect behavior until the message has been loaded
from the source. Currently this isn't really a problem because threading isn't
called until all messages have been loaded from source, but in the future we
might optimize that a bit, at in the present, it gives weird results when
debugging.
William Morgan [Thu, 27 Dec 2007 18:14:08 +0000 (10:14 -0800)]
bugfix in question asking: update position when window is resized
previously we stored the position and width only once, at textfield
creation time, but then later screen resizings would make that
invalid. now we set those values every time we activate the textfield.
William Morgan [Wed, 26 Dec 2007 20:44:37 +0000 (12:44 -0800)]
make explicitly searching for "label:spam" and "label:deleted" work
see comments for how this is possible without implementing our own
full-blown Ferret query parser.
William Morgan [Wed, 26 Dec 2007 20:26:47 +0000 (12:26 -0800)]
user query string normalization by pre-parsing with Ferret query parser
This is a bit of a hack, because it relies on the fact that Ferret query
objects, when converted to string form, are normalized to have +field:text
and -field:text instead of AND, OR, and NOT keywords. Then we can apply
all our string substitutions to just the normalized form.
Marcus Williams [Sat, 22 Dec 2007 23:49:53 +0000 (15:49 -0800)]
additional gmail-style query language additions
original message:
Simple patch attached. Adds the "during" operator to the date searches
so you can say during:today or during:november . I prefer it to in/on
today :)
Also adds an alias for the label search of "is" so that you can do
more gmail like searches is:starred, is:unread, is:spam, is:deleted.
The last two required changing the return value to a list/pair in
parse_user_string_query and I'm not sure what the best way to do this
in ruby is. For now its a simple list. Also is there a better way to
deal with a nil result other than returning [nil,nil]? The first
element is the parsed query string, the second allows the parser to
add options to the query like :load_spam, :load_deleted which are then
used in the code already to drop (or not) the spam/deleted labeled
messages.
I figured you'd never want to search killed threads... and it made the
patch nastier because of the :skip_killed flag.
I'd like to add a has:attachment operator but the ferret index doesnt
appear to store enough info for this. It would be really nice to be
able to search for attachments (of certain types as well with
filename:...) I took a look at extending the index to add a new field
"filename" that contains a list of filenames attached to a message,
but this would break everyones index so I'm just requesting it as a
wishlist item rather than submitting a patch. With it you could do
wildcard filename attachment searches and the has:attachment search
would just be converted to a search for the presence of any filename.