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.bugs Subject: bug#48545: 28.0.50; `icomplete-vertical-mode` does not support the `group-function` Date: Fri, 20 Aug 2021 01:37:54 +0300 Message-ID: <266d8a54-90de-e904-f548-8ec29e52923c@yandex.ru> References: <10d162d5-2cd6-dd87-3289-a0187dfbf51f@daniel-mendler.de> <871r6sw9iz.fsf@gmail.com> <87a6lfnld0.fsf@gmail.com> <87eearulft.fsf@gmail.com> <871r6pr8bk.fsf@gmail.com> <54e4e409-5525-b796-9e9c-582735995cc1@yandex.ru> <87r1epp6h9.fsf@gmail.com> 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="23906"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.11.0 Cc: mail@daniel-mendler.de, 48545@debbugs.gnu.org To: =?UTF-8?Q?Jo=C3=A3o_?= =?UTF-8?Q?T=C3=A1vora?= Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Fri Aug 20 00:39:11 2021 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 1mGqgo-000667-SD for geb-bug-gnu-emacs@m.gmane-mx.org; Fri, 20 Aug 2021 00:39:10 +0200 Original-Received: from localhost ([::1]:38324 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mGqgn-0000uM-5Y for geb-bug-gnu-emacs@m.gmane-mx.org; Thu, 19 Aug 2021 18:39:09 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:55550) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mGqgg-0000uB-Bz for bug-gnu-emacs@gnu.org; Thu, 19 Aug 2021 18:39:02 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:49380) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1mGqgg-0007az-4D for bug-gnu-emacs@gnu.org; Thu, 19 Aug 2021 18:39:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1mGqgf-0008Q4-U9 for bug-gnu-emacs@gnu.org; Thu, 19 Aug 2021 18:39:01 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Dmitry Gutov Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 19 Aug 2021 22:39:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 48545 X-GNU-PR-Package: emacs Original-Received: via spool by 48545-submit@debbugs.gnu.org id=B48545.162941268432300 (code B ref 48545); Thu, 19 Aug 2021 22:39:01 +0000 Original-Received: (at 48545) by debbugs.gnu.org; 19 Aug 2021 22:38:04 +0000 Original-Received: from localhost ([127.0.0.1]:60926 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mGqfk-0008Ou-Gj for submit@debbugs.gnu.org; Thu, 19 Aug 2021 18:38:04 -0400 Original-Received: from mail-wm1-f46.google.com ([209.85.128.46]:40750) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mGqfi-0008OQ-4M for 48545@debbugs.gnu.org; Thu, 19 Aug 2021 18:38:03 -0400 Original-Received: by mail-wm1-f46.google.com with SMTP id x2-20020a1c7c02000000b002e6f1f69a1eso7775914wmc.5 for <48545@debbugs.gnu.org>; Thu, 19 Aug 2021 15:38:02 -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=iLMfRo+gKaK0U6gJPLm5EJLfb9FFDFK4xWg1VnOavL4=; b=rLQX7gNahwYBKbInjQvLKmXMNG1OkozqESb37eZq5BijciUhJKK6mCrZg4/0nqam5w TvayCAUSsvC1QqC9L1Swi52SNtT91jnsnnzDEsUR3El4uTYlwP06afp+Dxbgy8WYDdjd yMSclf7kJ3UCxfrVJ2/GRsR1/dq9dHIyV+z357QILuUsgPZwKCmnR0AZGwkEeKPIjamQ mMyQHVCdjZELqNZNllNXpw797v8vjm0cX3VrndpfDugGDEF2F+G0nlZe9QtApCJN7551 vTp2mqrkVMNUMH8l5DRwcn+n5Z+FON8p0uYB/qvqoU/Tw9ONPFFuiM2fi6Aq/49RHXAT 5NAA== 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=iLMfRo+gKaK0U6gJPLm5EJLfb9FFDFK4xWg1VnOavL4=; b=nqIioFpLuJwQuH5K2fee8+of5Bi8LBrkOo79xa1tHSFPuDMrKEJppMTdMSDf766jlp Xr1CawpM0krUlja6hNhfRwayeB/FsnWDQxlQrOiBAKI3feefQLs7ArRW/WsrS3AAXwAC yGmwCxUbebeilGofFKRNAMYsrEy5kxaXO63aRj2xVwN1C/25c94/7SYgzADt+Nkpp3Ns MPPT68kBjz5yGWKkC8AKBHGB9WYAMQ2SoBWdYBphuUL4zhXf8jEWvqh01U77NVFg7vQb wDy+/AD11kOLR9y5wD2y2A2J9O5Lq2xF9qpcHS03VnONTgfftQ6PqyoodDaDGddA/xqR 5opA== X-Gm-Message-State: AOAM5313r2oacAItWdvHPea8mjkOeVek408stQDqXnYi+w4qR+ZH+BSq EgAEaSOPgra/m1/8SBuaPe30bhjf+X4= X-Google-Smtp-Source: ABdhPJzL8VxDS3C5U3sIq++9Vls/PxCd2DSmWS0pIjMsXFNuwl+8T+ERDjDFDmLuRzcX25hB1LE5yA== X-Received: by 2002:a7b:c309:: with SMTP id k9mr841412wmj.48.1629412676312; Thu, 19 Aug 2021 15:37:56 -0700 (PDT) Original-Received: from [192.168.0.6] ([46.251.119.176]) by smtp.googlemail.com with ESMTPSA id u10sm4045520wrt.14.2021.08.19.15.37.55 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Thu, 19 Aug 2021 15:37:55 -0700 (PDT) In-Reply-To: <87r1epp6h9.fsf@gmail.com> Content-Language: en-US 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:212242 Archived-At: On 19.08.2021 22:41, João Távora wrote: >> We discussed this problem when group-function was introduced. Another >> approach is to just change the method of grouping: first the >> completions are sorted, and then they are sorted into groups. > > That's a possiblity. But it might be performing too much work, at least > at first sight. Not sure I understand. Grouping is a linear operation, isn't it? O(N). Which is generally cheaper than the sorting step that came before. > For the C-x 8 RET case and the xref table (the only > tables I know which use this) things seem to be naturally put into > groups already. So sorting them alphabetically, by length, by history, > and _then_ destroying most (but not all) with the grouping could be not > so interesting if the there's a big a price to pay. Could be it misses information. OTOH, if you split completions belonging to the same group apart, you can end up with a list where there as as many group headers, as there completions (in the extreme case). What behavior does (setq completions-group t) have? It affects the default UI, IIUC.