Contact completion oddities

13 views
Skip to first unread message

Yuri D'Elia

unread,
Jun 26, 2025, 6:33:53 AMJun 26
to mu-di...@googlegroups.com
Using mu4e-compose (from master), I noticed the address completion is
not exhaustive.

cfind finds all contacts as expected. As one example I can reproduce
(with real name omitted):

$ mu cfind -p name
name surname <name.s...@domain.com>
name <some...@otherdomain.com>

However, in mu4e, when attempting to complete "name" only gives me the
second variant for whatever reason, showing "Sole completion" (so I
cannot cycle through the alternatives). Yet, if I attempt to complete
"surname", I do get the first. And completing domain or otherdomain
works as expected.

I've set mu4e-compose-complete-only-after to some very old number (note:
doc says it can be set to nil, but defcustom type doesn't allow it), and
the default mu4e-contact-process-function, but to no avail.

If I attempt to complete a random substring such as "go" I do get the
expected cycling on tab, so it does work.. but seems inconsistent. I've
found plenty of cases where I'm not prompted for alternatives even
though cfind works exactly as I would expect.

Did I possibly mess up some customization?

Dirk-Jan C. Binnema

unread,
Jun 26, 2025, 11:29:24 AMJun 26
to mu-di...@googlegroups.com
Do you use the default Emacs completion mechanism? The details of the
completion / matching in influenced by the exact completion method you
use, so best to try an reproduce with the default.

There's `M-x mu4e-contacts-info' which should give you a buffer with all
contacts known to mu4e.

Kind regards,
Dirk.

--
Dirk-Jan C. Binnema Helsinki, Finland
e:dj...@djcbsoftware.nl w:www.djcbsoftware.nl
gpg: 6987 9CED 1745 9375 0F14 DA98 11DD FEA9 DCC4 A036

Yuri D'Elia

unread,
Jul 1, 2025, 8:15:13 AMJul 1
to mu-di...@googlegroups.com
On Thu, Jun 26 2025, Dirk-Jan C. Binnema wrote:
> On Thursday Jun 26 2025, 'Yuri D'Elia' via mu-discuss wrote:
>> If I attempt to complete a random substring such as "go" I do get the
>> expected cycling on tab, so it does work.. but seems inconsistent. I've
>> found plenty of cases where I'm not prompted for alternatives even
>> though cfind works exactly as I would expect.
>>
>> Did I possibly mess up some customization?
>
> Do you use the default Emacs completion mechanism? The details of the
> completion / matching in influenced by the exact completion method you
> use, so best to try an reproduce with the default.

I'm using a rather vanilla completion setup. I'm using vertico as the
default completing-read function, but by default you get the cycling
behavior of completion-in-region, so it doesn't actually get there.

> There's `M-x mu4e-contacts-info' which should give you a buffer with all
> contacts known to mu4e.

Contacts are indeed all there, as you would expect.

After fudging a bit, I noticed it seems that the default "basic"
completion style in completion-styles is causing these odd candidates to
be chosen (with some logic, I guess).

If I force

(setq completion-styles '(substring))

the behavior is identical to the command line. For reference, the
default completion-styles on current emacs master (which I didn't
customize) is:

'(basic partial-completion emacs22)
Reply all
Reply to author
Forward
0 new messages