From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Daniel Mendler Newsgroups: gmane.emacs.devel Subject: Re: [PATCH] (icomplete-vertical-mode): Add support for affixations and, annotations Date: Mon, 24 May 2021 01:04:03 +0200 Message-ID: <93d2cfe9-bae8-bf94-486f-7569aa31491d@daniel-mendler.de> 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> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="13440"; mail-complaints-to="usenet@ciao.gmane.io" Cc: Juri Linkov , monnier@iro.umontreal.ca, "emacs-devel@gnu.org" To: =?UTF-8?B?Sm/Do28gVMOhdm9yYQ==?= Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Mon May 24 01:04:47 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 1lkx9L-0003IN-II for ged-emacs-devel@m.gmane-mx.org; Mon, 24 May 2021 01:04:47 +0200 Original-Received: from localhost ([::1]:52218 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lkx9K-0006Pq-Kf for ged-emacs-devel@m.gmane-mx.org; Sun, 23 May 2021 19:04:46 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:45440) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lkx8k-0005jp-F2 for emacs-devel@gnu.org; Sun, 23 May 2021 19:04:10 -0400 Original-Received: from server.qxqx.de ([2a01:4f8:121:346::180]:57077 helo=mail.qxqx.de) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lkx8h-0001u2-Rd for emacs-devel@gnu.org; Sun, 23 May 2021 19:04:10 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=qxqx.de; s=mail1392553390; h=Content-Transfer-Encoding:Content-Type:In-Reply-To: MIME-Version:Date:Message-ID:From:References:Cc:To:Subject:Sender:Reply-To: Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender: Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help:List-Unsubscribe: List-Subscribe:List-Post:List-Owner:List-Archive; bh=lrfKQYfNGd5q/Ov+iLcfnLRhW7nOtRFur6Q835sMJ2Q=; b=iEIjrMTCuISRmzHSD1GnRUg1pF bHgsAxYM2a2QYrOoYGYXJ90Ww8wLQ16znjW2u6I4wqirvlTRE6ALeecNmO4uzzpKd13XdK2ZmRk0z ey7nFTaqc4uvmC6rZXtW3BetHI3b7d6IOppPkV+FxLFg346u5XM8UN9VHBLLaHZOdZ0o=; In-Reply-To: <87a6olazff.fsf@gmail.com> Content-Language: en-US Received-SPF: pass client-ip=2a01:4f8:121:346::180; envelope-from=mail@daniel-mendler.de; helo=mail.qxqx.de X-Spam_score_int: -41 X-Spam_score: -4.2 X-Spam_bar: ---- X-Spam_report: (-4.2 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, RCVD_IN_DNSWL_MED=-2.3, SPF_HELO_PASS=-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:269714 Archived-At: On 5/23/21 11:54 PM, João Távora 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 augmented `annotation-function` is actually a less "flawed" design, in particular if one has to use a weird specification to retain the compatibility (prefix string attached as text property to the returned suffix string). You can see the `affixation-function` as the successor of the `annotation-function`, with the long term goal of replacing it entirely. But given that, I would probably prefer a design where the function only takes a single candidate as argument and returns a plist of annotations, with :prefix, :suffix, and maybe more to allow extensions. But regarding merging or not merging the patch, I don't agree with your argument of taking this as leverage which makes the discussion more or less difficult. The status quo is that the `affixation-function` is part of the current `completing-read` definition and default completion UI in Emacs master, so it should be okay to merge this. Corrections to the definition are a separate discussion. In any case, if it comes to a change of definition I am willing to help out with patches. Daniel