Thanks for the feedback, Stephen. Stephen J. Turnbull <step...@xemacs.org> wrote:
> Bill Janssen writes: > > > Folks, I'm working on an implementation of RFC 5256 email threading, > > designed so that it could fit as a submodule in the "email" package, if > > such a think was ever seen to be useful. > > I don't know if it belongs there, although that's the obvious place. > There are a other threaded message structures that aren't email (or > netnews, which is obviously basically the same thing). For example, > issue trackers. > > > * Should M be required to be "email.message.Message", > > -1 > > > or perhaps some less restrictive type, say > > "ThreadableMessageAPI"? All that's strictly required is the > > ability to retrieve the Message-ID, Subject, Date, References, > > and In-Reply-To fields. > > If a variety of existing apps are to be able to plug this in, the API > shouldn't be bound to email.message.Message. +1 for duck-typing. I think I'll finesse this issue with another (appropriate) layer of indirection. > > * What operations should be possible on C? Some that come to mind: > > > > * retrieve_thread (M or message-id) => T > > * add_message (M) => T > > * add_messages (set of M) => None > > * remove_message (M or message-id) => T (or None) ? > > * Reparent message (this will actually merge threads). > > > * What's the interface for T? It's a tree with possible dummy nodes, so > > a tuple of messages plus nested tuples would do it. What should the > > nodes in the tree be? Normalized (see RFC 5256) Message-IDs? > > In a Lisp implementation of http://www.jwz.org/doc/threading.html I'm > working on, I just use symbols named by the message IDs themselves; Yes, that works well for a static persistent representation. Lisp message threading? What's that in aid of, if you can say? > I'm not familiar with the normalization yet. RFC 5256 mentions it, but I had to go back to 2822 to figure it out. Referencing section 3.6.4 of RFC 2822: The IMAP guys seem to be implying that the DQUOTEs in "no-fold-quote" and the "[" and "]" brackets in "no-fold-literal" should be removed before comparing message-ids. I'll send a note to the IMAP list to verify that. Bill _______________________________________________ Email-SIG mailing list Email-SIG@python.org Your options: http://mail.python.org/mailman/options/email-sig/archive%40mail-archive.com