* [sup-talk] More maildir
@ 2007-09-13 10:15 Magnus Therning
2007-09-13 15:45 ` Magnus Therning
` (2 more replies)
0 siblings, 3 replies; 6+ messages in thread
From: Magnus Therning @ 2007-09-13 10:15 UTC (permalink / raw)
I've attached a patch that adds methods that'll make it easier for sup
to play nice with other MUAs when using maildir for storage.
Here are some questions:
- What's my Ruby like? (I hadn't even looked at Ruby just 2 weeks ago
so please tell me if I'm doing strange things.)
- The methods names are maildir-centric, any suggestions for better
ones?
- The maildir state (the flags) are related to some sup labels
('trashed' is 'deleted' and '!seen' is 'unread'). Is it important to
keep them in sync? (My thinking is no, at least not automatically.
The maildir state could be used when finding new mail during sync to
set the initial labels. It would also be nice if state/labels on
known messages would sync--I think "read in either => read" and
"trashed in either => trashed" is good enough.)
Next steps:
1. Basically revert the change to Maildir::each I made in another
email. Re-implement it using the methods I introduced here.
2. Implement Maildir::delete
3. Move the delete method in sup-sync-back into MBox::Loader and modify
sup-sync-back.
/M
--
Magnus Therning (OpenPGP: 0xAB4DFBA4)
magnus?therning?org Jabber: magnus?therning?gmail?com
http://therning.org/magnus
-------------- next part --------------
A non-text attachment was scrubbed...
Name: sup_522.patch
Type: text/x-diff
Size: 2076 bytes
Desc: not available
Url : http://rubyforge.org/pipermail/sup-talk/attachments/20070913/f0b09067/attachment-0002.bin
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
Url : http://rubyforge.org/pipermail/sup-talk/attachments/20070913/f0b09067/attachment-0003.bin
^ permalink raw reply [flat|nested] 6+ messages in thread
* [sup-talk] More maildir
2007-09-13 10:15 [sup-talk] More maildir Magnus Therning
@ 2007-09-13 15:45 ` Magnus Therning
2007-09-13 15:56 ` Magnus Therning
2007-09-14 3:42 ` William Morgan
2 siblings, 0 replies; 6+ messages in thread
From: Magnus Therning @ 2007-09-13 15:45 UTC (permalink / raw)
On Thu, Sep 13, 2007 at 11:15:19 +0100, Magnus Therning wrote:
>I've attached a patch that adds methods that'll make it easier for sup
>to play nice with other MUAs when using maildir for storage.
>
>Here are some questions:
>
> - What's my Ruby like? (I hadn't even looked at Ruby just 2 weeks ago
> so please tell me if I'm doing strange things.)
>
> - The methods names are maildir-centric, any suggestions for better
> ones?
>
> - The maildir state (the flags) are related to some sup labels
> ('trashed' is 'deleted' and '!seen' is 'unread'). Is it important to
> keep them in sync? (My thinking is no, at least not automatically.
> The maildir state could be used when finding new mail during sync to
> set the initial labels. It would also be nice if state/labels on
> known messages would sync--I think "read in either => read" and
> "trashed in either => trashed" is good enough.)
>
>Next steps:
>
> 1. Basically revert the change to Maildir::each I made in another
> email. Re-implement it using the methods I introduced here.
> 2. Implement Maildir::delete
> 3. Move the delete method in sup-sync-back into MBox::Loader and modify
> sup-sync-back.
Patch that uses the new improved maildir methods to add initial labels.
/M
--
Magnus Therning (OpenPGP: 0xAB4DFBA4)
magnus?therning?org Jabber: magnus?therning?gmail?com
http://therning.org/magnus
Some operating systems are called 'user friendly', Linux however is
'expert friendly'.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: sup_522-1.patch
Type: text/x-diff
Size: 387 bytes
Desc: not available
Url : http://rubyforge.org/pipermail/sup-talk/attachments/20070913/041a088b/attachment.bin
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
Url : http://rubyforge.org/pipermail/sup-talk/attachments/20070913/041a088b/attachment-0001.bin
^ permalink raw reply [flat|nested] 6+ messages in thread
* [sup-talk] More maildir
2007-09-13 10:15 [sup-talk] More maildir Magnus Therning
2007-09-13 15:45 ` Magnus Therning
@ 2007-09-13 15:56 ` Magnus Therning
2007-09-14 3:42 ` William Morgan
2 siblings, 0 replies; 6+ messages in thread
From: Magnus Therning @ 2007-09-13 15:56 UTC (permalink / raw)
On Thu, Sep 13, 2007 at 11:15:19 +0100, Magnus Therning wrote:
>I've attached a patch that adds methods that'll make it easier for sup
>to play nice with other MUAs when using maildir for storage.
The original patch did some silly things to get the filename of a
message. Here's another patch that cleans that up a bit.
/M
--
Magnus Therning (OpenPGP: 0xAB4DFBA4)
magnus?therning?org Jabber: magnus?therning?gmail?com
http://therning.org/magnus
Failure is not an option. It comes bundled with the software.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: sup_522-2.patch
Type: text/x-diff
Size: 783 bytes
Desc: not available
Url : http://rubyforge.org/pipermail/sup-talk/attachments/20070913/cec8a05d/attachment-0002.bin
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
Url : http://rubyforge.org/pipermail/sup-talk/attachments/20070913/cec8a05d/attachment-0003.bin
^ permalink raw reply [flat|nested] 6+ messages in thread
* [sup-talk] More maildir
2007-09-13 10:15 [sup-talk] More maildir Magnus Therning
2007-09-13 15:45 ` Magnus Therning
2007-09-13 15:56 ` Magnus Therning
@ 2007-09-14 3:42 ` William Morgan
2007-09-17 10:55 ` Magnus Therning
2 siblings, 1 reply; 6+ messages in thread
From: William Morgan @ 2007-09-14 3:42 UTC (permalink / raw)
Excerpts from Magnus Therning's message of Thu Sep 13 03:15:19 -0700 2007:
> I've attached a patch that adds methods that'll make it easier for sup
> to play nice with other MUAs when using maildir for storage.
Applied! I merged in the several patches you sent into one revision. "svn
diff -r572:573" should give it to you.
I no longer use Maildir so it's up to you to test it. :)
> - What's my Ruby like? (I hadn't even looked at Ruby just 2 weeks
> ago so please tell me if I'm doing strange things.)
It's great. I made one or two minor tweaks but that's it. (For example,
x = y || 3 instead of x = y ? y : 3).
> - The methods names are maildir-centric, any suggestions for better
> ones?
Seems fine to me. The only thing that's going to be globally called is
some kind of delete method.
> - The maildir state (the flags) are related to some sup labels
> ('trashed' is 'deleted' and '!seen' is 'unread'). Is it important to
> keep them in sync? (My thinking is no, at least not automatically.
> The maildir state could be used when finding new mail during sync to
> set the initial labels. It would also be nice if state/labels on
> known messages would sync--I think "read in either => read" and
> "trashed in either => trashed" is good enough.)
This is basically right. Sup interacts with sources in two ways: getting
a new message, and during sup-sync-back, and in both places should
synchronize read/unread and deleted/undeleted flags. (Actually
sup-sync-back doesn't even do read/unread for mbox yet.) Other flags are
left alone, except we kindly allow you to delete spam messages as well.
--
William <wmorgan-sup at masanjin.net>
^ permalink raw reply [flat|nested] 6+ messages in thread
* [sup-talk] More maildir
2007-09-14 3:42 ` William Morgan
@ 2007-09-17 10:55 ` Magnus Therning
2007-09-19 16:02 ` William Morgan
0 siblings, 1 reply; 6+ messages in thread
From: Magnus Therning @ 2007-09-17 10:55 UTC (permalink / raw)
On Thu, Sep 13, 2007 at 20:42:15 -0700, William Morgan wrote:
>Excerpts from Magnus Therning's message of Thu Sep 13 03:15:19 -0700 2007:
>> I've attached a patch that adds methods that'll make it easier for sup
>> to play nice with other MUAs when using maildir for storage.
>
>Applied! I merged in the several patches you sent into one revision. "svn
>diff -r572:573" should give it to you.
>
>I no longer use Maildir so it's up to you to test it. :)
No worries. However, if there were unit tests... ;-)
I've attached another small patch that equates maildir's concept of a
flagged message with sup's concept of a starred message. Seems like an
obvious thing that didn't hit me until walking to work this morning...
/M
--
Magnus Therning (OpenPGP: 0xAB4DFBA4)
magnus?therning?org Jabber: magnus?therning?gmail?com
http://therning.org/magnus
-------------- next part --------------
A non-text attachment was scrubbed...
Name: sup_starred-1.diff
Type: text/x-diff
Size: 488 bytes
Desc: not available
Url : http://rubyforge.org/pipermail/sup-talk/attachments/20070917/19bba085/attachment.bin
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
Url : http://rubyforge.org/pipermail/sup-talk/attachments/20070917/19bba085/attachment-0001.bin
^ permalink raw reply [flat|nested] 6+ messages in thread
* [sup-talk] More maildir
2007-09-17 10:55 ` Magnus Therning
@ 2007-09-19 16:02 ` William Morgan
0 siblings, 0 replies; 6+ messages in thread
From: William Morgan @ 2007-09-19 16:02 UTC (permalink / raw)
Excerpts from Magnus Therning's message of Mon Sep 17 03:55:18 -0700 2007:
> No worries. However, if there were unit tests... ;-)
Patches accepted! :)
> I've attached another small patch that equates maildir's concept of a
> flagged message with sup's concept of a starred message.
Applied, thanks.
--
William <wmorgan-sup at masanjin.net>
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2007-09-19 16:02 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2007-09-13 10:15 [sup-talk] More maildir Magnus Therning
2007-09-13 15:45 ` Magnus Therning
2007-09-13 15:56 ` Magnus Therning
2007-09-14 3:42 ` William Morgan
2007-09-17 10:55 ` Magnus Therning
2007-09-19 16:02 ` William Morgan
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox