[notmuch] keeping a copy of sent mail locally
aghitza at gmail.com
Sat Dec 19 20:29:15 PST 2009
On Sat, 19 Dec 2009 18:50:17 -0800, Keith Packard <keithp at keithp.com> wrote:
> On Sat, 19 Dec 2009 18:37:12 -0800, Carl Worth <cworth at cworth.org> wrote:
> > So we need to figure out how to configure (or hook) that
> > to insert the Bcc, and then we can fix notmuch.el to do this without any
> > user configuration.
> Just call:
> (message-mail nil nil '(("bcc" "keithp at keithp.com")))
> instead of (message-mail)
Good. So we can put this in notmuch.el and Keith will get everybody's
sent mail. :)
It looks like we need a way to get the primary email address from the
config file. Actually, while we're at it, we can consider making this
more flexible and adding a new option to the config file (e.g. bcc=...)
which would take a semicolon-separated list of email addresses (in case
someone wants to always bcc an address other than the primary one).
Is there a nice clean way of getting the config variables in notmuch.el?
Or should this go into a new file notmuch-compose.c? Note that the
latter would imply having a new command like "notmuch compose".
Ah, I just realised there's another issue related to the fact that 'm'
immediately defers to Message mode while 'r' does some preprocessing:
after pressing 'r', various headers are set in the appropriate manner
(From:, for instance, using the user name and email address from the
config file). If you press 'm', you would get something like
From: ghitza at artin.i-did-not-set--mail-host-address--so-tickle-me
due to the fact that Message mode doesn't know the name or the email
address. This can be fixed by adding to .emacs something like
(setq user-full-name "Alex Ghitza")
(setq user-mail-address "aghitza at gmail.com")
It's not a big deal, but now the same thing must be set in two different
places (.notmuch-config and .emacs), and can lead to confusion if, say,
the user changes their primary email address in one place but forgets it
needs to also be changed in the other. So I guess I would prefer it if
notmuch would do a very minimal amount of preprocessing before heading
into Message mode when composing mail. In fact, we could make sure that
there is consistent behaviour between 'm' and 'r' by making "notmuch
compose" return a few preset headers (From:, Bcc:, whatever else is
deemed appropriate), and making "notmuch reply" call "notmuch compose"
first and then add the reply-specific content.
Sorry about writing a lot of prose and no code! I'd like to get a sense
for people's reactions before trying to write a patch for this.
Alex Ghitza -- Lecturer in Mathematics -- The University of Melbourne
-- Australia -- http://www.ms.unimelb.edu.au/~aghitza/
More information about the notmuch