Re: [sup-devel] [PATCH] change default default_attachment_save_dir

2009-12-20 Thread Edward Z. Yang
Excerpts from David Riebenbauer's message of Sun Dec 20 12:06:11 -0500 2009: > Just a trivial change I had sitting around here for way to long. +1 This should have been fixed a long time ago. Edward ___ Sup-devel mailing list Sup-devel@rubyforge.org ht

Re: [sup-devel] What's your workflow?

2009-12-29 Thread Edward Z. Yang
Excerpts from Tero Tilus's message of Tue Dec 29 14:34:33 -0500 2009: > I'm still a bit newbie with git. I'd like to hear how do you folks > develop/use sup. What's your workflow? Do you run master, next or > some own branch? If own, where do you fork and how do you track > upstream and your ow

Re: [sup-devel] [PATCH] xapian: translate from/to query term prefixes to search over both name and email fields

2010-01-05 Thread Edward Z. Yang
At last! Good patch. Cheers, Edward ___ Sup-devel mailing list Sup-devel@rubyforge.org http://rubyforge.org/mailman/listinfo/sup-devel

Re: [sup-devel] [PATCH] new hook: compose-from

2010-03-09 Thread Edward Z. Yang
Excerpts from Michael Stapelberg's message of Tue Mar 09 12:54:18 -0500 2010: > This hook is useful to use different names/addresses depending on the > destination address, subject, etc. of the message. Example: > > if header["To"] and header["To"] =~ /^sup-(.*)@rubyforge\.org$/ > Person.fro

[sup-devel] Mysterious nil errors

2010-03-09 Thread Edward Z. Yang
Here are some patches that correct some mysterious Nil errors. I don't know what messages caused them or if they're correct. I don't really want them to go in, but I would like to know further directions. diff --git a/lib/sup/message.rb b/lib/sup/message.rb index ebc73fc..ec12039 100644 --- a/li

Re: [sup-devel] Mysterious nil errors

2010-03-09 Thread Edward Z. Yang
Actually, I know precisely where this is from: Content-Type: Content-Disposition: inline Content-Transfer-Encoding: base64 RT-Attachment: 1176783/16113169/7868621 Which translates into an empty string and thus the following trace: --- NoMethodError from thread: poll after loading inbox undefine

Re: [sup-devel] Mysterious nil errors

2010-03-10 Thread Edward Z. Yang
Excerpts from Rich Lane's message of Wed Mar 10 12:24:12 -0500 2010: > Excerpts from Edward Z. Yang's message of 2010-03-09 23:50:23 -0500: > > -content_type = (m.header.content_type || > > "application/unknown").downcase # sometimes RubyMail gives us nil > > +content_type = (m.hea

Re: [sup-devel] Mysterious nil errors

2010-03-10 Thread Edward Z. Yang
Excerpts from Rich Lane's message of Wed Mar 10 12:59:48 -0500 2010: > If header['content-type'] == "" then it counts as true in ruby. Maybe > you wanted to check empty? instead? This is an rmail bug, so I think > instead of adding workarounds to our code we should monkeypatch rmail to > fix it. H

Re: [sup-devel] Adding backward synchronization for Maildir sources

2010-07-09 Thread Edward Z. Yang
Hey Damien, This is great! A few quick questions for you: 1. Suppose we decide to test your branch, and run into some show-stopper bugs. What’s the procedure for backing out changes? 2. What precisely are the semantics for handling Sup labels? Thanks, Edward Excerpts from Damien Leone's m

Re: [sup-devel] Adding backward synchronization for Maildir sources

2010-07-09 Thread Edward Z. Yang
Excerpts from Damien Leone's message of Fri Jul 09 13:14:58 -0400 2010: > > 1. Suppose we decide to test your branch, and run into some show-stopper > >bugs. What’s the procedure for backing out changes? > > You should backup your Maildir directories and your xapian index, this > is what I di

[sup-devel] [PATCH] Return nothing between if end index is not found.

2010-07-18 Thread Edward Z. Yang
This patch fixed Nil error that occurred when I had a GPG signed mail with a starting marker but no ending marker. >From 22d12ffe7caa0d11c91876e2c8c7806854d0b3ab Mon Sep 17 00:00:00 2001 From: Edward Z. Yang Date: Sun, 18 Jul 2010 03:38:52 -0400 Subject: [PATCH] Return nothing between if

Re: [sup-devel] Adding backward synchronization for Maildir sources

2010-07-18 Thread Edward Z. Yang
Sup Damien, I cut over to your branch, plus one patch of my own making. THE GOOD NEWS It works! Whereby, messages are marked read in my webmail client and deleted messages go away. THE BAD NEWS It makes Sup very crashy and there's some strange behavior. This is probably the sixth time I'm co

Re: [sup-devel] Adding backward synchronization for Maildir sources

2010-07-18 Thread Edward Z. Yang
Here is one trace that I managed to scrounge up undefined method `content_width' for nil:NilClass /home/ezyang/Dev/sup/lib/sup/modes/thread-index-mode.rb:953:in `from_width' /home/ezyang/Dev/sup/lib/sup/modes/thread-index-mode.rb:870:in `text_for_thread_at' /home/ezyang/Dev/sup/lib/sup/hook.rb:55

Re: [sup-devel] Adding backward synchronization for Maildir sources

2010-07-18 Thread Edward Z. Yang
Here are some suggestions... Excerpts from Damien Leone's message of Fri Jul 09 12:44:01 -0400 2010: > - I wrote a "sup-sync-back-maildir" script that will synchronize all > messages from your sources at once. This should be executed the first > time BEFORE any polling, otherwise your IMAP server

Re: [sup-devel] Adding backward synchronization for Maildir sources

2010-07-20 Thread Edward Z. Yang
Excerpts from Damien Leone's message of Tue Jul 20 05:39:41 -0400 2010: > Excerpts from Edward Z. Yang's message of Mon Jul 19 00:46:33 +0200 2010: > > It makes Sup very crashy and there's some strange behavior. This is > > probably > > the sixth time I'm composing this message (yeah, haven't lea

Re: [sup-devel] Adding backward synchronization for Maildir sources

2010-07-25 Thread Edward Z. Yang
Excerpts from Rich Lane's message of Sat Jul 24 17:30:16 -0400 2010: > I've rebased this against master and merged it to branch maildir-sync in > the official repo. This is a big change, so help with testing and code > review would be much appreciated. Hi Rich, I've moved my Sup checkout onto thi

Re: [sup-devel] [PATCH] Return nothing between if end index is not found.

2010-08-15 Thread Edward Z. Yang
Excerpts from Michael Stapelberg's message of Tue Jul 20 16:09:39 -0400 2010: > I was wrong. I just opened an email and it was no longer verified (it is > GPG-signed). I will post an updated patch soon. Hi Michael, I was hoping to get a copy of the email that broke for you, but it never found its

Re: [sup-devel] [PATCH] Return nothing between if end index is not found.

2010-08-15 Thread Edward Z. Yang
Excerpts from Michael Stapelberg's message of Sun Aug 15 21:19:35 -0400 2010: > Just did so. Message-ID is <1281921493-sup-9...@midna.zekjur.net>. What's the subject line? Edward ___ Sup-devel mailing list Sup-devel@rubyforge.org http://rubyforge.org/ma

Re: [sup-devel] [PATCH] Return nothing between if end index is not found.

2010-08-16 Thread Edward Z. Yang
Excerpts from Michael Stapelberg's message of Mon Aug 16 13:22:26 -0400 2010: > Hi Edward, > > Excerpts from Edward Z. Yang's message of 2010-08-16 03:40:33 +0200: > > What's the subject line? > The subject line is: > "Fwd: Fwd: Re: [RaumZeitLabor] Portalroboter kostenlos bei Selbstabholung - > I

Re: [sup-devel] [PATCH] Return nothing between if end index is not found.

2010-09-09 Thread Edward Z. Yang
Excerpts from Michael Stapelberg's message of Tue Aug 17 18:46:32 -0400 2010: > Interesting. I gzipped it (to make sure it does not get touched in any way on > its way to you) and attached it to this mail. I finally got around to looking at your message, and as expected, it appears that there is n

Re: [sup-devel] [PATCH] Fixed inline gpg crash when the end marker is missing

2010-09-11 Thread Edward Z. Yang
Excerpts from Michael Hamann's message of Sat Sep 04 17:51:46 -0400 2010: > lines.between() does not check if the end marker actually exists, but > later it is assumed the marker exists. This change introduces a check > for the end marker and doesn't decrypt messages in which the end marker > is mi

Re: [sup-devel] [PATCH] fix handling of multiple label: terms in search

2010-09-29 Thread Edward Z. Yang
Excerpts from Sascha Silbe's message of Wed Sep 29 10:16:02 -0400 2010: > By default Xapian will join query terms with the same prefix with OR instead > of AND, so searching for multiple labels doesn't return the expected results. > By making use of a parameter to add_boolean_prefix (added in Xapia

[sup-devel] Exception

2010-09-30 Thread Edward Z. Yang
I got the following exception /home/ezyang/Dev/sup/lib/sup/index.rb:537:in `find_docid' /home/ezyang/Dev/sup/lib/sup/index.rb:542:in `find_doc' /home/ezyang/Dev/sup/lib/sup/index.rb:552:in `get_entry' /home/ezyang/Dev/sup/lib/sup/index.rb:195:in `build_message' /usr/lib/ruby/1.8/monitor.rb:242:in

Re: [sup-devel] Exception

2010-10-01 Thread Edward Z. Yang
Excerpts from Michael Stipicevic's message of Fri Oct 01 00:52:18 -0400 2010: > Did this happen right after you sent a message? I had to fix this by doing a > dump and rebuilding the index. Yep. Ouch! Although, I suppose there are worse things in life :-) Cheers, Edward __

[sup-devel] Strange maildir/OfflineImap/maildir-sync behavior

2011-01-19 Thread Edward Z. Yang
One day, I opened up an old thread to reread an email, and much to my dismay, it was GONE! Instead, there was one of those little red flags that Sup sticks on mail that is referenced by other threads, but which you don't have a copy of. This was a bit bothersome, because no one likes it when thei

Re: [sup-devel] Strange maildir/OfflineImap/maildir-sync behavior

2011-01-19 Thread Edward Z. Yang
Oh, I know the behavior you're talking about; it's distinct from the behavior I'm seeing. What you've mentioned is some curious synchronization bug where if a new, unread message is available on two buffers (for example, you used 'U'), and you read it from one buffer, it becomes broken on the othe

Re: [sup-devel] Strange maildir/OfflineImap/maildir-sync behavior

2011-01-19 Thread Edward Z. Yang
Ok, I think this behavior is due to an OfflineIMAP bug, or at least some infelicity. I think I have squashed it by telling OfflineIMAP to never ever ever delete files in my Maildir (and also never upload files from the Maildir to IMAP account: I only want status changes and deletions to propagate,

[sup-devel] [PATCH] Avoid O(n^2) complexity for maildir deduplication.

2011-01-19 Thread Edward Z. Yang
Signed-off-by: Edward Z. Yang --- lib/sup/maildir.rb |9 ++--- 1 files changed, 6 insertions(+), 3 deletions(-) diff --git a/lib/sup/maildir.rb b/lib/sup/maildir.rb index ba8efed..0898c91 100644 --- a/lib/sup/maildir.rb +++ b/lib/sup/maildir.rb @@ -128,14 +128,17 @@ class Maildir

Re: [sup-devel] Strange maildir/OfflineImap/maildir-sync behavior

2011-01-20 Thread Edward Z. Yang
I have a theory for why this occurs: when we mark mail read on maildir, it gets moved from new to cur, IIRC? So if Sup's state doesn't get adequately updated, an old buffer could try to look at the old location. This should be easily verifiable by looking at the console messages. Edward __

[sup-devel] [PATCH] Avoid O(n^2) complexity for maildir deduplication.

2011-01-20 Thread Edward Z. Yang
Signed-off-by: Edward Z. Yang --- lib/sup/maildir.rb |8 +--- 1 files changed, 5 insertions(+), 3 deletions(-) diff --git a/lib/sup/maildir.rb b/lib/sup/maildir.rb index ba8efed..bc30baa 100644 --- a/lib/sup/maildir.rb +++ b/lib/sup/maildir.rb @@ -128,14 +128,16 @@ class Maildir

[sup-devel] Maildir synchronizing other labels

2012-08-21 Thread Edward Z. Yang
I think it would be nice if we at least support the :inbox label, so that we can keep our inboxes tidy and our OfflineIMAP sync times down. Proposed implementation strategy: - Define a label/source mapping, as well as a default source for unrecognized labels and an ordering on labels if

[sup-devel] inotify support for Maildir mailboxes

2012-08-21 Thread Edward Z. Yang
I'm planning on adding inotify support for Maildir mailboxes. This would mean we no longer need to 'poll' to find new messages; they show up instantly. Let me know if you're interested and willing to help test. Cheers, Edward ___ Sup-devel mailing list

[sup-devel] [PATCH] Sync and update other threads when Maildir sync-back changes location.

2012-08-21 Thread Edward Z. Yang
From: "Edward Z. Yang" Signed-off-by: Edward Z. Yang --- lib/sup/maildir.rb | 2 +- lib/sup/message.rb | 6 +- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/lib/sup/maildir.rb b/lib/sup/maildir.rb index 0c8c563..050cfaf 100644 --- a/lib/sup/maildir.rb +++

Re: [sup-devel] [PATCH] Sync and update other threads when Maildir sync-back changes location.

2012-08-21 Thread Edward Z. Yang
tion per message. commit ca5b02b8ff88412f92984d6b9176ff1876886cc6 Author: Edward Z. Yang Date: Tue Aug 21 15:19:11 2012 -0400 Sync and update other threads when Maildir sync-back changes location. Signed-off-by: Edward Z. Yang diff --git a/lib/sup/maildir.rb b/lib/sup/maildir.rb index 0c8c563..050

Re: [sup-devel] [PATCH] Sync and update other threads when Maildir sync-back changes location.

2012-08-21 Thread Edward Z. Yang
Aaand here's an even prettier version. commit f7d30410d946418a885929f20a498c10e4058243 Author: Edward Z. Yang Date: Tue Aug 21 15:19:11 2012 -0400 Sync and update other threads when Maildir sync-back changes location. Signed-off-by: Edward Z. Yang diff --git a/li

[sup-devel] [PATCH] Implement moving message between Maildir sources based on label.

2012-08-21 Thread Edward Z. Yang
From: "Edward Z. Yang" Signed-off-by: Edward Z. Yang --- lib/sup/maildir.rb | 28 ++-- lib/sup/message.rb | 9 +++-- 2 files changed, 29 insertions(+), 8 deletions(-) diff --git a/lib/sup/maildir.rb b/lib/sup/maildir.rb index 95305c2..ff8da23 100644 ---

Re: [sup-devel] [PATCH] Implement moving message between Maildir sources based on label.

2012-08-21 Thread Edward Z. Yang
of quota too. If you arrange to delete everything from INBOX first, and then sync Archive, it will probably just spend a lot of time uploading. Excerpts from Edward Z. Yang's message of Wed Aug 22 01:45:31 -0400 2012: > From: "Edward Z. Yang" > >

Re: [sup-devel] [PATCH] Implement moving message between Maildir sources based on label.

2012-08-22 Thread Edward Z. Yang
Here is an improved version that handles the thread/message distinction better; previously, if you archived something, it's possible only some of the messages got moved if you hadn't run sup-sync-back-maildir. commit a25c345c15c8859a041cc9dc13090d7b8feb3d58 Author: Edward Z. Yang Date:

Re: [sup-devel] [PATCH] Implement moving message between Maildir sources based on label.

2012-08-23 Thread Edward Z. Yang
gt; Here is an improved version that handles the thread/message distinction > better; previously, if you archived something, it's possible only some of > the messages got moved if you hadn't run sup-sync-back-maildir. > > commit a25c345c15c8859a041cc9dc13090d7b8feb3d58 &g

Re: [sup-devel] [PATCH] Implement moving message between Maildir sources based on label.

2012-08-23 Thread Edward Z. Yang
Yes. The current plan is to snoop the message ID of newly added messages in maildirs, and do moved message detection based on that. If you have a better idea I'm all ears. (Another possibility is to add sha1sum to the index and compare that.) Also note that it won't destroy the labels *unless you

Re: [sup-devel] [PATCH] Implement moving message between Maildir sources based on label.

2012-08-23 Thread Edward Z. Yang
With pleasure, I report that Sup is actually doing this! So solving the "hooks run too many times" is as easy as this: commit ec3afe7ac01741bc67f68009193d2d2e73f05529 Author: Edward Z. Yang Date: Thu Aug 23 14:19:24 2012 -0400 Don't run before-add-message hook for mess

[sup-devel] [PATCH] Handle drafts with high ID numbers.

2012-08-28 Thread Edward Z. Yang
From: "Edward Z. Yang" Signed-off-by: Edward Z. Yang --- lib/sup/draft.rb | 16 +++- 1 file changed, 7 insertions(+), 9 deletions(-) diff --git a/lib/sup/draft.rb b/lib/sup/draft.rb index 58c45db..1f33dc1 100644 --- a/lib/sup/draft.rb +++ b/lib/sup/draft.rb @@ -37,7 +37,

Re: [sup-devel] [PATCH] Handle drafts with high ID numbers.

2012-08-28 Thread Edward Z. Yang
If you've ever suffered from saving a draft message, and then suddenly asking, "Where did it go?" because it didn't show up in your INBOX, try this patch. Edward Excerpts from Edward Z. Yang's message of Tue Aug 28 20:35:01 -0400 2012: > From: "Edward Z. Yang&quo

[sup-devel] [PATCH] Add sent-save-to hook.

2012-08-28 Thread Edward Z. Yang
From: "Edward Z. Yang" Signed-off-by: Edward Z. Yang --- lib/sup/modes/edit-message-mode.rb | 13 - lib/sup/sent.rb| 7 --- 2 files changed, 16 insertions(+), 4 deletions(-) diff --git a/lib/sup/modes/edit-message-mode.rb b/lib/sup/modes/ed

[sup-devel] [PATCH] Inotify support for Maildirs. (FIRST DRAFT)

2012-09-02 Thread Edward Z. Yang
From: "Edward Z. Yang" Signed-off-by: Edward Z. Yang --- lib/sup/maildir.rb | 52 ++-- lib/sup/poll.rb| 33 ++--- lib/sup/source.rb | 4 3 files changed, 80 insertions(+), 9 deletions(-) diff -

Re: [sup-devel] [PATCH] Inotify support for Maildirs. (FIRST DRAFT)

2012-09-02 Thread Edward Z. Yang
The locking is a downright crime (where's the STM when you need it), and it's still racy, but it should work OK. Excerpts from Edward Z. Yang's message of Mon Sep 03 00:59:31 -0400 2012: > From: "Edward Z. Yang" > > Signed-off-by: Edward Z. Yang

Re: [sup-devel] [PATCH] Inotify support for Maildirs. (FIRST DRAFT)

2012-09-03 Thread Edward Z. Yang
OK, cracked a fix; you need this extra patch: commit f9ea07f3c4982ab46d8171fdba8eabc3af00c840 Author: Edward Z. Yang Date: Mon Sep 3 14:09:34 2012 -0400 sync_back after writing to index, not before. Signed-off-by: Edward Z. Yang diff --git a/lib/sup/index.rb b/lib/sup/index.rb

Re: [sup-devel] [PATCH] Inotify support for Maildirs. (FIRST DRAFT)

2012-09-03 Thread Edward Z. Yang
cracked a fix; you need this extra patch: > > commit f9ea07f3c4982ab46d8171fdba8eabc3af00c840 > Author: Edward Z. Yang > Date: Mon Sep 3 14:09:34 2012 -0400 > > sync_back after writing to index, not before. > > Signed-off-by: Edward Z. Yang > > diff

Re: [sup-devel] [PATCH] Inotify support for Maildirs. (FIRST DRAFT)

2012-09-03 Thread Edward Z. Yang
Excerpts from Alvaro Herrera's message of Mon Sep 03 14:42:55 -0400 2012: > Message at 0 has changed its source location. Updating labels from > draft,personal => draft,personal > Message at 1 has changed its source location. Updating labels from > draft,inbox,personal => draft,inbox,personal > M

Re: [sup-devel] [PATCH] Inotify support for Maildirs. (FIRST DRAFT)

2012-09-03 Thread Edward Z. Yang
Excerpts from Alvaro Herrera's message of Mon Sep 03 14:42:55 -0400 2012: > For the record, I let it run for a while and after that the poll log had > a couple thousand lines saying "Deleting ". > After that, so far it behaves normally. I don't know what prompted > those particular messages to be

Re: [sup-devel] [PATCH] Inotify support for Maildirs. (FIRST DRAFT)

2012-09-03 Thread Edward Z. Yang
patch: > > commit f9ea07f3c4982ab46d8171fdba8eabc3af00c840 > Author: Edward Z. Yang > Date: Mon Sep 3 14:09:34 2012 -0400 > > sync_back after writing to index, not before. > > Signed-off-by: Edward Z. Yang > > diff --git a/lib/sup/index.rb b/lib/sup/index.rb > ind

Re: [sup-devel] [PATCH] Inotify support for Maildirs. (FIRST DRAFT)

2012-09-04 Thread Edward Z. Yang
I've pushed a new revision of the branch: http://gitorious.org/~ezyang/sup/ezyang/commits/maildir-sync which solves some bad interactions with sync-back. Edward ___ Sup-devel mailing list Sup-devel@rubyforge.org http://rubyforge.org/mailman/listinfo/sup