Limit Address Autocompletion

47 views
Skip to first unread message

Josiah Schwab

unread,
Aug 18, 2013, 12:56:57 PM8/18/13
to mu-di...@googlegroups.com
Hi All,

Is there a simple way to provide a blacklist-like modification of the
addresses provided by mu4e autocompletion? The use case I have in mind
is eliminating dead addresses when colleagues change institutions, etc.

I read the manual page
http://www.djcbsoftware.nl/code/mu/mu4e/Address-autocompletion.html#Address-autocompletion
but none of the options seemed appropriate. I also searched the
mu-discuss archives for "autocompletion" and didn't find any threads
directly addressing this question.

Assuming that I'm not just missing a simple option, one could add this
behavior either by modifying the output of mu cfind or by doing some
filtering in the mu4e contact completion functions. I'm still pretty
new to mu/mu4e, so does one of those seem like a better idea than the
other?

Best,
Josiah

Dirk-Jan C. Binnema

unread,
Aug 18, 2013, 2:30:07 PM8/18/13
to mu-di...@googlegroups.com
So, currently you can filter based on time, on 'personal' messages and
there's an explicit `mu4e-compose-complete-ignore-address-regexp' (I
guess the latter could be used in your case -- but be a bit
inconvenient).

I'm a bit cautious adding even more ways to influence the filtering; if
the questions on the list are any indication, there are quite a few ways
to make it /not/ work... Perhaps sorting the addresses by date would
help.

Cheers,
Dirk.

--
Dirk-Jan C. Binnema Helsinki, Finland
e:dj...@djcbsoftware.nl w:www.djcbsoftware.nl
pgp: D09C E664 897D 7D39 5047 A178 E96A C7A1 017D DA3C

Josiah Schwab

unread,
Aug 18, 2013, 5:22:37 PM8/18/13
to mu-di...@googlegroups.com
Thank you for the quick reply!

> > Is there a simple way to provide a blacklist-like modification of the
> > addresses provided by mu4e autocompletion? The use case I have in mind
> > is eliminating dead addresses when colleagues change institutions, etc.
>
> So, currently you can filter based on time, on 'personal' messages and
> there's an explicit `mu4e-compose-complete-ignore-address-regexp' (I
> guess the latter could be used in your case -- but be a bit
> inconvenient).

Indeed, one could in theory use the regexp for that, but as you say it
seems inconvenient to maintain.

> I'm a bit cautious adding even more ways to influence the filtering; if
> the questions on the list are any indication, there are quite a few ways
> to make it /not/ work... Perhaps sorting the addresses by date would
> help.

Yes, that is a good suggestion. Having the completions sorted by the
descending date of the most recent message in which that contact
appeared would be a sufficient solution for my use case. It's fine if
there are many dead addresses in my contacts as long as they don't
frequently float to the top.

I just poked around in the source and given my current understanding of
the program, that seemed not easy (for me at least) to do.

So perhaps consider this a feature request for some future version of
mu/mu4e. Thanks for such a wonderful program.

Best Regards,
Josiah

Dirk-Jan C. Binnema

unread,
Aug 20, 2013, 2:52:09 PM8/20/13
to mu-di...@googlegroups.com
There's a feature request for that already in the github issue list, and
I'm sorting the addresses by date already, but sadly, the emacs
completion mechanism sorts them once more alphabetically :-( To get the
results in the desired order requires a few more steps...
Reply all
Reply to author
Forward
0 new messages