sup:ezyang.git
5 years ago[HACK] Deal with duplicate entries per ID in index. maildir-sync
Edward Z. Yang [Sat, 1 Dec 2012 22:42:05 +0000 (14:42 -0800)]
[HACK] Deal with duplicate entries per ID in index.

At some point in the past, I made some faulty code changes which
resulted in some entries in the index having multiple documents
associated with the same ID.  The codebase makes fairly strong
assumptions about IDs corresponding to one document, and this caused
a lot of problems for me since there wasn't an easy way of fixing
the problem.  This hack purges the extra documents from the
database when you run into them; there isn't too much data stored
in them which isn't recoverable, so the operation is relatively
safe.  It should also be unnecessary, so you can drop this patch
if you don't ever get these problems.

Signed-off-by: Edward Z. Yang <ezyang@mit.edu>
5 years ago[HACK] Reject updates to non-existent messages.
Edward Z. Yang [Thu, 11 Oct 2012 04:35:43 +0000 (21:35 -0700)]
[HACK] Reject updates to non-existent messages.

The inotify code is a bit sloppy right now and will sometimes
trigger events which are stale by the time (for example, saying
something has been created at filepath, when actually it's already
been moved away.)  So if we get in a situation like that, we should
just drop the update on the floor.  Ideally, the code would be less
sloppy.

Signed-off-by: Edward Z. Yang <ezyang@mit.edu>
5 years ago[HACK] Miscellaneous race condition fixes.
Edward Z. Yang [Fri, 30 Nov 2012 22:22:21 +0000 (14:22 -0800)]
[HACK] Miscellaneous race condition fixes.

Signed-off-by: Edward Z. Yang <ezyang@mit.edu>
5 years ago[HACK] Try reloading locations from index on error.
Edward Z. Yang [Sat, 1 Dec 2012 10:37:09 +0000 (02:37 -0800)]
[HACK] Try reloading locations from index on error.

Under certain circumstances, in-memory copies of a message can
become stale because some other copy of the message (e.g. with
the same message ID but not with the same object identity) updated
some state and pushed to the index, but the message didn't see it.
This was most notable when the location of an object changed
completely asynchronously from the display of a message, and as
a result the locations were wrong until you restarted sup.

This patch is a band-aid, which tries reloading the location info
from the index if something "bad" happens. There are some ways
to generalize this patch:

- Generally, reload everything on location error, not just the
  locations (since metadata may be out of date);

- Reload data more vigorously even when there is no location error;

- Make a mechanism whereby if a message is updated, other threads
  can find out about it and incorporate the changes.

Re the last point, it is NOT sufficient to just add a memotable for
messages and make sure the object identity here is coherent, because
multiple threads may be touching the same message and this generally
breaks a lot of invariants (and you'd need locking anyway.)

The band-aid is "fairly good", one might expect changes to messages
to not occur asynchronously in another thread, and location shuffling
is the main one. The other possibility is status change of a thread,
but this seems to happen rarely enough that it is not a problem.

Signed-off-by: Edward Z. Yang <ezyang@mit.edu>
5 years ago[MAILDIR] Inotify support on Maildir for instant message retrieval.
Edward Z. Yang [Mon, 3 Sep 2012 18:09:34 +0000 (14:09 -0400)]
[MAILDIR] Inotify support on Maildir for instant message retrieval.

Signed-off-by: Edward Z. Yang <ezyang@mit.edu>
5 years ago[MAILDIR] Write moves between Maildirs to 'mv' directory, for OfflineIMAP.
Edward Z. Yang [Thu, 23 Aug 2012 08:27:04 +0000 (04:27 -0400)]
[MAILDIR] Write moves between Maildirs to 'mv' directory, for OfflineIMAP.

This doesn't do anything (except fill up disk space) unless you
have an extra patch for OfflineIMAP, which you can find here:

    https://github.com/ezyang/offlineimap

Signed-off-by: Edward Z. Yang <ezyang@mit.edu>
5 years ago[MAILDIR] Implement moving message between Maildir sources based on label.
Edward Z. Yang [Wed, 22 Aug 2012 03:40:03 +0000 (23:40 -0400)]
[MAILDIR] Implement moving message between Maildir sources based on label.

To use this functionality, in config.yaml, you need a new option
:maildir_labels:

    :maildir_labels:
      :stanford: [[:inbox, 4], [null, 6]]

The value of this option is a dictionary of "accounts" to lists of
precedences.  Read it as follows:

    For messages in source 4 or source 6 (consult sources.yaml),
    if the message has the :inbox tag, move it to source 4, otherwise
    move it to source 6.

This will automatically start working for any new mail you change the
labels of.  In order to apply this to old mail, you need to run
sup-sync-back-maildir.  If you're going to move a lot of mail, you
probably want the companion patch "Write moves between Maildirs to
'mv' directory, for OfflineIMAP" which enables efficient same-server
IMAP moving.

Signed-off-by: Edward Z. Yang <ezyang@mit.edu>
5 years ago[MAILDIR] Add draft-save-to hook, to save drafts to Maildirs.
Edward Z. Yang [Wed, 29 Aug 2012 03:31:55 +0000 (23:31 -0400)]
[MAILDIR] Add draft-save-to hook, to save drafts to Maildirs.

Signed-off-by: Edward Z. Yang <ezyang@mit.edu>
5 years ago[MAILDIR] Fix assumptions about drafts and deleted messages in threads.
Edward Z. Yang [Wed, 29 Aug 2012 18:09:04 +0000 (14:09 -0400)]
[MAILDIR] Fix assumptions about drafts and deleted messages in threads.

Signed-off-by: Edward Z. Yang <ezyang@mit.edu>
5 years ago[MAILDIR] Better backwards synchronization for killed messages.
Edward Z. Yang [Mon, 27 Aug 2012 17:31:12 +0000 (13:31 -0400)]
[MAILDIR] Better backwards synchronization for killed messages.

Signed-off-by: Edward Z. Yang <ezyang@mit.edu>
5 years ago[MAILDIR] Sync and update other threads when Maildir sync-back changes location.
Edward Z. Yang [Tue, 21 Aug 2012 19:19:11 +0000 (15:19 -0400)]
[MAILDIR] Sync and update other threads when Maildir sync-back changes location.

Signed-off-by: Edward Z. Yang <ezyang@mit.edu>
5 years agoExplicitly include iconv to avoid class mismatch errors.
Edward Z. Yang [Sun, 2 Dec 2012 02:41:29 +0000 (18:41 -0800)]
Explicitly include iconv to avoid class mismatch errors.

Signed-off-by: Edward Z. Yang <ezyang@mit.edu>
5 years agoAdd sent-save-to hook.
Edward Z. Yang [Wed, 29 Aug 2012 01:40:06 +0000 (21:40 -0400)]
Add sent-save-to hook.

Signed-off-by: Edward Z. Yang <ezyang@mit.edu>
5 years agoDon't run before-add-message hook for messages already in index.
Edward Z. Yang [Thu, 23 Aug 2012 18:19:24 +0000 (14:19 -0400)]
Don't run before-add-message hook for messages already in index.

Signed-off-by: Edward Z. Yang <ezyang@mit.edu>
5 years agoAvoid overwriting flashed poll information with "Updating Xapian" message.
Edward Z. Yang [Wed, 19 Jan 2011 11:56:52 +0000 (11:56 +0000)]
Avoid overwriting flashed poll information with "Updating Xapian" message.

Signed-off-by: Edward Z. Yang <ezyang@mit.edu>
5 years agoWhen Xapian is too old, print out the version of Xapian detected.
Edward Z. Yang [Thu, 12 Jul 2012 03:10:47 +0000 (23:10 -0400)]
When Xapian is too old, print out the version of Xapian detected.

Signed-off-by: Edward Z. Yang <ezyang@mit.edu>
5 years agoHandle drafts with high ID numbers.
Edward Z. Yang [Wed, 29 Aug 2012 00:34:20 +0000 (20:34 -0400)]
Handle drafts with high ID numbers.

Previously, drafts were scanned once at startup, and then
the draft with the highest ID number was used as the "high
watermark".  This, however, interacted poorly with further
scans, which then ignored any lower numbers, even if they
were new.

Signed-off-by: Edward Z. Yang <ezyang@mit.edu>
5 years agoIf 'To' field of many-recipient message is us, replace with the first 'CC'.
Edward Z. Yang [Mon, 3 Sep 2012 18:43:11 +0000 (14:43 -0400)]
If 'To' field of many-recipient message is us, replace with the first 'CC'.

This results in better 'Reply-all' behavior when you reply to a message
you sent (as a follow up).

Signed-off-by: Edward Z. Yang <ezyang@mit.edu>
5 years agoAdd compose-from hook.
Edward Z. Yang [Tue, 28 Aug 2012 23:47:47 +0000 (19:47 -0400)]
Add compose-from hook.

Signed-off-by: Edward Z. Yang <ezyang@mit.edu>
5 years agoMerge remote-tracking branch 'origin/master' into temp
Edward Z. Yang [Thu, 12 Jul 2012 03:30:22 +0000 (23:30 -0400)]
Merge remote-tracking branch 'origin/master' into temp

Conflicts:
lib/sup.rb

6 years agoUse old 'syck' module for YAML parsing
Gaute Hope [Wed, 9 Nov 2011 19:43:49 +0000 (20:43 +0100)]
Use old 'syck' module for YAML parsing

6 years agoFix attachment off-by-one line selection in edit-message-mode
Gaute Hope [Sun, 25 Sep 2011 13:50:03 +0000 (15:50 +0200)]
Fix attachment off-by-one line selection in edit-message-mode

Signed-off-by: Hamish Downer <dmishd@gmail.com>
6 years agoAllows toggling 'killed' status of a thread
Hamish Downer [Mon, 20 Jun 2011 22:58:01 +0000 (23:58 +0100)]
Allows toggling 'killed' status of a thread

UpdateManager didn't seem responsive to 'killed'/'unkilled' so uses 'labeled'.

Patch actually written by Evan Hanson vnhnsn at gmail dot comma

6 years agoAlways try to canonize person using ContactManager
Tero Tilus [Mon, 24 Jan 2011 23:12:30 +0000 (01:12 +0200)]
Always try to canonize person using ContactManager

Signed-off-by: Tero Tilus <tero@tilus.net>
Signed-off-by: Hamish Downer <dmishd@gmail.com>
6 years agoHookify Time#to_nice_s
Tero Tilus [Tue, 21 Dec 2010 22:55:31 +0000 (00:55 +0200)]
Hookify Time#to_nice_s

Signed-off-by: Tero Tilus <tero@tilus.net>
Signed-off-by: Hamish Downer <dmishd@gmail.com>
6 years agoBugfix: Un-escape slashes when initializing a new Person
Michael Stapelberg [Mon, 24 Jan 2011 18:18:57 +0000 (19:18 +0100)]
Bugfix: Un-escape slashes when initializing a new Person

In Person#full_address, we add slashes by using @name.inspect, so we need to
take care of them here.

Signed-off-by: Hamish Downer <dmishd@gmail.com>
6 years agoresolve merge conflict from archive_sent branch
Hamish Downer [Sun, 19 Jun 2011 23:27:52 +0000 (00:27 +0100)]
resolve merge conflict from archive_sent branch

6 years agoadd option - should sent mail be archived?
Hamish Downer [Sun, 19 Jun 2011 23:07:16 +0000 (00:07 +0100)]
add option - should sent mail be archived?

6 years agoEnsure default options are set
Hamish Downer [Sun, 19 Jun 2011 22:59:14 +0000 (23:59 +0100)]
Ensure default options are set

When a new option is added (previous to this commit) then if it is not
in your config.yaml it would default to false, as sup would just load
your config file and not then check default values.

Now the default values (apart from accounts) are set and are merged with
the values from your file (with the file taking precedence of course). So
any new values added will have the intended default.

6 years agoBe more cautious about invalid content-type headers
Gaudenz Steinlin [Thu, 17 Feb 2011 14:36:27 +0000 (15:36 +0100)]
Be more cautious about invalid content-type headers

The original RMail code calls value.strip.split(/\s*;\s*/)[0].downcase
without checking if split returned an element. This monkey patches the
relevant function for sup to catch this error.

Signed-off-by: Hamish Downer <dmishd@gmail.com>
6 years agoresolved merge conflict
Hamish Downer [Sun, 19 Jun 2011 21:36:41 +0000 (22:36 +0100)]
resolved merge conflict

6 years agoOnly use account selector if more than one email address available
Hamish Downer [Sun, 19 Jun 2011 21:26:11 +0000 (22:26 +0100)]
Only use account selector if more than one email address available

6 years agoMerge branch 'github_patches' into next
Hamish Downer [Thu, 2 Jun 2011 20:00:30 +0000 (21:00 +0100)]
Merge branch 'github_patches' into next

6 years agoRecover if a draft message is deleted from the filesystem. (issue 61)
Peter Harkins [Fri, 5 Feb 2010 17:13:51 +0000 (11:13 -0600)]
Recover if a draft message is deleted from the filesystem. (issue 61)

Signed-off-by: Hamish Downer <dmishd@gmail.com>
6 years agoFix typo that prevented setting sources correctly.
Matthias Vallentin [Sun, 26 Dec 2010 17:16:56 +0000 (09:16 -0800)]
Fix typo that prevented setting sources correctly.

This commit fixes a typo in SentManager.source= that prevented setting
@source_uri correctly.

Signed-off-by: Hamish Downer <dmishd@gmail.com>
6 years agoChange account_selector so it works with alternate email addresses.
Hamish Downer [Mon, 30 May 2011 17:21:07 +0000 (18:21 +0100)]
Change account_selector so it works with alternate email addresses.

6 years agoedit-message-mode: Add an optional account selector
Damien Leone [Sun, 27 Feb 2011 18:05:35 +0000 (19:05 +0100)]
edit-message-mode: Add an optional account selector

Set to true by default, it allows you to change your account in
edit-mode using a horizontal selector. It doesn't change any of the
previous behaviour since the proper account is selected by default, it
also handles customized choice in case the user edited the From field
manually.

Signed-off-by: Hamish Downer <dmishd@gmail.com>
6 years agoAdded hook to run in async edit mode.
Hamish Downer [Sun, 3 Apr 2011 21:29:04 +0000 (22:29 +0100)]
Added hook to run in async edit mode.

The hook should not block - so it should use fork() or some such.
For now, you still have to exit the async mode manually.

6 years agoMerge branch 'wrap_quoted' into next
Hamish Downer [Sun, 29 May 2011 17:06:09 +0000 (18:06 +0100)]
Merge branch 'wrap_quoted' into next

7 years agoWrap quoted text according to wrap preferences
Robin Burchell [Thu, 2 Sep 2010 20:49:24 +0000 (13:49 -0700)]
Wrap quoted text according to wrap preferences

    Wrap quoted text according to wrap preferences

    Wrap expanded sections of quoted text at a column boundary, just like
    sup already does for unquoted text. I split the existing wrapper code
    into a utility function.

Signed-off-by: Hamish Downer <dmishd@gmail.com>
7 years agoMark thread as read after ThreadViewMode has been instancied
Damien Leone [Sat, 12 Jun 2010 09:21:39 +0000 (11:21 +0200)]
Mark thread as read after ThreadViewMode has been instancied

This patch delays the moment when the ":unread" label is removed so when
opening a thread you know exactly what are the new messages thanks to
the 'N' flag.

7 years agoAdd an option to disable automatic threads loading when scrolling down for slow CPUs
Damien Leone [Sun, 27 Feb 2011 16:35:59 +0000 (17:35 +0100)]
Add an option to disable automatic threads loading when scrolling down for slow CPUs

7 years agoAvoid O(n^2) complexity for maildir deduplication.
Edward Z. Yang [Thu, 20 Jan 2011 22:44:13 +0000 (17:44 -0500)]
Avoid O(n^2) complexity for maildir deduplication.

Signed-off-by: Edward Z. Yang <ezyang@mit.edu>
7 years agoStop warning message about @async_mode
Hamish Downer [Wed, 2 Mar 2011 00:05:17 +0000 (00:05 +0000)]
Stop warning message about @async_mode

7 years agoMerge branch 'async_message_edit' into next
Hamish Downer [Sat, 26 Feb 2011 19:18:00 +0000 (19:18 +0000)]
Merge branch 'async_message_edit' into next

7 years agoCheck whether the "sync_back_to_maildir" option has been changed from false to true...
Damien Leone [Sat, 26 Feb 2011 17:02:49 +0000 (18:02 +0100)]
Check whether the "sync_back_to_maildir" option has been changed from false to true suggest the user to run sup-sync-back-to-maildir before continuing if needed

The check occurs when starting the Redwood module so it affects every
executables loading it since some of them can modify the index (sup,
sup-sync, etc.).

There is a new parameter called "bypass_sync_check" to the
Redwood::start method to bypass this check, it is useful for scripts
such as sup-sync-back-to-maildir itself!

It works by checking the presence of a flag file in the configuration
directory. The file is written when the synchronization is performed
and deleted when the "sync_back_to_maildir" option is set to false.

7 years agosup-sync-back-maildir: fix a typo
Damien Leone [Sat, 26 Feb 2011 16:45:19 +0000 (17:45 +0100)]
sup-sync-back-maildir: fix a typo

7 years agosup-sync-back-maildir: merging is now optional
Damien Leone [Sat, 26 Feb 2011 16:12:40 +0000 (17:12 +0100)]
sup-sync-back-maildir: merging is now optional

7 years agosup-sync-back-maildir: add documentation, comments and fix typos
Damien Leone [Sat, 26 Feb 2011 16:12:08 +0000 (17:12 +0100)]
sup-sync-back-maildir: add documentation, comments and fix typos

7 years agoAdd support for merging Maildir flags to Xapian entries, add a merge feature to sup...
Damien Leone [Sat, 26 Feb 2011 16:11:01 +0000 (17:11 +0100)]
Add support for merging Maildir flags to Xapian entries, add a merge feature to sup-sync-back-maildir

7 years agosup-sync-back-maildir: set default choice to "yes" when asked for synchronization
Damien Leone [Sat, 26 Feb 2011 15:40:02 +0000 (16:40 +0100)]
sup-sync-back-maildir: set default choice to "yes" when asked for synchronization

7 years agopoll: Properly refresh thread-index-mode when a message has changed its source location
Damien Leone [Sun, 20 Feb 2011 12:49:26 +0000 (13:49 +0100)]
poll: Properly refresh thread-index-mode when a message has changed its source location

There are two cases when a message is detected as "updated", whether
its flags has changed or its location pathname has changed, eg. when
sending a message sup generates a Maildir pathname that is then
modified by offlineimap. It would be detected as deleting a message
and adding another one although it concern the same message, in that
case locations should be updated and its thread-index-mode entry
should be refreshed.

7 years agoShorten confirm discard messages
Hamish Downer [Tue, 22 Feb 2011 17:22:14 +0000 (17:22 +0000)]
Shorten confirm discard messages

The messages to confirm discard no longer include the name of the
file being edited. It is still visible on screen, so it is a bit
redundant, and with the file name, the question is too long to fit
on an 80 character terminal.

7 years agoasync edit mode: clean up
Hamish Downer [Tue, 22 Feb 2011 17:14:30 +0000 (17:14 +0000)]
async edit mode: clean up

Some minor clean up to remove bits that were added during development,
remove extraneous whitespace and improve code style slightly.

7 years agoMerge branch 'ctrl_w' into next
Hamish Downer [Tue, 22 Feb 2011 16:57:35 +0000 (16:57 +0000)]
Merge branch 'ctrl_w' into next

7 years agoctrl-w: rename and neaten up private method
Hamish Downer [Tue, 22 Feb 2011 16:57:12 +0000 (16:57 +0000)]
ctrl-w: rename and neaten up private method

7 years agoFix behaviour of Ctrl-W
Hamish Downer [Mon, 21 Feb 2011 01:13:12 +0000 (01:13 +0000)]
Fix behaviour of Ctrl-W

Ctrl-W will now delete trailing spaces, rather than having to press
Ctrl-W twice to delete each label.

7 years agoremoved extraneous end from crypto.rb
Hamish Downer [Sun, 20 Feb 2011 23:31:36 +0000 (23:31 +0000)]
removed extraneous end from crypto.rb

7 years agoresolved conflict after merge of order_labels
Hamish Downer [Sun, 20 Feb 2011 23:25:18 +0000 (23:25 +0000)]
resolved conflict after merge of order_labels

7 years agoWhen editing labels, they are presented in alphabetical order
Hamish Downer [Sun, 20 Feb 2011 23:22:05 +0000 (23:22 +0000)]
When editing labels, they are presented in alphabetical order

7 years agoOrder labels alphabetically in thread index mode
Hamish Downer [Sun, 20 Feb 2011 22:57:47 +0000 (22:57 +0000)]
Order labels alphabetically in thread index mode

7 years agoasync mode: ask for confirmation if file is being edited
Hamish Downer [Sun, 20 Feb 2011 22:09:44 +0000 (22:09 +0000)]
async mode: ask for confirmation if file is being edited

7 years agoAsync mode: added method to copy file path to clipboard
Hamish Downer [Sun, 20 Feb 2011 21:51:45 +0000 (21:51 +0000)]
Async mode: added method to copy file path to clipboard

7 years agoProper killable? handling for async edit mode
Hamish Downer [Sun, 20 Feb 2011 21:34:01 +0000 (21:34 +0000)]
Proper killable? handling for async edit mode

7 years agocheck for common editor lock files when exiting async mode
Hamish Downer [Sun, 20 Feb 2011 20:59:44 +0000 (20:59 +0000)]
check for common editor lock files when exiting async mode

7 years agoedit mode will get focus when async mode exits
Hamish Downer [Sun, 20 Feb 2011 20:59:05 +0000 (20:59 +0000)]
edit mode will get focus when async mode exits

7 years agoMerge branch 'gpgme' into next
Hamish Downer [Sun, 20 Feb 2011 19:51:55 +0000 (19:51 +0000)]
Merge branch 'gpgme' into next

Resolved Conflicts:
lib/sup/crypto.rb

7 years agochange extra error checking to use unified error message code
Hamish Downer [Sun, 20 Feb 2011 19:38:39 +0000 (19:38 +0000)]
change extra error checking to use unified error message code

7 years agoCheck for valid signature before signature.to_s
Gaudenz Steinlin [Thu, 17 Feb 2011 14:26:41 +0000 (15:26 +0100)]
Check for valid signature before signature.to_s

In some circumstances with broken signatures signature.to_s returns nil.
Check for a valid signature before relying on this string. This avoids
an uncaught exception.

Signed-off-by: Hamish Downer <dmishd@gmail.com>
7 years agoCheck for ArgumentError on signature verification
Gaudenz Steinlin [Thu, 17 Feb 2011 14:13:31 +0000 (15:13 +0100)]
Check for ArgumentError on signature verification

Broken signatures can cause a NULL pointer which results in an
ArguementError when calling ctx.verify_result even if the previous call
to ctx.verify does not raise an exception.

The underling cause is probably a bug in GPGME.

Signed-off-by: Hamish Downer <dmishd@gmail.com>
7 years agoUnify formatting of GPGME error messages
Gaudenz Steinlin [Thu, 17 Feb 2011 14:09:23 +0000 (15:09 +0100)]
Unify formatting of GPGME error messages

Create a private function to turn a an exception into a "human friendly"
error message and to add a entry to the logfile. Use this function for
all error paths.

Signed-off-by: Hamish Downer <dmishd@gmail.com>
7 years agomaildir: fix progress computation for updated messages
Damien Leone [Sat, 19 Feb 2011 17:12:04 +0000 (18:12 +0100)]
maildir: fix progress computation for updated messages

7 years agomaildir: fix source pathname after having rebased from master
Damien Leone [Sat, 19 Feb 2011 16:30:29 +0000 (17:30 +0100)]
maildir: fix source pathname after having rebased from master

7 years agoPreserve unrecognized maildir flags when syncing back.
James Taylor [Wed, 11 Aug 2010 16:59:59 +0000 (16:59 +0000)]
Preserve unrecognized maildir flags when syncing back.

7 years agomessage: fix a typo
Damien Leone [Mon, 12 Jul 2010 09:30:43 +0000 (11:30 +0200)]
message: fix a typo

7 years agomessage: rewrite the sync_back method
Damien Leone [Fri, 9 Jul 2010 21:25:21 +0000 (23:25 +0200)]
message: rewrite the sync_back method

I noticed that a sent message can have multiples locations and when
you change its labels only one location is updated (because of the
"location" method). It now synchronizes the message to all its
locations.

7 years agopoll: consider all messages when searching for one in the "delete" case
Damien Leone [Fri, 9 Jul 2010 15:23:58 +0000 (17:23 +0200)]
poll: consider all messages when searching for one in the "delete" case

7 years agoCheck that a message has a location before trying to sync it
Damien Leone [Fri, 9 Jul 2010 11:00:13 +0000 (13:00 +0200)]
Check that a message has a location before trying to sync it

7 years agoAdd sup-sync-back-maildir, a script that will sync all your Maildir sources from...
Damien Leone [Mon, 28 Jun 2010 15:47:57 +0000 (17:47 +0200)]
Add sup-sync-back-maildir, a script that will sync all your Maildir sources from sup to Maildir

7 years agoAdd Source#supported_labels? method and improve flash message when polled
Damien Leone [Mon, 28 Jun 2010 10:21:58 +0000 (12:21 +0200)]
Add Source#supported_labels? method and improve flash message when polled

7 years agoSynchronize local modifications back to a Maildir source
Damien Leone [Sun, 27 Jun 2010 22:00:11 +0000 (00:00 +0200)]
Synchronize local modifications back to a Maildir source

Add the "sync_back_to_maildir" option which is false by default. It
works by updating a mail's filename according to the its current
labels in sup.

This commit also adds the :forwarded and :replied hidden reserved
labels to bring a better Maildir support according to [0]. These
labels are automatically added when replying, forwarding or bouncing a
message.

Keep in mind that deleting a mail in sup will set its 'T' Maildir flag
and might be deleted from the disk by software such as offlineimap.

Only messages that have been modified after having applied this commit
will be synchronized.

[0] http://cr.yp.to/proto/maildir.html

7 years agothread-index-mode: fix wrong method call
Damien Leone [Fri, 25 Jun 2010 18:59:50 +0000 (20:59 +0200)]
thread-index-mode: fix wrong method call

7 years agoindex: add comments
Damien Leone [Fri, 25 Jun 2010 16:39:46 +0000 (18:39 +0200)]
index: add comments

7 years agoSynchronize remote modifications from a Maildir source to sup
Damien Leone [Fri, 25 Jun 2010 16:17:08 +0000 (18:17 +0200)]
Synchronize remote modifications from a Maildir source to sup

It is now possible to use multiple clients to handle Maildirs (and
IMAP server if you use offlineimap).

It works by using files' ctime instead of mtime when polling so we can
detect if the mail's flags have changed. Maildir#poll now appends
"subdir/ids" in the added and deleted arrays at each loop instead of
recreating them. Arrays are then compared to each other allowing us to
see if a mail has been updated or moved (from "cur/" to "new/" for
instance, this is what offlineimap does when you mark a read mail as
unread on an IMAP server).

The index is then updated and the display is refreshed. When a mail is
deleted it is now *really* deleted from xapian. Before, only its
location was removed but the mail could still be visible in search
results although we could'nt load its content ("An error occurred
while loading this message").

Beware that sup does NOT synchronize its modifications to the source.

7 years agodebug statements, better message in async mode
Hamish Downer [Wed, 16 Feb 2011 00:15:14 +0000 (00:15 +0000)]
debug statements, better message in async mode

7 years agohidden buffer will not appear in rollable buffers list
Hamish Downer [Wed, 16 Feb 2011 00:14:15 +0000 (00:14 +0000)]
hidden buffer will not appear in rollable buffers list

7 years agoAsync edit mode sort-of works
Hamish Downer [Tue, 15 Feb 2011 23:17:39 +0000 (23:17 +0000)]
Async edit mode sort-of works

You can edit a message in an external editor, and then go back to sup
and have your changes picked up by the edit-mode, but the buffer
management still leaves something to be desired.

7 years agoresolved conflicts
Hamish Downer [Tue, 15 Feb 2011 21:38:12 +0000 (21:38 +0000)]
resolved conflicts

7 years agomore baby steps towards async mode
Hamish Downer [Tue, 15 Feb 2011 21:16:35 +0000 (21:16 +0000)]
more baby steps towards async mode

7 years agostarted work on edit-message-async-mode
Hamish Downer [Fri, 11 Feb 2011 00:24:08 +0000 (00:24 +0000)]
started work on edit-message-async-mode

7 years agoAllow buffers to be hidden
Hamish Downer [Tue, 15 Feb 2011 21:29:12 +0000 (21:29 +0000)]
Allow buffers to be hidden

This allows buffers to be hidden, at which point they will not
appear in the rollable buffers, or in the buffer list mode.

7 years agoalso re-run crypto-selector after editing field
Hamish Downer [Fri, 11 Feb 2011 00:27:22 +0000 (00:27 +0000)]
also re-run crypto-selector after editing field

7 years agostarted work on edit-message-async-mode
Hamish Downer [Fri, 11 Feb 2011 00:24:08 +0000 (00:24 +0000)]
started work on edit-message-async-mode

7 years agofixed type in gpg checking code
Hamish Downer [Thu, 10 Feb 2011 23:19:29 +0000 (23:19 +0000)]
fixed type in gpg checking code

7 years agofixed type in gpg checking code
Hamish Downer [Thu, 10 Feb 2011 23:19:29 +0000 (23:19 +0000)]
fixed type in gpg checking code

7 years agoimproved crypto start up checks
Hamish Downer [Thu, 10 Feb 2011 23:01:42 +0000 (23:01 +0000)]
improved crypto start up checks

7 years agoimproved crypto start up checks
Hamish Downer [Thu, 10 Feb 2011 23:01:42 +0000 (23:01 +0000)]
improved crypto start up checks

7 years agofix silly mistakes
Hamish Downer [Thu, 10 Feb 2011 00:41:14 +0000 (00:41 +0000)]
fix silly mistakes

7 years agoBetter gpg error checking.
Hamish Downer [Thu, 10 Feb 2011 00:47:58 +0000 (00:47 +0000)]
Better gpg error checking.

The crypto initialize code now checks for a number of common reasons
for GPG not working, all related to the gpg-agent side of things. It
will then give a reasonably friendly error message, helping diagnose
why GPG is not working for you.

In particular it will check whether the environment variable is set,
whether the environment variable points to a file, and whether that
file is a socket.

7 years agofix silly mistakes
Hamish Downer [Thu, 10 Feb 2011 00:41:14 +0000 (00:41 +0000)]
fix silly mistakes