Archive of RubyForge sup-talk mailing list
 help / color / mirror / Atom feed
* [sup-talk] Minor maildir change
@ 2007-09-09 22:40 Magnus Therning
  2007-09-14  3:33 ` William Morgan
  0 siblings, 1 reply; 6+ messages in thread
From: Magnus Therning @ 2007-09-09 22:40 UTC (permalink / raw)


I thought it was a little strange the file_path on Maildir objects
returned `nil` so I changed that to return the path of the maildir.

I am somewhat puzzled by the labels one receives from Maildir::each,
it's the default labels for the source rather than the labels of the
actual message.  Especially confusing was the choice to label something
'unread' if it's filename doesn't contains an 'R'.  IIRC 'R' means that
the email has been replied to, it would have been more correct to mark
it unread if it doesn't contain an 'S' (as in seen).  However, it seems
silly to take any of this into consideration when sup doesn't deal with
maildirs "properly" anyway.  I've removed that strangeness, at least
until a full maildir implementation makes it into sup.

/M

=== modified file 'lib/sup/maildir.rb'
--- lib/sup/maildir.rb	2007-09-09 22:27:27 +0000
+++ lib/sup/maildir.rb	2007-09-09 22:29:52 +0000
@@ -27,6 +27,7 @@
     @mutex = Mutex.new
   end
 
+  def file_path; @dir end
   def self.suggest_labels_for path; [] end
 
   def check
@@ -93,7 +94,7 @@
     start.upto(@ids.length - 1) do |i|         
       id = @ids[i]
       self.cur_offset = id
-      yield id, @labels + (@ids_to_fns[id] =~ /,.*R.*$/ ? [] : [:unread])
+      yield id, @labels
     end
   end
 


-- 
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: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: Digital signature
Url : http://rubyforge.org/pipermail/sup-talk/attachments/20070909/3ea679f1/attachment-0001.bin 


^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2007-09-24  2:29 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2007-09-09 22:40 [sup-talk] Minor maildir change Magnus Therning
2007-09-14  3:33 ` William Morgan
2007-09-16 18:19   ` Magnus Therning
2007-09-19 15:59     ` William Morgan
2007-09-19 22:02       ` Magnus Therning
2007-09-24  2:29         ` William Morgan

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox