From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: =?UTF-8?Q?Jo=C3=A3o_?= =?UTF-8?Q?T=C3=A1vora?= Newsgroups: gmane.emacs.bugs Subject: bug#48545: 28.0.50; `icomplete-vertical-mode` does not support the `group-function` Date: Thu, 19 Aug 2021 20:41:38 +0100 Message-ID: <87r1epp6h9.fsf@gmail.com> 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> 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="39902"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux) Cc: mail@daniel-mendler.de, 48545@debbugs.gnu.org To: Dmitry Gutov Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Thu Aug 19 21:42:27 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 1mGnvm-000A8R-VE for geb-bug-gnu-emacs@m.gmane-mx.org; Thu, 19 Aug 2021 21:42:26 +0200 Original-Received: from localhost ([::1]:57036 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mGnvl-0000Ad-Sh for geb-bug-gnu-emacs@m.gmane-mx.org; Thu, 19 Aug 2021 15:42:25 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:51268) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mGnvP-000086-4Q for bug-gnu-emacs@gnu.org; Thu, 19 Aug 2021 15:42:03 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:49276) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1mGnvO-0002lw-OS for bug-gnu-emacs@gnu.org; Thu, 19 Aug 2021 15:42:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1mGnvO-00042L-Hw for bug-gnu-emacs@gnu.org; Thu, 19 Aug 2021 15:42:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: =?UTF-8?Q?Jo=C3=A3o_?= =?UTF-8?Q?T=C3=A1vora?= Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 19 Aug 2021 19:42:02 +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.162940210915492 (code B ref 48545); Thu, 19 Aug 2021 19:42:02 +0000 Original-Received: (at 48545) by debbugs.gnu.org; 19 Aug 2021 19:41:49 +0000 Original-Received: from localhost ([127.0.0.1]:60822 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mGnvB-00041n-9a for submit@debbugs.gnu.org; Thu, 19 Aug 2021 15:41:49 -0400 Original-Received: from mail-wm1-f41.google.com ([209.85.128.41]:52135) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mGnv9-00041Y-UL for 48545@debbugs.gnu.org; Thu, 19 Aug 2021 15:41:48 -0400 Original-Received: by mail-wm1-f41.google.com with SMTP id u15so4499945wmj.1 for <48545@debbugs.gnu.org>; Thu, 19 Aug 2021 12:41:47 -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=sZ3OZo6f+zKjjLtAYZh7S86fTvQuECWXAKQhuTnmOvQ=; b=UG9cBDapNtohqd6PgehLgeSwpKGdNPJt+5bGmEu7SAA19oVgVIMLeV5U6f/2VfdQ71 oeJv4p1uqtts2ArThpazHRcp/XEkIOBcla1ChT7v0T7VKqWfvUvOVPub779qhgg+J+9v brULCgp/BdJnV8iCmpPd4eCZwo8hBOu4JBl8lEuYor+RNXIY2zVThSHXqQCOluVs2Sah wN3OECaOQylcJt/vDDifjls85sOfP49uT7QuWsUvfKiXw4hHbldrqTBvlFGwFcAVLr1Z pJP80u8Nb9KSJKZfTNs9OSLoELWCtvCdVAGwOwF51+xCGOxPWakoXSVpvymgm7HrvKZa 4mNw== 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=sZ3OZo6f+zKjjLtAYZh7S86fTvQuECWXAKQhuTnmOvQ=; b=KqfhCbWhOkK766ZGhPeovtdk5R4C+Foji6Yi60TvCFbZn7/jKzg1hAoFI+uKHfMHCJ idRIV0dZkf+A6jB/OjOqOaHdGO04n77L9PWXpujmIt4ZLdijcM+sHhyQhLXQ5mbAFmgB veaGdKBLTanJzastx5HkB3gXkZxv6Fe6b2GGs1l/2ey0Rxdxld+jWTdFq2qN5VDwSySm 39qXNUjIEAd9FQxGt2DeyEtiC1wwn1vGWUzOxq/Za2La3x298o9f2UwYdmdQJHljnUm5 +2KkUJKZ0IAZgtFrB0KOm+KokrVL5mBBKcKiOfYfpigYeh5ea3qY/pU29w0B17q6CyOi BA1g== X-Gm-Message-State: AOAM533rsJ23EMGmdUzfM3njMOwiPkpfpSF6LROzp8q3U6UC0vN1IKaq DgJa3CmHjxMHHGO3bW0XO58= X-Google-Smtp-Source: ABdhPJz8F3AtltFHoHjHRjyBq3tn32qfi36QH9sRqQ29el/mmaZYyhSAaEUKGV7/zedW42kN80s/bA== X-Received: by 2002:a1c:7719:: with SMTP id t25mr299359wmi.130.1629402102270; Thu, 19 Aug 2021 12:41:42 -0700 (PDT) Original-Received: from krug (a94-133-27-132.cpe.netcabo.pt. [94.133.27.132]) by smtp.gmail.com with ESMTPSA id k13sm2964378wms.33.2021.08.19.12.41.40 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 19 Aug 2021 12:41:41 -0700 (PDT) In-Reply-To: <54e4e409-5525-b796-9e9c-582735995cc1@yandex.ru> (Dmitry Gutov's message of "Thu, 19 Aug 2021 18:02:57 +0300") 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:212238 Archived-At: Dmitry Gutov writes: > On 19.08.2021 14:18, Jo=C3=A3o T=C3=A1vora wrote: >> completion-all-sorted-completions in minibuffer.el if a table supplies >> `group-function`. A patch for this is after my sig. > > 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. 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. I recommend whatever is done that some quantitative benchmarking is performed to the before/after. Enabling fido-vertical-mode and pressing C-u C-x C-e C-m after (benchmark-run (call-interactively 'insert-char)) Seems to be a decent way to measure. Currently, with the alpha/length/history sorting, it takes about 1 second in my machine. Without any sorting (and the natural grouping), takes about 0.6 seconds. You should measure what the re-grouping sorting does. Jo=C3=A3o