From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: =?utf-8?B?Sm/Do28gVMOhdm9yYQ==?= Newsgroups: gmane.emacs.devel Subject: Re: [PATCH] (icomplete-vertical-mode): Add support for affixations and, annotations Date: Mon, 24 May 2021 23:54:08 +0100 Message-ID: <87bl8zivzj.fsf@gmail.com> References: <87zgwlb4xc.fsf@gmail.com> <617d06ca-27bf-2ae8-26eb-1042123499d3@daniel-mendler.de> <87pmxhb1rs.fsf@gmail.com> <23510125-37b9-e87e-3590-5322f44772ce@daniel-mendler.de> <87a6olazff.fsf@gmail.com> <93d2cfe9-bae8-bf94-486f-7569aa31491d@daniel-mendler.de> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="10210"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux) Cc: Daniel Mendler , Juri Linkov , "emacs-devel@gnu.org" To: Stefan Monnier Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Tue May 25 00:57:09 2021 Return-path: Envelope-to: ged-emacs-devel@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1llJVU-0002WE-Rs for ged-emacs-devel@m.gmane-mx.org; Tue, 25 May 2021 00:57:08 +0200 Original-Received: from localhost ([::1]:36540 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1llJVT-0007G1-OE for ged-emacs-devel@m.gmane-mx.org; Mon, 24 May 2021 18:57:07 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:35114) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1llJSf-0002MS-Sq for emacs-devel@gnu.org; Mon, 24 May 2021 18:54:13 -0400 Original-Received: from mail-wr1-x42f.google.com ([2a00:1450:4864:20::42f]:39900) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1llJSe-0004cj-BM for emacs-devel@gnu.org; Mon, 24 May 2021 18:54:13 -0400 Original-Received: by mail-wr1-x42f.google.com with SMTP id v12so30106586wrq.6 for ; Mon, 24 May 2021 15:54:11 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:references:date:in-reply-to:message-id :user-agent:mime-version:content-transfer-encoding; bh=VLTyjkD/siEGT+xQiwkjQ+r5EIvTjAPx939bCbWs1yQ=; b=sKa4o1AS2aqnGSk5u3WtQSopiuyQZlz6mhgr2DFdz3DHVPspdbvhaGz9gkn9MrMcMg NrPKRsljDlumlX5JVkvltJyQ8qDB714l+VuWYLxrEghkyNqLC+qW8a8kWFANoJ90Afh/ 9Wky7BRqQ0QcIMwqSBDBCJ/V/TW7ppFLavo5kGu3k7213Qj6te04QxLgAOpX1V51JEnw eIfaLvAQlAXLZv45/ZHkdGlG1P8i1FEvxjxKMV8RHAuYLyy6XVP5R45efeGiToRE4zxI XlhekbHt3zAKxJGF1hbkI6XfZzybSnZoGL5KAkXYTRj1s26yYos1Ul54y/d8qUzyrm/H 2cbQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:references:date:in-reply-to :message-id:user-agent:mime-version:content-transfer-encoding; bh=VLTyjkD/siEGT+xQiwkjQ+r5EIvTjAPx939bCbWs1yQ=; b=DAJkHgaMhikT3+b5tHIBRGUqhKeFaWm0427p1L/F1jHJXwAu5njeHwscvNlHApVS99 RHdAo3r2hgP7iRUw2ulRG3Vf711ZOGWRgysVmLI8STgbTD8WEflhufOM9gmM7t9VNo7W qDMa3uXghoT4Ju0oUmzpfAT6Dachlx+VZ4FzrBOahnzUNWAUmsVAAqQduQete3JVSonx hMuZ6WNqWkdfqm0JD6FcYHs40qsnKsO0zcP3AD0q7D+gyVLt6L8ZogxpSizWfg6pTuVt MVfmWriX/dp2yAAgJbh+6AOtePhd1hRwrhg5U8hQF/MVlyHUqWi1iXfZ3V7ruszx2FNz 8fqw== X-Gm-Message-State: AOAM533ARHhLFO+uhkloBfrYPquhwLTbCUcShn/V9UJOBtJpXXPVfuTB J9e8eYnPfpOVFrylRdsGfo8= X-Google-Smtp-Source: ABdhPJwkg2wzNj65kSCa7RqLhLMbeAPKuZFzkQQ9ZI7P1p5ItDAIEQFnHfQz5I8LllIRs4XWjMjc1A== X-Received: by 2002:a05:6000:11ce:: with SMTP id i14mr24164580wrx.221.1621896850741; Mon, 24 May 2021 15:54:10 -0700 (PDT) Original-Received: from krug (a94-133-55-152.cpe.netcabo.pt. [94.133.55.152]) by smtp.gmail.com with ESMTPSA id h14sm16986603wrq.45.2021.05.24.15.54.09 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 24 May 2021 15:54:10 -0700 (PDT) In-Reply-To: (Stefan Monnier's message of "Sun, 23 May 2021 19:39:00 -0400") Received-SPF: pass client-ip=2a00:1450:4864:20::42f; envelope-from=joaotavora@gmail.com; helo=mail-wr1-x42f.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Original-Sender: "Emacs-devel" Xref: news.gmane.io gmane.emacs.devel:269819 Archived-At: Stefan Monnier writes: > Daniel Mendler [2021-05-24 01:04:03] wrote: >> On 5/23/21 11:54 PM, Jo=C3=A3o T=C3=A1vora wrote: >>> I'd prefer if we wait a bit. For one, adding this to >>> icomplete-vertical-mode would encourage more backend writers to use what >>> we both seem to agree is a flawed API, thus making the effort we are >>> discussing more difficult. >> I thought a minute bit about this, therefore another mail. While I agree >> with you that the status quo of having both an `annotation-function` and >> an `affixation-function` is not beautiful API-wise, I am not sure if an > > I don't have a strong preference between re-using `annotation-function` > and adding a new method. I think we should first figure out what is the > "ideal" API for that, and only once we have it can we see whether it can = be > retro-fitted into `annotation-function`. The ideal API for backends to say what they would like to annotation completions with: - would not allow the annotator backend to affect the cardinality or order of completions being annotated. - would allow the the annotator backend to perform one-time setup and teardown for the whole set of completions. annotation-function provides the first but not the second, affixation-function provides the second but not the first. I think the second may not be that useful for the use cases we have right now, but let's say I'm wrong and it is. In that case, I think we're better giving another optional endpoint to the backend to perform this setup teardown. For example, a function of a lambda. Jo=C3=A3o