From 1b761fedb08856de9e397df5a043db22055e835e Mon Sep 17 00:00:00 2001 From: David Edmondson Date: Fri, 12 Dec 2014 13:08:42 +0000 Subject: [PATCH] Re: Address completion in Emacs --- fe/d11af79181b905e1fccc8b6edf3d03c8e291cc | 121 ++++++++++++++++++++++ 1 file changed, 121 insertions(+) create mode 100644 fe/d11af79181b905e1fccc8b6edf3d03c8e291cc diff --git a/fe/d11af79181b905e1fccc8b6edf3d03c8e291cc b/fe/d11af79181b905e1fccc8b6edf3d03c8e291cc new file mode 100644 index 000000000..b647fb46d --- /dev/null +++ b/fe/d11af79181b905e1fccc8b6edf3d03c8e291cc @@ -0,0 +1,121 @@ +Return-Path: +X-Original-To: notmuch@notmuchmail.org +Delivered-To: notmuch@notmuchmail.org +Received: from localhost (localhost [127.0.0.1]) + by olra.theworths.org (Postfix) with ESMTP id E9304431FD5 + for ; Fri, 12 Dec 2014 05:08:49 -0800 (PST) +X-Virus-Scanned: Debian amavisd-new at olra.theworths.org +X-Spam-Flag: NO +X-Spam-Score: -0.699 +X-Spam-Level: +X-Spam-Status: No, score=-0.699 tagged_above=-999 required=5 + tests=[RCVD_IN_DNSWL_LOW=-0.7, UNPARSEABLE_RELAY=0.001] + autolearn=disabled +Received: from olra.theworths.org ([127.0.0.1]) + by localhost (olra.theworths.org [127.0.0.1]) (amavisd-new, port 10024) + with ESMTP id 0v61H3VJjuBy for ; + Fri, 12 Dec 2014 05:08:46 -0800 (PST) +Received: from mail-wg0-f41.google.com (mail-wg0-f41.google.com + [74.125.82.41]) (using TLSv1 with cipher RC4-SHA (128/128 bits)) (No client + certificate requested) by olra.theworths.org (Postfix) with ESMTPS id + EE1A8431FBC for ; Fri, 12 Dec 2014 05:08:45 -0800 + (PST) +Received: by mail-wg0-f41.google.com with SMTP id y19so9046769wgg.28 + for ; Fri, 12 Dec 2014 05:08:44 -0800 (PST) +X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; + d=1e100.net; s=20130820; + h=x-gm-message-state:user-agent:to:subject:in-reply-to:references + :from:date:message-id:mime-version:content-type + :content-transfer-encoding; + bh=5s1VRoF2msz1QHsadCQtUP36tf4N83fAlJbLm88MP1A=; + b=emk+3dTJkZyceQGcZVSSH29qODrUtiXQhwG2WOtMwVXNF+qM4WDw/S9A34nwr4digX + Mz1Um6Gygd4dxFAZToHFG/K/CKJ+xUV/eP76jmfXS742dWW82uJ52vL3DLdeBPPdUA89 + ZeKuStCkpCuP8dsZ0FKeRhwzSAk4VKYDJRN55BJrahHnQ50PwrldW5Mi8lMZc2KnfNdE + 2vfiH0VYreKrQuJL1fcfhocre/0U2wep6FkLY3n10vo7scsVkbnXqaS3cDb4Q4rrU0Mo + grZjPSILwWniC6uASCkri3Kuwen96orUNQIINWZvPUyU055bElOkDZUyOT8UZ9Yg/QlW + a8fQ== +X-Gm-Message-State: + ALoCoQlhQjs00AIw+suLwlE8Iv0I0JE2mzw85h81+iLirr785VKjHCRyYCpHuQagVMF1XrfJLpv2 +X-Received: by 10.194.249.232 with SMTP id yx8mr27669127wjc.1.1418389724504; + Fri, 12 Dec 2014 05:08:44 -0800 (PST) +Received: from disaster-area.hh.sledj.net + ([2a01:348:1a2:1:ea39:35ff:fe2c:a227]) + by mx.google.com with ESMTPSA id + qg11sm1905265wic.17.2014.12.12.05.08.43 + (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); + Fri, 12 Dec 2014 05:08:43 -0800 (PST) +Received: from localhost (30000@localhost [local]); + by localhost (OpenSMTPD) with ESMTPA id 548d6f02; + Fri, 12 Dec 2014 13:08:42 +0000 (UTC) +User-Agent: OpenSMTPD enqueuer (Demoostik) +To: Lele Gaifax , notmuch@notmuchmail.org +Subject: Re: Address completion in Emacs +In-Reply-To: <87vblh829w.fsf@nautilus.nautilus> +References: <87d27p9t0f.fsf@nautilus.nautilus> + + <87vblh829w.fsf@nautilus.nautilus> +From: David Edmondson +Date: Fri, 12 Dec 2014 13:08:42 +0000 +Message-ID: +MIME-Version: 1.0 +Content-Type: text/plain; charset=utf-8 +Content-Transfer-Encoding: quoted-printable +X-BeenThere: notmuch@notmuchmail.org +X-Mailman-Version: 2.1.13 +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: Fri, 12 Dec 2014 13:08:50 -0000 + +On Fri, Dec 12 2014, Lele Gaifax wrote: +> David Edmondson writes: +> +>> On Fri, Dec 12 2014, Lele Gaifax wrote: +>>> Wouldn't it be more "correct" to pass the unchanged `options' list and +>>> the "real" `orig' text as `initial-input' to the customizable function +>>> instead? +>> +>> Would I then have to press TAB twice to get the first result? +> +> No, why? The customizable `notmuch-address-selection-function' would be +> free to pass (car options) as the initial-input of `completing-read', if +> needed. When using `ido-completing-read', the first option is +> pre-selected, so a RET confirms that. + +Understood. + +>>> I understand that it may be undesiderable to break existing +>>> configurations by rectifying the arguments in that way, and in such case +>>> could we change the `initial-input' argument name to better reflect the +>>> fact that it actually contains one possible candidate instead? +>> +>> From the perspective of `notmuch-address-selection-function', it _is_ +>> the `initial-input', as that is what is presented to the user. +> +> IMHO no, it's not: what it receives as `initial-input' is not what the +> user actually wrote, but rather just the (somewhat arbitrary) first +> candidate address found by `notmuch-address-command'. + +I think that we're at cross +purposes. `notmuch-address-selection-function' will use the +`initial-input' as the initial input of the completion, so that's what +it chooses to call the argument. It can't be blamed if whatever is +passed to it is not something that you would consider the initial input. + +> thanks&bye, lele. +> --=20 +> nickname: Lele Gaifax | Quando vivr=C3=B2 di quello che ho pensato ieri +> real: Emanuele Gaifas | comincer=C3=B2 ad aver paura di chi mi copia. +> lele@metapensiero.it | -- Fortunato Depero, 1929. +> +> _______________________________________________ +> notmuch mailing list +> notmuch@notmuchmail.org +> http://notmuchmail.org/mailman/listinfo/notmuch -- 2.26.2