Use old 'syck' module for YAML parsing
get rid of "not initialized" error
Use correct date format for gem spec

Signed-off-by: Hamish Downer <dmishd@gmail.com>
Working check for alias on ruby 1.9.3

Signed-off-by: Hamish Downer <dmishd@gmail.com>
Correct over-zealous signature matching

If a message body contains e.g. a table with lines that match the
signature pattern (Bugzilla mails and SQL session pastes are the ones
that irk me) then avoid treating said table as a signature (but only if
the remainder contains a traditional signature too (as a compromise)).
Don't fail on empty lines while expanding

While expanding an GPG signature which must have contained a line that
ended up as nil while chomp'ing, chomp will crash. This patch filters
out lines which are nil.

Signed-off-by: Hamish Downer <dmishd@gmail.com>
 Catch errors while saving a message to disk for editing
edit-message-mode: Fix the way signatures are handled

The current signatures handling is not suitable for account changing
in edit-message-mode. It is working fine when the edit_signature
option is false, but it could have a better behavior when this option
is enabled.

This commit tries to do this by appending the signature to the body
text if the edit_signature is true, then after editing the message it
checks if the signature has been modified by comparing the end of the
file to the current account's signature. If it has been edited then we
stick to it by setting @sig_edited to true, otherwise the signature
will still be automatically changed if another account is selected.

Note the code was originally written by Damien Leone
<damien.leone@fensalir.fr> but the patch did not apply when I got round
to doing it, and needed some refactoring for the current state of the
code.
reply-mode: improve the way headers are handled

I noticed that changing the Reply-to selector was also changing the
other headers such as From even if you edited it. I guess it is an
unwanted behaviour since this selector should only behave on the To
and Cc fields.

This commit splits the headers in two "types", those handled by
Reply-To selector and those that are only merged with the first ones
at initialization of the edit-mode.

It also gives a better support of the Customized choice by saving back
the fields for later use.

Signed-off-by: Hamish Downer <dmishd@gmail.com>
Require gpgme 1.0.8 (v2 breaks API)

Signed-off-by: Hamish Downer <dmishd@gmail.com>
Don't repeat signature

Previous patches that did better signature handling add signature
elsewhere, so we don't need to do it in initialize.
Merge branch 'next' of gitorious.org:sup/mainline into next
Update web page with new URLs
Make stemming language configurable.

This change allows you to configure the language used for stemming,
which should result in better search results for users with
predominantly non-English mail.

This change is backwards-compatible - the default stemming language
remains English, unless a specific language is set in your config.yaml.
To do so, add the key :stem_language to you config.yaml with one of
these values:

  danish, dutch, english, finnish, french, german, hungarian, italian,
  norwegian, portuguese, romanian, russian, spanish, swedish, turkish

IMPORTANT: after changing the language, you must re-index all of your
mail!

See http://xapian.org/docs/stemming.html for more information on how
Xapian performs stemming.
Added new hook 'gpg-expand-keys'

sup does not support GPG groups, since GPGME ignores group definitions
in gpg.conf by design. Therefore, there is no way e.g. to send encrypted
mails to mailing lists using GPG groups.

The new hook receives the list of current recipients and allows the user
to swap recipients with other email addresses or key IDs. A simple hook
to add group support could look like this:

----------8<---------------
lookup_table = {}

`gpg --with-colons --list-config group 2> /dev/null`.each_line do |line|
  email_and_keys = line.split(':')[2..3]
  lookup_table[email_and_keys[0].gsub(/[<>]/, '')] = email_and_keys[1].strip.split(';')
end

recipients.map { |r| lookup_table.has_key?(r) ? lookup_table[r] : r }.flatten
---------->8---------------
Merge pull request #6 from ericweikl/stem-language

Make stemming language configurable
Merge pull request #7 from ericweikl/gpg-expand-keys

Add new hook 'gpg-expand-keys'
Fix #5: Require relative that works on both ruby 1.8 and 1.9

A merge of issue #2 and #5, conditionally use the safer require_relative
if present (>= ruby 1.9).
Fix #9: Convert use of Rake::GemPackageTask to Gem::PackageTask

 Rake::GemPackageTask is deprecated, update to Gem::PackageTask
Fix #10: Use a maintained fork of xapian-full