From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.ciao.gmane.io!not-for-mail From: =?utf-8?B?Sm/Do28gVMOhdm9yYQ==?= Newsgroups: gmane.emacs.devel Subject: Re: Add user customization fido-completion-styles Date: Tue, 02 Jun 2020 18:51:31 +0100 Message-ID: <87sgfdl5jw.fsf@gmail.com> References: <87r1uzn018.fsf@gmail.com> <953E1512-6420-4AE8-AF29-15AB151B6344@schwartzmeyer.com> <877dwpn2id.fsf@gmail.com> <3483a8d9-1474-45cf-afad-8d276b96ef3f@default> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Injection-Info: ciao.gmane.io; posting-host="ciao.gmane.io:159.69.161.202"; logging-data="81593"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.91 (gnu/linux) Cc: emacs-devel@gnu.org To: Drew Adams Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Tue Jun 02 19:52:13 2020 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 1jgB5B-000L78-35 for ged-emacs-devel@m.gmane-mx.org; Tue, 02 Jun 2020 19:52:13 +0200 Original-Received: from localhost ([::1]:57464 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jgB5A-0001Ew-2k for ged-emacs-devel@m.gmane-mx.org; Tue, 02 Jun 2020 13:52:12 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:46676) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jgB4a-0000os-DP for emacs-devel@gnu.org; Tue, 02 Jun 2020 13:51:36 -0400 Original-Received: from mail-wm1-x341.google.com ([2a00:1450:4864:20::341]:53404) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1jgB4Z-00006W-BY for emacs-devel@gnu.org; Tue, 02 Jun 2020 13:51:36 -0400 Original-Received: by mail-wm1-x341.google.com with SMTP id l26so3779735wme.3 for ; Tue, 02 Jun 2020 10:51:34 -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=BQt5V4ad3abokAF+HUi1M6zdeuWtLm21YaNgdoX8PjE=; b=fo5FFcUt2iz42IQgXrc8uxec4BO4GV/Wee+7JQXpBM+CzYvv1rRgO3hI+q0OkUdHY8 KOzu6rNhlNnexW6Z7GLLgf5Xi/mnW6ppmdCvlIPqJj83DNr0rs8JUhd3fdjAO77hv6RG 3JUX0tvYtJGMobokO6eE9FbAD5L36galzvOzXrH9CiVZ2RQSeTEnc7Ipmmqw4xnA7FRu /JIKEGUYfyuhw7zIqywNvg5+lEWkAQqnah7+IB+mJMiYaI5ct8hmhwLif1yLFsUweE0U qzP94WC4UgpCMyngaafVPeBF1EseAdv+A0em6J3LmOkJ+u3hDhGievIhTZXif1I//CEb e0wA== 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=BQt5V4ad3abokAF+HUi1M6zdeuWtLm21YaNgdoX8PjE=; b=MbdNhN16AaU2R6dKfJjSnzKEl9Tj6bHPUvSCbXhOt+f/V2KgfWKB1p1hEDDNuM9TTG ZZoSUTzsIYV+Do7RYhKrtYa+TCpa+dWdASdAoeTKDyrESO+FI2WrrzNMPzcqMcExo6j/ 2st0gTEbmu7SkAG5X3LFJQCNUs6kwDRGPT0nKO6c/uYEaB+M30aAHRWeGHfdvlWExRQW fIK+ok4Z13POXmYClHRmN0ArW/O5lubMNQFzYZt9aNH6mkltym9PHdJSuH9hGg7ESaON eSqBsx49FOIcWLew3JTHSpbEFNb0Z7jZBo6ucEm8VsvKaowMr6QOG92x5dDu3m+JOkSI ttJw== X-Gm-Message-State: AOAM5313ncBlUYVCzvKWvgYBih8qlUM+lklRkiQxQp3myJrUJNOcYCPo FjGUSh2ysdBw1ydXxVh2ZH3+GKbKT8I= X-Google-Smtp-Source: ABdhPJy1BI7WrjFyP3pK14varDvOHnMW/P5InJxjB9+seorjyIu3rAgUH5oPnXom0ZLxBqzIHfJQEQ== X-Received: by 2002:a7b:c5d4:: with SMTP id n20mr5426747wmk.106.1591120293201; Tue, 02 Jun 2020 10:51:33 -0700 (PDT) Original-Received: from krug (89-180-144-241.net.novis.pt. [89.180.144.241]) by smtp.gmail.com with ESMTPSA id d17sm5549381wrg.75.2020.06.02.10.51.31 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 02 Jun 2020 10:51:32 -0700 (PDT) In-Reply-To: <3483a8d9-1474-45cf-afad-8d276b96ef3f@default> (Drew Adams's message of "Tue, 2 Jun 2020 09:14:42 -0700 (PDT)") Received-SPF: pass client-ip=2a00:1450:4864:20::341; envelope-from=joaotavora@gmail.com; helo=mail-wm1-x341.google.com X-detected-operating-system: by eggs.gnu.org: No matching host in p0f cache. That's all we know. X-Spam_score_int: -10 X-Spam_score: -1.1 X-Spam_bar: - X-Spam_report: (-1.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001, FROM_EXCESS_BASE64=0.979, RCVD_IN_DNSWL_NONE=-0.0001, SPF_PASS=-0.001, URIBL_BLOCKED=0.001 autolearn=_AUTOLEARN 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:251771 Archived-At: Drew Adams writes: > As for performance, for `M-x' there certainly is > no problem. `M-x' with no input pattern to match > shows the 6000-some candidates immediately. Certainly it doesn't _show_ 6000 candidates, right? You must mean it calculates them quickly and shows the top-sorting set quickly. That's great, I guess, and I join in asking if Emacs shouldn't do that. I didnt' dig down very intensively, but my naive profiling shows the bulk of the work to be in `all-completions' or thereabouts to be the main sink of cpu time: - icomplete-post-command-hook 2032 86% - icomplete-exhibit 2032 86% - icomplete-completions 2009 85% - icomplete--sorted-completions 1986 84% - completion-all-sorted-completions 1986 84% - completion-all-completions 1982 84% - completion--nth-completion 1982 84% - completion--some 1982 84% - # 1982 84% - completion-flex-all-completions 1965 84% - completion-substring--all-completions 1935 82% - completion-pcm--all-completions 1932 82% - all-completions 1929 82% - # 1929 82% - complete-with-action 1929 82% - all-completions 37 1% As you know, all-completions is a C function. The 1% is suspicious, I don't know if I should trust it. Anyway, I'm curious how Icycles evades this. Anyway2, I wasn't trying this in an Emacs -Q. When I do, and I set icomplete-compute-delay to 0, then M-x is practically instantaneous. Maybe the default 0.3 value of that variable is excessively conservative. So, to summarize: I do believe could be some shortcuts for the notable case of no input pattern to give a speed boost, maybe showing them them their relevant minibuffer history. I don't believe there's some kind of magical speed pickup to be had. Even the C rewrite of parts of completion-pcm--all-completions now seems dubious. > This way of combining yes-no-maybe predicates is > described here: > > https://www.emacswiki.org/emacs/ApplesAndOranges Have you tried `fido-mode` and/or flex? Can you think of specific ways to improve it? If so, patches are very welcome. It's a bit harder, I admit, to try to learn Icicles and decide which features to migrate. But if you can point some laser-targeted improvement to the flex algorithm (in efficiency of functionality) are very welcome. Jo=C3=A3o