[PATCH] emacs: include first match in address completion

Mark Walters markwalters1009 at gmail.com
Sun Oct 9 03:10:49 PDT 2016


On Sun, 09 Oct 2016, David Bremner <david at tethera.net> wrote:
> Mark Walters <markwalters1009 at gmail.com> writes:
>
>> This tries to get round most of these problems by including the full
>> list of possible completions, but with the first match moved to the
>> very end of the list.
>
> Have you thought about how this should be adjusted when the completion
> entries are sorted according to some priority? I guess if we treated the
> list circularly putting the highest priority at the end of list would be
> ok. I don't know if that is feasible.

Hi

I hadn't thought about that at all. However, the function
notmuch-address-expand-name just gets a list of possible completions and
from notmuch-address-matching (via notmuch-address-options) and displays
them in the order it receives them. Thus the sorting code goes into
notmuch-address-matching rather than notmuch-address-expand-name, and
hence everything "just works".

This does seem to be the case when I tried on top of my old sort address
patch.

(Note company-mode does its own sort unless not told not to. So at the
moment I think you see an unsorted list of completion candidates if you
are not using company.)

Best wishes

Mark


More information about the notmuch mailing list