~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/config.py

  • Committer: Xavier Maillard
  • Date: 2008-04-13 11:48:00 UTC
  • mto: (3364.1.1 bzr.ab.integration)
  • mto: This revision was merged to the branch mainline in revision 3365.
  • Revision ID: xma@gnu.org-20080413114800-b3tp394elic1793b
Replace mail-mode call with compose-mail from GNU Emacs.

This patch is a modified version of the current revno 3323.

It overloads it by:

1. defining a different python class EmacsMail "MUA agnostic".

   To use this option, just put these lines into ~/.bazaar/bazaar.conf
    
[DEFAULT]
mail_client = emacsclient

2. supporting any mail client of GNU Emacs family (mail-mode,
   message-mode, ...) The right tool will be called according to the
   value of the variable ``mail-user-agent``. So Virtually any Emacs
   mail client will work transparently if registered against
   ``mail-user-agent``.

3. adding a wrapper function around MIME attachment. This allow us not
   to have many different functions/classes to attach a file but one.

4. tests have been updated to follow the changes.

Show diffs side-by-side

added added

removed removed

Lines of Context:
151
151
            mail_client_class = {
152
152
                None: mail_client.DefaultMail,
153
153
                # Specific clients
 
154
                'emacsclient': mail_client.EmacsMail,
154
155
                'evolution': mail_client.Evolution,
155
156
                'kmail': mail_client.KMail,
156
157
                'mutt': mail_client.Mutt,
159
160
                'default': mail_client.DefaultMail,
160
161
                'editor': mail_client.Editor,
161
162
                'mapi': mail_client.MAPIClient,
162
 
                'emacs-mailmode': mail_client.EmacsMailMode,
163
163
                'xdg-email': mail_client.XDGEmail,
164
164
            }[selected_client]
165
165
        except KeyError: