From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from localhost (localhost [127.0.0.1]) by arlo.cworth.org (Postfix) with ESMTP id 981E36DE1338 for ; Sun, 9 Oct 2016 03:10:54 -0700 (PDT) X-Virus-Scanned: Debian amavisd-new at cworth.org X-Spam-Flag: NO X-Spam-Score: 0.016 X-Spam-Level: X-Spam-Status: No, score=0.016 tagged_above=-999 required=5 tests=[AWL=-0.114, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, FREEMAIL_ENVFROM_END_DIGIT=0.25, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H3=-0.01, RCVD_IN_MSPIKE_WL=-0.01, SPF_PASS=-0.001] autolearn=disabled Received: from arlo.cworth.org ([127.0.0.1]) by localhost (arlo.cworth.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id rzbiLi8W-6da for ; Sun, 9 Oct 2016 03:10:52 -0700 (PDT) Received: from mail-wm0-f67.google.com (mail-wm0-f67.google.com [74.125.82.67]) by arlo.cworth.org (Postfix) with ESMTPS id 56C1D6DE1337 for ; Sun, 9 Oct 2016 03:10:52 -0700 (PDT) Received: by mail-wm0-f67.google.com with SMTP id 123so9637187wmb.3 for ; Sun, 09 Oct 2016 03:10:52 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:subject:in-reply-to:references:date:message-id:mime-version; bh=rJSIZBMJfilj2nOD08MtBaF3zKsD5F9JM3P9byP0qCc=; b=LKyxpmW+bJ30iLhibZe3O67p+I6pkWFaKgUIuwQ0oTQhJVe7K9IBIEjkh6tixhb21d OZaEO2O33C05TpXlJoLcZxI3zH48WS3YzCkc+lbBJLDaXq4Ki1UfGf9i963h7GBCow8S GueIEbuI+oQxZj0u5Tiu/3+tINTutxnTh7hqTkj393dUqNvT16s0HwapOgwircUOm160 aZSHYMGWehoo7vOO3KW0Y4XPAaPzL7KsH4dnCMeSOL4ZARiY7ITXnU38fexguP3rvBhG 3wxReRzF9snhjeL3XeaqhCk1I958K9nTzsKGe32AMqSiwpHdChkwcuMGwHfApwzAhy2Y nhqg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:subject:in-reply-to:references:date :message-id:mime-version; bh=rJSIZBMJfilj2nOD08MtBaF3zKsD5F9JM3P9byP0qCc=; b=eUEecyOR9xi+DhydQpaBlJV31H1UByMNGRIaOVSUwkjtqxqu7O1MVztEzH+X5DJQmv 0nMieBKCfRUpmu/yMi7CLy9bpm3jMWNs+aHtGVw8EeuPEeqZ19pn83v+K0rGPg7fB5+Q S+vWGkcnuJfHtgJcXQtc1fLWXBtQ9oLGPwkV5+YF0Dwo2CHRE1MJXGUfrJdO6pBTGJ7f mi9o979ad31im8avBxTz1BYS6xBMkFjmpIep5bpRH54t2B8xPOLVEndMdW1+zzwgYaNO xknbOYCH3VkAbvaZ1Bx0MfNkSs3nR3WMJopx8lQ/SGRcuqmn38PlfpAGz4c4gcSX+GAl 8SLA== X-Gm-Message-State: AA6/9RmqKGXnnkXXYHuXvaaumH2uZrdiavEN0RpMRCkgF2TnkMEhinI+7B8oucD/WBC6kQ== X-Received: by 10.28.213.211 with SMTP id m202mr6172869wmg.79.1476007850831; Sun, 09 Oct 2016 03:10:50 -0700 (PDT) Received: from localhost (5751dfa2.skybroadband.com. [87.81.223.162]) by smtp.gmail.com with ESMTPSA id va3sm29282567wjb.18.2016.10.09.03.10.50 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sun, 09 Oct 2016 03:10:50 -0700 (PDT) From: Mark Walters To: David Bremner , notmuch@notmuchmail.org Subject: Re: [PATCH] emacs: include first match in address completion In-Reply-To: <877f9ijuc7.fsf@maritornes.cs.unb.ca> References: <1474991127-15864-1-git-send-email-markwalters1009@gmail.com> <877f9ijuc7.fsf@maritornes.cs.unb.ca> Date: Sun, 09 Oct 2016 11:10:49 +0100 Message-ID: <8737k5de8m.fsf@qmul.ac.uk> MIME-Version: 1.0 Content-Type: text/plain X-BeenThere: notmuch@notmuchmail.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: "Use and development of the notmuch mail system." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 09 Oct 2016 10:10:54 -0000 On Sun, 09 Oct 2016, David Bremner wrote: > Mark Walters 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