Subject: Re: [sup-talk] Maildir sent_source

From: Matthias Vallentin <[email-masked]>
Date: Wed, 22 Dec 2010 06:34:41 -0800

On Tue, Dec 21, 2010 at 12:56:23PM +0200, Tero Tilus wrote:
> I do see it.  ;)

Yeah, me too now :-).

> Judging by the code it looks like you also need to sup-add your
> maildir in addition to adding it to config.  If
> Redwood::SourceManager.source_for doesn't find the source it silently
> drops back to default sent source.  IMO it should complain about
> invalid config or something.

I agree, this inconsistency should not go through without flagging it
and terminating with an error.

Alternatively, the patch below would allow for adding a maildir source
before the default logic kicks in.

   Matthias

--- a/bin/sup
+++ b/bin/sup
@@ -158,6 +158,9 @@ begin
   trap("TERM") { |x| $die = true }
   trap("WINCH") { |x| BufferManager.sigwinch_happened! }
 
+  HookManager.run "startup"
+  Redwood::Keymap.run_hook global_keymap
+
   if(s = Redwood::SourceManager.source_for DraftManager.source_name)
     DraftManager.source = s
   else
@@ -171,9 +174,6 @@ begin
     Redwood::SourceManager.add_source SentManager.default_source
   end
 
-  HookManager.run "startup"
-  Redwood::Keymap.run_hook global_keymap
-
   debug "starting curses"
   Redwood::Logger.remove_sink $stderr
   start_cursing

_______________________________________________
sup-talk mailing list
[email-masked]
http://rubyforge.org/mailman/listinfo/sup-talk

---

From: Tero Tilus <[email-masked]>
Date: Tue, 21 Dec 2010 12:56:23 +0200

Matthias Vallentin, 2010-12-21 09:12:
> It seems that qualifying sent_source with maildir in config.yaml does
> not have an effect, e.g., the sent source is still mbox despite an
> 
>     :sent_source: maildir:~/.mail/sent
> 
> entry. Briefly crawling through the source, I don't see support for
> Maildir as sent source anyway.

I do see it.  ;)  Open bin/sup and look for

  if(s = Redwood::SourceManager.source_for SentManager.source_uri)
    SentManager.source = s
  else
    Redwood::SourceManager.add_source SentManager.default_source
  end

--
Tero Tilus ## 050 3635 235 ## http://tero.tilus.net/
_______________________________________________
sup-talk mailing list
[email-masked]
http://rubyforge.org/mailman/listinfo/sup-talk

---

From: Matthias Vallentin <[email-masked]>
Date: Mon, 20 Dec 2010 23:12:30 -0800

entry. Briefly crawling through the source, I don't see support for
Maildir as sent source anyway. Am I missing a patch or am I in the wrong
branch (currently Damien's maildir clone)?

   Matthias

---

From: Matthias Vallentin <[email-masked]>
Date: Wed, 22 Dec 2010 09:14:44 -0800

On Tue, Dec 21, 2010 at 12:56:23PM +0200, Tero Tilus wrote:
> maildir in addition to adding it to config.  

Yup, the following configuration works for me:

- !masanjin.net,2006-10-01/Redwood/Maildir 
  uri: maildir:~/.mail/sent
  usual: false
  archived: true
  id: 1
  labels: 
  - sent

This works only if the source is added before the first launch. As you
mentioned earlier, the cleanest solution would be to patch bin/sup such
that it respects the sent_source configuration (and in particular the
URI scheme and location).

   Matthias