On Mon, 18-08-2014, at 16:38, Josiah Schwab <[email protected]> wrote: > In-reply-to: <[email protected]> > > > On 18 August 2014 at 03:43 PDT, Dirk-Jan C. Binnema wrote: > >> On Monday Aug 18 2014, Ramon Diaz-Uriarte wrote: >> >>> I occasionally send an email to a mistaken address, or the same >>> person over time changes emails (say "Name.Lastname@something" to >>> "Lastname.Name@something"), but I have no idea how to edit/remove the >>> no-longer-in-use/wrong email addresses. >> >> There is `mu4e-contact-rewrite-function` which might help. > > I asked a similar question about a year ago > > https://groups.google.com/d/msg/mu-discuss/dNtbpzc8v90/riLjnH7fAHIJ > > and it was suggested that I make use of > > mu4e-compose-complete-ignore-address-regexp >
Ooops, I missed that. > > So I have the following code in my .emacs. This has worked well enough > for my purposes. > > ,---- > | (setq jws/contact-blacklist-file "/home/jschwab/.mu/contact-blacklist") > | > | (defun jws/read-contact-blacklist () > | "Return a list of blacklisted email addresses" > | (with-temp-buffer > | (insert-file-contents jws/contact-blacklist-file) > | (split-string (buffer-string) "\n" t))) > | > | (defun jws/make-contact-blacklist-regexp () > | "Combine listed addresses into a regexp" > | (mapconcat 'identity (jws/read-contact-blacklist) "\\|")) > | > | (setq mu4e-compose-complete-ignore-address-regexp > (jws/make-contact-blacklist-regexp)) > `---- > > The contact-blacklist file is a list of email addresses or regexps, > separated by newlines. Mine looks (schematically) like > > ,---- > | no-?reply > | [email protected] > | [email protected] > `---- > Thanks for the detailed example. I just tried it, and it works great! Exactly what I was looking for, I think. Best, R. > Best, > Josiah -- Ramon Diaz-Uriarte Department of Biochemistry, Lab B-25 Facultad de Medicina Universidad Autónoma de Madrid Arzobispo Morcillo, 4 28029 Madrid Spain Phone: +34-91-497-2412 Email: [email protected] [email protected] http://ligarto.org/rdiaz -- You received this message because you are subscribed to the Google Groups "mu-discuss" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. For more options, visit https://groups.google.com/d/optout.
