From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Juri Linkov Newsgroups: gmane.emacs.bugs Subject: bug#45234: Annotation function vs. Affixation function Date: Mon, 14 Dec 2020 21:31:06 +0200 Organization: LINKOV.NET Message-ID: <87czzc5n7x.fsf@mail.linkov.net> References: Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="11474"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (x86_64-pc-linux-gnu) Cc: 45234@debbugs.gnu.org To: clemera@posteo.net Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Mon Dec 14 20:58:54 2020 Return-path: Envelope-to: geb-bug-gnu-emacs@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 1kotzh-0002sh-Kf for geb-bug-gnu-emacs@m.gmane-mx.org; Mon, 14 Dec 2020 20:58:53 +0100 Original-Received: from localhost ([::1]:36470 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kotzg-00056x-MA for geb-bug-gnu-emacs@m.gmane-mx.org; Mon, 14 Dec 2020 14:58:52 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:37950) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kotyt-0004Pt-5Z for bug-gnu-emacs@gnu.org; Mon, 14 Dec 2020 14:58:03 -0500 Original-Received: from debbugs.gnu.org ([209.51.188.43]:43071) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1kotys-0002qJ-TN for bug-gnu-emacs@gnu.org; Mon, 14 Dec 2020 14:58:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1kotys-0001to-SK for bug-gnu-emacs@gnu.org; Mon, 14 Dec 2020 14:58:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Juri Linkov Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Mon, 14 Dec 2020 19:58:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 45234 X-GNU-PR-Package: emacs Original-Received: via spool by 45234-submit@debbugs.gnu.org id=B45234.16079758357212 (code B ref 45234); Mon, 14 Dec 2020 19:58:02 +0000 Original-Received: (at 45234) by debbugs.gnu.org; 14 Dec 2020 19:57:15 +0000 Original-Received: from localhost ([127.0.0.1]:54611 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1koty6-0001sG-UY for submit@debbugs.gnu.org; Mon, 14 Dec 2020 14:57:15 -0500 Original-Received: from relay4-d.mail.gandi.net ([217.70.183.196]:51465) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1koty5-0001re-OJ for 45234@debbugs.gnu.org; Mon, 14 Dec 2020 14:57:14 -0500 X-Originating-IP: 91.129.99.98 Original-Received: from mail.gandi.net (m91-129-99-98.cust.tele2.ee [91.129.99.98]) (Authenticated sender: juri@linkov.net) by relay4-d.mail.gandi.net (Postfix) with ESMTPSA id 577FCE0003; Mon, 14 Dec 2020 19:57:05 +0000 (UTC) In-Reply-To: (clemera@posteo.net's message of "Mon, 14 Dec 2020 12:07:04 +0100") X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.io gmane.emacs.bugs:196103 Archived-At: > On current master the results of the new annotation function are passed to > the affixation function in minibuffer-completion-help: > > (when ann-fun > (setq completions > (mapcar (lambda (s) > (let ((ann (funcall ann-fun s))) > (if ann (list s ann) s))) > completions))) > (when aff-fun > (setq completions > (funcall aff-fun completions))) > > If the annotation function returns a result it's packed into a list > which should be an unexpected format for the affixation function? > Maybe when both are defined only the affixation function should be used? The current implementation assumes that the affixation function can be smart enough to recognize that completions were modified by a previous call of the annotation function. If you can demonstrate that this is not always the case, then the implementation could be changed, there is enough time before the next release, after that it would be harder to change this.