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).
Marc Hartstein [Thu, 12 Jun 2008 16:05:46 +0000 (12:05 -0400)]
add reply-from hook for user-defined handling of default from in replies
The reply-from hook can now be used to process headers in a different manner
than the default for purposes of generating a default From: header when
replying to an email.
Decklin Foster [Wed, 18 Jun 2008 20:25:56 +0000 (16:25 -0400)]
respond_to? needs include_private argument
Sup started mysteriously bailing out on me today after an apt-get
update with stuff like this:
--- ArgumentError from thread: main
wrong number of arguments (2 for 1)
/usr/lib/ruby/1.8/sup/index.rb:424:in `respond_to?'
/usr/lib/ruby/1.8/sup/index.rb:424:in `flatten'
/usr/lib/ruby/1.8/sup/index.rb:424:in `load_sources'
/usr/lib/ruby/1.8/sup/index.rb:108:in `load'
/usr/lib/ruby/1.8/sup/util.rb:497:in `send'
/usr/lib/ruby/1.8/sup/util.rb:497:in `method_missing'
/usr/bin/sup:122
I did some digging and it seems like when Array#flatten, in attempting
to figure out if it can flatten some list element recursively, sends
it :respond_to? with both arguments -- I didn't even know there was a
second one (defaults to false; see docs). But this only happened recently
or something.
Here's somewhere else this came up:
http://www.ruby-forum.com/topic/154938
So, the fix is exactly the same. Should work fine on old Ruby as well.
William Morgan [Wed, 4 Jun 2008 02:11:34 +0000 (19:11 -0700)]
various color tweaks
- fix NME when there's no colors.yaml
- remove top-level "colors:" attribute of colors.yaml
- allow single attributes to be non-arrays
- flash at most one error
- other minor rejiggering
<color> and <attribute> can take the standard values available in the curses
environment.
There may be multiple attributes, but they need not be present.
- if there is an error in the user provided config file a default value will
be used (stored in the Colormap class)
Marcus Williams [Tue, 29 Apr 2008 20:45:39 +0000 (21:45 +0100)]
Gmail style attachment processing
This patch adds:
* the search terms "filename" and "filetype"
* hidden/reserved attachment label to track attachments
* new flag on thread index mode to denote an attachment '@'
* a "has:attachment" search query.
You can now search for something like "from:phil* filetype:pdf" for all
messages from a person called phil with a pdf attachment. You can also
specify a file name for the attachment with "filename:(this is a
filename with spaces.txt)". You can use wildcards in the filename
("filename:test*.pdf"). You can search for all messages from someone
with attachments using "from:someone has:attachment"
It will require sup-sync -all to work against all sources, but attempts
to be backwards compatable with non-synced sources.
Ben Walton [Wed, 21 May 2008 01:00:38 +0000 (21:00 -0400)]
maildir speedups
These changes improve the speed of maildir scanning by caching the mtime of the
relevant (cur, new) subdirectories and skipping the poll if the cached mtime
indicates that there are no new files to look at. We also save a syscall when
creating an id for a maildir entry by calling stat and using its properties
instead of File.mtime and File.size (which are wrappers around a stat call).
Currently, mtimes are cached across session in sources.yaml. We don't cache
the message id -> filename mapping (yet?) though, so this doesn't currently buy
much.
Lionel Ott [Sat, 24 May 2008 19:03:26 +0000 (21:03 +0200)]
add ask-before-quitting stuff
old hotkey "q" now asks before quitting and "Q" quits immediately, the way
"q" used to work. ( should take care of
http://sup.rubyforge.org/ditz/issue-8aa7ea95f066fd0668452093b85903bd142905c9.html )
William Morgan [Mon, 19 May 2008 21:11:11 +0000 (14:11 -0700)]
bugfix: gpg signing failures because when no trailing newlines
when :edit_signature was false, and a non-empty signature file was used,
message bodies didn't end in a newline. for some reason GPG produces
signature output that assumes a trailing newline, even if you don't
have one.
Ben Walton [Fri, 16 May 2008 16:52:11 +0000 (12:52 -0400)]
fix exception when editting an empty MULTI_HEADER
In edit-message-mode, an exception is generated by pressing 'c' to edit the Cc
field when no value currently exists. This is due to calling Array.join() on
nil. This patch addresses the execption by forcing an empty array when the
current value is nil.
Marcus Williams [Thu, 10 Apr 2008 10:31:55 +0000 (11:31 +0100)]
simple hook that runs when thread is marked as spam
This hook adds the ability to configure further actions that take place
when a user marks a thread as spam in sup.
mark-as-spam
------------
File: $HOME/.sup/hooks/mark-as-spam.rb
This hook is run when a thread is marked as spam
Variables:
thread: The message thread being marked as spam.
This ensures the unread count for each label is correct.
I often read my list mail from the label list. When I close the thread index
and go back to the label list the unread message count is wrong. This bugs me.
I'm sure a less brutal way of doing this is possible with the UpdateManager
but that seems complicated and therefore prone to errors.
Marc Hartstein [Thu, 17 Apr 2008 20:43:29 +0000 (16:43 -0400)]
add 'A' (archive and mark read) command to inbox-mode
For some email, the only meaningful content is in the subject line. It is thus
useful to be able to dispatch this email with a single command after glancing
at it.
As 'N' moves the cursor, and 'a' doesn't clear the "unread" flag, it is
currently necessary to press "Nka" to do this on a single thread.
The 'A' command does this simple task with a single, easy-to-remember,
keystroke, but makes it harder to hit accidentally than 'a'. A multi_ mode is
supplied.