From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Dmitry Gutov Newsgroups: gmane.emacs.devel Subject: Re: Simplification of `affixation-function` Date: Sun, 25 Apr 2021 01:48:13 +0300 Message-ID: <35e2e508-cd0a-b921-af96-9c12da92faf3@yandex.ru> References: <87y2d777r2.fsf@mail.linkov.net> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 8bit Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="25867"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.7.1 Cc: Daniel Mendler , emacs-devel@gnu.org To: Stefan Monnier , Juri Linkov Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Sun Apr 25 00:49:14 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 1laR5N-0006bm-RO for ged-emacs-devel@m.gmane-mx.org; Sun, 25 Apr 2021 00:49:13 +0200 Original-Received: from localhost ([::1]:49708 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1laR5M-0000H0-VD for ged-emacs-devel@m.gmane-mx.org; Sat, 24 Apr 2021 18:49:12 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:59228) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1laR4W-0008IU-HK for emacs-devel@gnu.org; Sat, 24 Apr 2021 18:48:20 -0400 Original-Received: from mail-wr1-x432.google.com ([2a00:1450:4864:20::432]:36557) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1laR4T-0005iw-Uz for emacs-devel@gnu.org; Sat, 24 Apr 2021 18:48:20 -0400 Original-Received: by mail-wr1-x432.google.com with SMTP id m9so39257374wrx.3 for ; Sat, 24 Apr 2021 15:48:17 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:subject:to:cc:references:from:message-id:date:user-agent :mime-version:in-reply-to:content-language:content-transfer-encoding; bh=XN6XqrKTcxfGY3Zmp1Izf+APxi2Wla6f5PF8U0Z8XMs=; b=Kex2xR0RP0hlFmSmTpfYxDaQTrIuQUPlZym+uQjXGkygTzdbHb65gosWw+TdI4JR/0 ULk+sDlBvzok60Iyt24TQudQcqiPFFNgR69BkhVLThkF8o04rMnOjsfIGK2dFziMGbSR DkDnvzWGBjgGczEjUgkuP3PDFvNgvQTDPj7xC1Sg8W03pS7LcUBnG6kzdjvXbW1oFowE PUPbdbjJ3bwkG5jgu5HG9FFFEKY0ofDRWltyDvtiW25G3njptIxfqy718l85hVXb1Blq NdxhCRFeR5JnPPQZtAD5TIo/rwyb27413LnG7w4icaZrOcYiGhziienlGRrIovRnd9HE So8A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:subject:to:cc:references:from:message-id :date:user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=XN6XqrKTcxfGY3Zmp1Izf+APxi2Wla6f5PF8U0Z8XMs=; b=CLgmNsrNdUg9a25ezmN7+yk7s21DI2yRHADwULbFspLk62FTzaXDPBe2ABQE5KaO1Y p3ND0s5Yfz2qByGu6SdAdyWb1DGXMH6f1dQPGXPBg4XQVw4bDQLz+lTJiRVMuRGy+tpf XoTkynUUY49i5rVpv/87B8oAtOG3QQ8RxuaSPAYTSM3aK+sSkC4q64PdzN5Zyuk24zsm xDnecRJe1HihubIvb56ujALYt2/DYUYoGWD8R/AhXJTMjtAPEpha8FfM6KVGfPpp1JKm HL6BChg+w6w37mD0a56qiGc7sNzoZaQzIwXBpPpSBBRUcJSQODR6HcYocMPZK2vxX5Ga bwww== X-Gm-Message-State: AOAM533BjMNgz5ZSfVR/a9QCOaC+yA1f6b7vk66NHUzV86gCf/TzJe6J b8taaWqHIjF8waxmMcJLKNaTCo8PvE8= X-Google-Smtp-Source: ABdhPJyFX4yRHE9kfB9R1ka1/r+4MsnB3ZN13Jx1qE0hvBe7zdw7X9SPcD2WsA6EtWizAcgafTmHDQ== X-Received: by 2002:adf:fb87:: with SMTP id a7mr13376660wrr.58.1619304496123; Sat, 24 Apr 2021 15:48:16 -0700 (PDT) Original-Received: from [192.168.0.6] ([46.251.119.176]) by smtp.googlemail.com with ESMTPSA id c12sm14534258wro.6.2021.04.24.15.48.14 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Sat, 24 Apr 2021 15:48:15 -0700 (PDT) In-Reply-To: Content-Language: en-US Received-SPF: pass client-ip=2a00:1450:4864:20::432; envelope-from=raaahh@gmail.com; helo=mail-wr1-x432.google.com X-Spam_score_int: -14 X-Spam_score: -1.5 X-Spam_bar: - X-Spam_report: (-1.5 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FORGED_FROMDOMAIN=0.25, FREEMAIL_FROM=0.001, HEADER_FROM_DIFFERENT_DOMAINS=0.249, NICE_REPLY_A=-0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=no 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:268353 Archived-At: On 25.04.2021 01:34, Stefan Monnier wrote: >> because internally it depends on the predefined order of elements: >> “completion + suffix” or “completion + prefix + suffix”. >> There is no backward-compatible way to change this order. > We don't need to worry about backward compatibility here since this > functionality has not yet been included in any released Emacs. Speaking of not being able to change it after the release, am I right to assume that this feature's main target is completing-read and not completion-at-point-functions? Nobody proposed a patch for Company, and I'm not sure how to handle such non-semantic affixations in there (icons generally require more care since they often take up more than single character width). Speaking of it's used in help--symbol-completion-table-affixation, we have recently added a related feature called 'kind' in Company which assigns each completion a icon (using a user-customizable mapping and/or algorithm). You can see its integration in elisp-completion-at-point (the :company-kind attributes).