[RFC/Q] How to create a mail-client plugin? Do we need a registry?
Erik Bågfors
zindar at gmail.com
Mon Aug 18 09:43:31 BST 2008
I'd say that by default the "big" names in mail applications should be
supported out of the box.
I have code that does work with Mail.app and that on mac defaults to
Mail.app. I have been meaning to fix it and submit it for review, but
haven't gotten around to it.
Regards,
Erik
On Mon, Aug 18, 2008 at 3:27 AM, Neil Martinsen-Burrell
<nmb at wartburg.edu> wrote:
> As has been mentioned before on this list, the best way to control Mail.app on
> Mac OS X to use it as a client for `bzr send` is to use Applescript. It should
> be possible to use a separate file containing an Applescript that takes to,
> from, text, attachment, etc. as arguments and opens up the message in Mail.app.
> A more pythonic way is to use the python module appscript [1]. This provides
> an object oriented python binding to Applescript commands.
>
> In order to avoid introducing an external dependency on Bazaar (at least for Mac
> OS X where people set email_client = 'Mail.app') it would be nice to distribute
> a plugin that uses appscript to provide a mail_client that works under OS X.
> But, I can't see how it would be possible to do a new mail_client from a plugin.
>
> In particular, cmd_send dispatches based on bzrlib.config.get_mail_client(),
> which uses a literal dictionary to map configuration values to particular
> MailClient subclasses. I can't see how to add an additional mapping for a new
> key to this dictionary from my plugin without having to monkey-patch
> bzrlib.config. Am I missing something about a way to do this, or is it
> currently not possible?
>
> A possible solution is some sort of registry system for mail_clients. There
> seem to be plenty of similar registries in bzrlib (e.g. version-info formats) so
> would this be an appropriate use for another one?
>
> -Neil
>
>
>
More information about the bazaar
mailing list