On Mon, 16 May 2011 09:52:32 -0700, Jameson Graef Rollins <jroll...@finestructure.net> wrote: > On Mon, 16 May 2011 11:52:43 +0200, Thomas Jost <schno...@schnouki.net> wrote: > > On Mon, 16 May 2011 19:29:07 +1000, Stewart Smith > > <stew...@flamingspork.com> wrote: > > > Thought I'd share this bit of my .emacs snippet that may be useful to go > > > on the emacs tips page. > > > > > > This does the following: > > > - sets up a list of possible identities to have mail From > > > - on composing mail, it prompts you for who you want to send mail from > > > - pressing enter will give you the default (first in the list) > > > - otherwise you have tab completion > > This is great, guys. I've been wanting to get something like this > working for a while now. > > Have you guys looked at home message-mode does bbdb address completion > in the To: and From: headers? It has the nice benefit of being able to > tab through all full addresses for a bbdb entry. It would be nice to > have this function fill in a default address, with the cursor at the end > of the address, and then just tab through all the options without having > to type in anything. ido is pretty cool, though, and accomplishes a > similar effect.
I don't know much about bbdb; right now I'm completing addresses with notmuch-address.el and a little Python script that I wrote . It can complete the From header too, although I had never tried that before writing this mail :) > It would be nice to pull the addresses from the notmuch config, eg: > > notmuch config get user.primary_email > notmuch config get user.other_email Nice idea, I like that. However this way you can only get the address part, not the username part. And when using some addresses I want to put a nickname instead of my full name, so just using a default user name is not very convenient. Or is it possible to put things like "User Name <m...@myself.com>" in the notmuch config? > I would ideally like to be able to choose the From: address right before > sending, as opposed to right before composing. Has anyone tried to get > that working? I was not having much luck with send-hooks, since it > looks like it expects the message to be complete at that point. I haven't tried that, but it would indeed be nice to be able to do that at send time. The message-seend-hook doc states that "this hook is run quite early when sending", so I would expect that to be the best solution. However, if for some reason it doesn't work, it's probably possible to write a little function around message-send (...or even to advise it) to do whatever you want before it is actually executed. I'll try to have a look at this tomorrow. Regards, Thomas  https://github.com/Schnouki/dotfiles/blob/master/notmuch/addrbook.py -- Thomas/Schnouki
Description: PGP signature
_______________________________________________ notmuch mailing list email@example.com http://notmuchmail.org/mailman/listinfo/notmuch